Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display report based on dataset
Message
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Divers
Thread ID:
00893420
Message ID:
00894096
Vues:
18
Kevin,

OK, I think I'm getting somewhere now. I created a new, simple report based on my dataset. MyReport.GetDataSource( MyDataSet) was not sufficient; I still got the logon dialog. However,

foreach (Table MyTable in MyReport.Database.Tables)
{
MyTable.SetDataSource( MyDataSet.Tables[MyTable.Name];
}

did work.

Then I added a subreport to the report, again based on the same dataset. Again I got the logon dialog. So I added code to open the subreport

MySubreport = MyReport.OpenSubreport( MySubreportName);

and to go through the tables in the subreport, setting their datasources as above. This worked (no logon dialog)!

It remains to see if I can get this technique to work on the original report, which has several subreports, but I'm pretty sure it will. Guess I'll have write code to go through the main report's ReportObjects collection, looking for subreports.

This seems unnecessarily complicated, and I haven't seen anything in the CR documentation in VS.NET that says you have to do this.

---Tim


>hmm....my first guess is that something in the RPT is still pointing back to SQL. You said you had some subreports where the code didn't reach down that far. You might want to double-check the table references. If you don't explicity set the data source at runtime for every table you specified at design time, I think CR still goes looking.
>
>I'll check this out myself and see what I find. I know that I initially had the same problem that you're having, and when I switched to using datasets at design time, the problem went away.
>
>Kevin
Thomas M. Lamm
Bradbury & Associates
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform