LindaC Posted June 13, 2003 Posted June 13, 2003 (edited) 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); Edited June 13, 2003 by LindaC Quote
*Experts* mutant Posted June 13, 2003 *Experts* Posted June 13, 2003 I never really worked with Crystal Reoprts but I noticed your poll. I wouldnt recommend buying a MS Reference. It contains things that you can find in your help files. Go with something thats not a core reference. You would be better buying some other book to learn then reference. Quote
LindaC Posted June 17, 2003 Author Posted June 17, 2003 Problem Solved OK, I figured this out! An error on my part... I should not have included the line: InitializeComponent(); After I got my data. It reinitialized everything. Just like its supposed to. An oversight on my part, the line should have been placed before I retrieved the data, or left out entirely. Linda Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.