I have a J# Interface that calls a crystal report. The report shows up but with no data. I am successfully logging onto the database in my report but still, no data. Has any one experienced this? Is it a problem with my code?
This is my first J# app and I have tried everything but cannot resolve the problem. Please help!
The following is my code:
// Initialize the page
// Parse command line arguments
//Validate Report Param (Determines which Crystal Report To Use)
String tRpt= get_Request().get_Params().get_Item("txtReport");
if((tRpt == null)||(tRpt == ""))
{
tRpt="c:\\inetpub\\wwwroot\\j\\crBudgetReport.rpt";
}
else
{
tRpt="c:\\inetpub\\wwwroot\\j\\"+txtReport.Trim()+".rpt";
}
if (!this.get_IsPostBack())
{
//Fill Datasets
daMasterData_CurrentYear.Fill(dsReportData1);
daReportData_CurrentPeriod.Fill(dsReportData1);
daReportData_LastPeriod.Fill(dsReportData1);
daReportData_Detail.Fill(dsReportData1);
daReportData_EMALog.Fill(dsReportData1);
}
// Call Crystal
InitializeComponent();
CrystalDecisions.CrystalReports.Engine.ReportDocument crDoc;
crDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
crDoc.Load(txtReport);
crDoc.SetDataSource(dsReportData1);
crReportViewer.set_ReportSource(crDoc);
This is my first J# app and I have tried everything but cannot resolve the problem. Please help!
The following is my code:
// Initialize the page
// Parse command line arguments
//Validate Report Param (Determines which Crystal Report To Use)
String tRpt= get_Request().get_Params().get_Item("txtReport");
if((tRpt == null)||(tRpt == ""))
{
tRpt="c:\\inetpub\\wwwroot\\j\\crBudgetReport.rpt";
}
else
{
tRpt="c:\\inetpub\\wwwroot\\j\\"+txtReport.Trim()+".rpt";
}
if (!this.get_IsPostBack())
{
//Fill Datasets
daMasterData_CurrentYear.Fill(dsReportData1);
daReportData_CurrentPeriod.Fill(dsReportData1);
daReportData_LastPeriod.Fill(dsReportData1);
daReportData_Detail.Fill(dsReportData1);
daReportData_EMALog.Fill(dsReportData1);
}
// Call Crystal
InitializeComponent();
CrystalDecisions.CrystalReports.Engine.ReportDocument crDoc;
crDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
crDoc.Load(txtReport);
crDoc.SetDataSource(dsReportData1);
crReportViewer.set_ReportSource(crDoc);
Last edited by a moderator: