Jump to content
Xtreme .Net Talk

What is the best J# Book?  

2 members have voted

  1. 1. What is the best J# Book?

    • Microsoft J#.NET Core Reference - Microsoft Press
      1
    • J# Wrox Press Inc
      1


Recommended Posts

Posted (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 by LindaC
  • *Experts*
Posted
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.
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...