0
Answer

Generate Crystal Report using PUSH model

Ratish Aravind

Ratish Aravind

18y
1.9k
1

Hi,

Iam creating a Web Application for the users to take print out of a substantial amount of data from an Oracle 10g database.
To achieve this i was using the Crystal Reports PUSH Model.

Here is the Code Snippet:

using Oracle.DataAccess;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
using Microsoft.Practices.EnterpriseLibrary.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

private void Page_Load(object sender, System.EventArgs e)
{
CrystalReportViewer1.Visible = false;
}


private void btnSearch_Click(object sender, System.EventArgs e)
{
BindDataGrid();  
CrystalReportViewer1.Visible = true;

}


protected void BindDataGrid()
{
OracleCommand cmdRegistrant = new OracleCommand("Pkg_WRTS_Retrieve.prc_getregdata", cnOracle);
   cmdRegistrant.CommandType = CommandType.StoredProcedure;
// here iam assigning the parameters to the stored procedure
//Adding to the oracle command collection
OracleDataAdapter daUserDetails=new OracleDataAdapter(cmdRegistrant);
dsRegistrantReport dsReport = new dsRegistrantReport();
daUserDetails.Fill(dsReport);
RegReport.SetDataSource(dsReport);
CrystalReportViewer1.ReportSource = RegReport;
}

I have created a Typed Dataset and binded the crystal report to this dataset as per the PUSH Model.

But when iam running this application iam able to see the crystal report but there is no data printed in the report.I tried checking the dataset and the bindings in the report everything seems perfect....
Whether anyone faced the same problem earlier.
Can anyone help me on this???

Thanks,
Ratish.