and different report parameters.
Main Topics
Browse All TopicsDear Experts,
I am using Delphi 7 and Rave Reports.
I have a procedure which loops through a dataset and according to my parameters
prints reports.
How can I change my code to rather loop through the dataset and add all the reports, somewhere???, and after the loop I would like to do ONE print execute which will then print all added reports in one spool job.
I have looked at the nevrona tip at: http://www.nevrona.com/Def
but it is not clear enough to me. Because for each report I am setting some params as well.
Anyone that can please explain this to me in detail?
Please see my current code attached....
Thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
According to Nevrona you need to print your separate reports from within the rvSystem.OnPrint event. To print all of the reports call rvSystem.Execute.
Here is a small example I did. I pointed an rvProject to a project of mine via the object inspector and set it's system property to an rvSystem component. I filled in the rvSystems OnPrint event and put a button on the form and responded to the OnClick event. Here's the code.
Ok what I have done, was to call the rvSystem.Execute method in the in the OnPrint() I ran my code which check what should be printed or not. Just, or nearly, like nevrona's example.
But the problem is I get blank pages printed.
In the OnPrint() event's code I have a condition and when true then it should print but it prints for each loop whether condition true or not. Is this normal?
Check my OnPrint() code:
Let me put it a little clearer.
I am doing as nevrona says. Do my printing in the OnPrint() event.
But I have procedure outside from the event which does some processing and when finished it calls the
rvSystem.Execute method.
But the problem is, not every call to rvSystem.Execute will have printable information. Therefore the condition see: Line 16 in code snippet above....
Printing should only occur when there are results in the dataset. But what currently happens is when the result is empty then it prints a blank page. Why this? All the code that relevant to printing is inside this If condition.
Please help.
Hi,
The problem is not my code, I believe.
I have build a demo application, with a TrvSystem and TrvProject component which are linked.
Added a TButton on the form.
The buttons OnClick() event has the following code:
rvSystem1.Execute.
I have assigned the Rave Report project to the TrvProject.ProjectFile and have click StoreRav.
No code exists in the rvSystem1.OnPrint() event.
But when clicking button then a blank pages prints.
Why so?
Help?
Normally when I get blank pages the dataset is returning no records... That can be due to not setting parameters or other issues. It depends on what type of datasets you are using in Rave too. First just create 3 form style reports that require no data. All you have to do is put a shape, text box, etc on the report and save it. Then, run your code calling those reports (so they print in one job). This should work with no problems and indicate that there is nothing wrong with your code. You then need to figure out why your report has no records.
Business Accounts
Answer for Membership
by: Marius0188Posted on 2007-12-05 at 04:38:02ID: 20410698
Also note that it is the same report that I print, just with different field values.
Thanks.