Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Delphi 7 :: Rave Reports - Take Full Control of Setup via Coding

Posted on 2007-11-30
5
Medium Priority
?
2,922 Views
Last Modified: 2013-11-23
Dear Experts,

I am using Delphi 7 and Rave components to produce my reports.

This reports will be printed in a manufacturing environment.
When executing the report, using Rave it will be irritation to click (and also time consuming)
through all the "print / preview" etc prompts. What I need is that when executing the report it
must directly (immediately) start to print to the printer.

BUT, the user must be able to specify all the configurations at the setup form for example:
1. Should Report be Previewed first / Print Immediately.
2. The printer for each report should be set up. For example:
    For printing picking lists, use PrinterABC
    For printing Labels, use PrinterXYZ.

And then also show me how to save these settings, maybe in a ini file or what ever is best.

Show to sum it all up.
I want my users to setup all (or at least the 2 above mentioned) printer parameters once, on first run, and thereafter they just print by obeying the set up parameters.

Please help with complete code examples or demos.


Thanks in advance.
0
Comment
Question by:Marius0188
  • 2
5 Comments
 
LVL 21

Accepted Solution

by:
developmentguru earned 2000 total points
ID: 20381870
Here is a link detailing how to change the standard dialog in Rave programmatically.

http://www.nevrona.com/Default.aspx?tabid=132

-- turn off the dialog --
If you want to turn off the dialog, place a TRvSystem component on the same form or data module as your TRvProject.  Set the Projects Engine proprty to the TRvSystem.  Then on the RvSystem component's SystemSetups set ssAllowSetup to false.  Code for that (with the connections in place) would be:

RvSystem1.SystemSetups := RvSystem1.SystemSetups - [ssAllowSetup];

-- printer settings --
The same RvSystem component has a SystemPrinter property that contains proprties to allow setting many printer options.

-- render directly to the printer --
Set the TRvSystem object's DefaultDest property to rdPrinter.  This alone will make the printer settings dialog default to printer.  Combine this with disabling the print preview dialog and it goes directly to the default printer.

Let me know if you need more.
0
 

Author Comment

by:Marius0188
ID: 20395633
Hi there,

Thanks for the help.

What I am now looking for is a way to set up a different printer for each of my two reports in Rave.
I would like to see a complete code example.

In other words, I am not wishing to print my reports to the same printer. Report#1 should print to Printer#1 (non default printer) and Report#2 should print to Printer#2 (non default printer).

This should work for printers that have been shared over a LAN as well.

Thanks in advance.
0
 
LVL 21

Expert Comment

by:developmentguru
ID: 20404207
First you will need to include RpDevice in your uses clause.  Then call the function:

RPDev.SelectPrinter('YouPrinterName', Exact);

The first parameter is the printer name.  The second is a boolean value to indicate if you want a partial match or exact.  The function returns true if it succeeds.  Call this before printing each report and you shold get what you are looking for.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21216619
Forced accept.

Computer101
EE Admin
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question