Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sequence of operations in loading report...

Status
Not open for further replies.

bgravi

Programmer
Jul 28, 2002
15
0
0
US
am using CR for VS.Net.
I am implementing my own toolbars and menus for crystal reports in our application. I want to know the sequence of operations of loading of crystal reports:

1.Loading of rpt
2.accessing the database
3.finish loading data

The reason I need the sequence of the above is that, after I load the report into my ReportDocument object and set it to the viewer, I need to update my UI to display the number of pages, the next, prev, last, first navigation buttons etc. Since the loading of the data appears to be asynchronous, I need to know when report has finished loading data so that i can get meaning informations.
Also, in our application, we allow the user to filter records based on criteria. After I set the selection criteria required by the user, I again need to reset my UI to reflect the current changes( the report might originally have 3 pages, but after applying the selection formula, it might be just one page etc). But after I set the selection formula and check the number of pages etc, it still returns the old values as the data isn't updated completely yet. So, how can I be sure when the data is finished loading? Will it start getting data as soon as Load is called or will it start getting data after assigned to the viewer?

Apart from this, I also set the database name at runtime. The problem with the report engine is that it doesn't support necessary events required for writing medium scale apps. My current sequence of operations is as follows, though I am not able to figure out when the data is finished loading to check number of pages:
1. Create ReportDocument object
2. Load the rpt using ReportDocument.Load( abc.rpt )
3. Change the database settings immediately after Load( Not subscibing to Init event)
4. set the viewer.ReportSource = ReportDocument above
5. Try getting the total number of pages here


So, I would be grateful if anyone can help me out.

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top