Community
Showing results for 
Search instead for 
Do you mean 
Reply

Getting a Multistep error when viewing Crystal report with VB.net app

New Member
Posts: 1
Country: United States

Getting a Multistep error when viewing Crystal report with VB.net app

I have designed a Crystal Report which keeps shows how many types of call my sales force has made. It works great when viewed in the Crystal Reports environment. But when I try to view it through a custom web app written in .Net, I get a Ole Db multistep error. When the data is saved along with the report, the report loads correctly. But as soon I save it without data, it gives me the error. This is my code:

 

        Dim CR_Report As New ReportDocument
        CR_Report.Load(Session("RPTPATH") & "ProgramsNew.rpt")

        With crConnectionInfo
            .ServerName = "p:\act\pharm.pad"

           .DatabaseName = ""
            .UserID = "Ken Indictor"
            .Password = ""
        End With

        CrTables = CR_Report.Database.Tables
        For Each CrTable In CrTables
            crtableLogoninfo = CrTable.LogOnInfo
            crtableLogoninfo.ConnectionInfo = crConnectionInfo
            CrTable.ApplyLogOnInfo(crtableLogoninfo)
            'Set the location of each individual table 
            CrTable.Location = crConnectionInfo.DatabaseName & CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)
        Next

ReportFM = FormatDateTime(Session("DateFM"), 2)
        ReportTO = FormatDateTime(Session("DateTO"), 2)

             Dim selectionFormula As String = " {VRP_CONTACT_HISTORY.HISTORY Start Date/Time} in DateTime (" & ReportFM.Date.Year & ", " & ReportFM.Date.Month & "," & ReportFM.Date.Day & ", 00, 00, 00) to DateTime (" & ReportTO.Date.Year & ", " & ReportTO.Date.Month & "," & ReportTO.Date.Day & ", 00, 00, 00)"
        CR_Report.DataDefinition.RecordSelectionFormula = selectionFormula
        CrystalReportViewer1.ReportSource = CR_Report

 

Thanks for your help