0
votes

Can anyone help me out with this issue on crystal report:

CR version 13.0.20.2399  
Visual Studio Ultimate

When i try to move from the first page onto the second page, am getting this prompt,

The report you requested requires further information

Below is my code:

    myRrpt.Load(Server.MapPath("~\Reporting\CrystalReport15.rpt"))

    connect_EWS.ConnectionString = Constr_EWS
    Dim con As New SqlCommand
    Dim query As String = "SELECT * from Report_BT where Number=@num"
    con.CommandText = query
    con.Connection = connect_EWS
    con.Parameters.AddWithValue("@num", txtNumber.Text.Trim)
    connect_EWS.Open()
    '  Dim dsCustomers As New ISAE_BankTransfer
    Dim da As New SqlDataAdapter(con)

    Dim dsCustomers As DataSet4 = New DataSet4

    da.Fill(dsCustomers, "Report_BT")
    connect_EWS.Close()

    myRrpt.SetDataSource(dsCustomers.Tables(0))
    CrystalReportViewer1.DisplayPage = True

    CrystalReportViewer1.ReportSource = myRrpt

The website is published internally on Windows Server 2012 DataCenter

1

1 Answers

0
votes

Add database connection's credential in your code. So it will get the information in second page too. The logic is while paging in crystal report, it also hit the db to get second set of data.

var connectionInfo = new ConnectionInfo();
    connectionInfo.ServerName = "192.168.x.xxx";
    connectionInfo.DatabaseName = "xxxx";
    connectionInfo.Password = "xxxx";
    connectionInfo.UserID = "xxxx";
    connectionInfo.Type = ConnectionInfoType.SQL;
    connectionInfo.IntegratedSecurity = false;

for (int i = 0; i < Viewer.LogOnInfo.Count; i++)
{
    Viewer.LogOnInfo[i].ConnectionInfo = connectionInfo;
}

Crystal Reports - "The report you requested requires further information"