Solved

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

Posted on 2007-11-30
5
2,826 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 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10 Round Image 2 127
how to send memory stream from ics Client To ics server ? 11 108
MS Access from Delphi 31 28
Firemonkey BASS_Init into a thread 17 4
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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