Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report name as variable?
Message
From
23/06/2004 12:14:28
 
 
General information
Forum:
ASP.NET
Category:
Reporting
Miscellaneous
Thread ID:
00916127
Message ID:
00916472
Views:
10
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform