Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logon failed...
Message
From
13/02/2007 13:28:11
 
General information
Forum:
ASP.NET
Category:
Reporting
Title:
Miscellaneous
Thread ID:
01195254
Message ID:
01195275
Views:
12
Sure, I have several....

First, here's a link to a recent article I wrote on Crystal, in CoDe magazine. The article has a large number of Crystal samples: http://www.code-magazine.com/Article.aspx?quickid=0701031

Second, at the risk of self-promotion, here's my new book on report development with .NET and Crystal:
http://www.amazon.com/Reporting-using-Server-Crystal-Reports/dp/1590596889/sr=1-1/qid=1171391165/ref=pd_bbs_sr_1/102-4130869-3969727?ie=UTF8&s=books

Third, here's some code....I wrote a generic routine for pushing datasets into a report object.

Suppose you have a report called oMyReport, and a dataset called oMyDataSet.

You can do the following, and use it every time....
PushReportData(oMyDataSet, oMyReport);
Here's the generic routines...
public void PushReportData(DataSet DsReportData, ReportDocument oReport)
{
      //   Calls SetData for the main report object
      //   Also calls SetData for any subreport objects

         this.SetData(DsReportData,oReport);

         foreach(ReportDocument oSubReport in oReport.Subreports) 
            this.SetData(DsReportData,oSubReport);
 

}

private void SetData (DataSet DsReportData, ReportDocument oReport)
{
  // receives a DataSet and a report object (could be the 
  // main object, could be a subreport object)

  // loops through the report object's tables collection, 
  // matches up the table name with the corresponding table
  // name in the dataset, and sets the datasource accordingly

  // This function eliminates the need for a developer to 
  // know the specific table order in the report

     foreach (Table oTable in oReport.Database.Tables)
         oTable.SetDataSource(DsReportData.Tables[oTable.Name.ToString()]);

}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform