Solved

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

Posted on 2007-11-30
5
2,795 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now