Solved

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

Posted on 2007-11-30
5
2,879 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

623 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