Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report name as variable?
Message
De
23/06/2004 12:14:28
 
 
À
23/06/2004 12:10:08
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Divers
Thread ID:
00916127
Message ID:
00916472
Vues:
8
Thanks for the clarification, Kevin. I can see how we both got confused/misled by the question.

Now I know soooo much more about Crystal. <g>

~~Bonnie

>Just as a follow-up, the load function isn't necessary, depending on how the report is being generated. With a strongly-typed report, you can instantiate it by the class name and then set the preview window's reportsource to the report object, like so...
>
>RPT_MyReport oReport = new RPT_MyReport();
>oReport.Database.Tables[0].SetDataSource(MyReportTable);
>myViewer.ReportSource = oReport;
>
>In that case, the report gets compiled into the app (which can be a benefit or drawback, depending on the situation).
>
>So in that instance, yes, reflection would be the only way if you wanted to handle the name dynamically. From the lines of code that were posted, that was the direction I thought he was headed.
>
>But if you're using other methods, (untyped, report was created outside of .NET), then the report name/path can be handled by the code in his follow-up post.
>
>Kevin
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform