Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports & Datasets
Message
From
04/07/2006 12:23:46
 
 
To
04/07/2006 10:16:50
Steve Jones
Business Systems Services Uk Ltd
Swansea, United Kingdom
General information
Forum:
ASP.NET
Category:
Reporting
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01133595
Message ID:
01133634
Views:
11
Hi, Steve,

I always set the report datasource one datatable at a time.

By any chance, when you designed your report, did you design against tables that were in the back-end database (sql, oracle, etc.)? That can sometimes happen - if the report was designed against sql tables, you can get a login runtime prompt for any tables that aren't references when you do your runtime databinding.

What I do is loop through the report's database object, and match up against the tables in my dataset, like so...
private void SetData(DataSet DsReportData, ReportDocument oReport)
{
   foreach (Table oTable in oReport.Database.Tables)
      oTable.SetDataSource( DsReportData.Tables[ oTable.Name.ToString() ]);            
}
I can call that method both for the report object, as well as any subreports that may exist...
   this.SetData(DsReportData,oReport);

   foreach(ReportDocument oSubReport in oReport.Subreports) 
      this.SetData(DsReportData,oSubReport);
Hope that helps...
Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform