|
User #29222 738 posts
Whirlpool Enthusiast
|
you need to use a dataset/datatable or some other object that you dynamically fill from a database. In your program instantiate and populate the dataset/datatable by using a query to the appropriate database and table and then set this "dynamic" datasource as the datasource of your report. Cheers |
posted 2009-Jul-2, 10pm AEST
|
|
User #19884 2737 posts
Whirlpool Forums Addict
|
Hi Aaron, Yeah i thought that's how you would do it, but i have no idea what the code would be, and how i would bind the report to it? I've tried googling but have found nothing... Thanks again, |
posted 2009-Jul-2, 10pm AEST
|
|
User #80502 259 posts
Forum Regular
|
Your talking about the windows reports (.rdlc) I assume? Ignore this if you arnt. The way I use them is: If I need to change the datasource, this is all done at step 4 – I retreive different data (either from a different database, different tables, or different criteria) from the database and use this to populate the list I pass to the report. |
posted 2009-Jul-3, 9am AEST
|
|
User #19884 2737 posts
Whirlpool Forums Addict
|
Thanks Shaggs. Yes i am talking about windows reports. I understand the idea behind it, but i have no idea how to code it and havn't had any luck searching online. Any chance you could show me the code you use or part of it? Just something to get me started then i can take it from there. Thanks. |
posted 2009-Jul-3, 4pm AEST
|
|
User #80502 259 posts
Forum Regular
|
Yes – there is very little documentation for windows reports. We use mostly crystal reports for our app, and only windows reports when the data needs to be manipulated in our (C#) app before it is printed, purely because crystal reports is better documented. As far as documentation goes, the best guide I have found is this: http://www.gotreportviewer.com/ A few others (which I dont think I used much): I understand the idea behind it, but i have no idea how to code it What do you mean by this? You mean creating the actual report, or passing data to it? |
posted 2009-Jul-3, 4pm AEST
|
|
User #19884 2737 posts
Whirlpool Forums Addict
|
As far as documentation goes, the best guide I have found is this: http://www.gotreportviewer.com/ Perfect mate, thanks heaps... just what i was looking for. Thanks for all the help. Adam |
posted 2009-Jul-4, 1pm AEST
|