Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-11-30
5
Medium Priority
?
2,906 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

730 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