Board index » delphi » Report Printer Pro - Multiple Reports and 1 Preview.

Report Printer Pro - Multiple Reports and 1 Preview.

Hi All,

I'm new to report printer pro.

I want to run the same report 4 times yet only show one preview window. With
all 4 reports. I could do this in quick reports but not in RPP.

I'm doing all this in code. Any help would be appreciated.

Regards
Brad

Visit the home of PCast http://www.rightclick.com.au/pcast.html Downloads
pictures from newsgroups and displays them like a browser.

 

Re:Report Printer Pro - Multiple Reports and 1 Preview.


There's several ways to do this.  If you are going to be doing this a lot I
would suggest placing your reports in procedures that can be called from
within another report.  This is the same advice that would be given for any
amount of code that is common between several places.  Here's some code:

  procedure CustomerListing(Sender: TObject);

  begin
    With Sender as TBaseReport do begin
    // Insert code here for Customer Listing report
    end; { with }
  end;

 // This is the OnPrint event for your TReportSystem component
  procedure TReportForm.ReportSystem1Print(Sender: TObject);

  begin
    With Sender as TBaseReport do begin
      CustomerListing(Sender);
      NewPage; // Call NewPage between each report to finish off previous
page
      InvoiceListing(Sender);
      NewPage;
      PartsListing(Sender);
    end; { with }
  end;

If this is a one-time situation, you could call the OnPrint events for each
report from within another TReportSystem:

  procedure TReportForm.ReportSystem1Print(Sender: TObject);

  begin
    With Sender as TBaseReport do begin
      CustomerListingReportSystem.OnPrint(Sender);
      NewPage; // Call NewPage between each report to finish off previous
page
      InvoiceListingReportSystem.OnPrint(Sender);
      NewPage;
      PartsListingReportSystem.OnPrint(Sender);
    end; { with }
  end;

I would invite you to visit the Nevrona Forums (a link is provided on our
web site at www.nevrona.com ) where you'll probably get a few more ideas
from our helpful customers.  Thanks,

Jim Gunkel
Nevrona Designs
www.nevrona.com

Brad - Right Click Australia <Brade@_xSPAMx_RightClick.com.au> wrote in
message news:7ohf55$2jg3@forums.borland.com...

Quote
> Hi All,

> I'm new to report printer pro.

> I want to run the same report 4 times yet only show one preview window.
With
> all 4 reports. I could do this in quick reports but not in RPP.

> I'm doing all this in code. Any help would be appreciated.

Re:Report Printer Pro - Multiple Reports and 1 Preview.


Quote
> I'm new to report printer pro.

I would suggest you visit www.Nevrona.com. They have a "Forums" area
which is dedicated to all of their products.

Quote
> I want to run the same report 4 times yet only show one preview window. With
> all 4 reports. I could do this in quick reports but not in RPP.

I may not understand your problem, but if you are trying to send multiple
copies of the "SAME" report to a printer, that should not be an issue.

Once the preview is showing, then you select the printer icon, it has a
place on it for number of copies desired. It is normally set to 1. If you
change that to 4, then it should work fine. Some printers do not support
multi copies. If that is the case, then you might want to use the
TReportFiler then TReportPrinter for the number of copies desired.

There are several ways you can "pre-load" the "Copies" option with 4, if
you want. Using code you can do it with the "Copies" property. If you are
using the TReportSystem component, you can "set" the number of copies. To
do that just expand the "System Printer" properties and set the "Copies"
property.

HTH, Jim
An Old and Biased RP user

Re:Report Printer Pro - Multiple Reports and 1 Preview.


The reports are the same but I run them with different parameters.

I.e. The user wants to print invoices 1, 9 ,34 & 69. I could modify the
report to take all these parameters but I would rather just run it 4 times
and only display 1 preview window.

If they send it directly to the printer there is no problem, but I know my
users want the preview.

Thanks for you time

Brad.

Quote
<j...@nospamprimenet.com> wrote in message

news:MPG.1215fb5718524dcb989689@forums.borland.com...
Quote
> > I'm new to report printer pro.

> I would suggest you visit www.Nevrona.com. They have a "Forums" area
> which is dedicated to all of their products.

> > I want to run the same report 4 times yet only show one preview window.
With
> > all 4 reports. I could do this in quick reports but not in RPP.

> I may not understand your problem, but if you are trying to send multiple
> copies of the "SAME" report to a printer, that should not be an issue.

> Once the preview is showing, then you select the printer icon, it has a
> place on it for number of copies desired. It is normally set to 1. If you
> change that to 4, then it should work fine. Some printers do not support
> multi copies. If that is the case, then you might want to use the
> TReportFiler then TReportPrinter for the number of copies desired.

> There are several ways you can "pre-load" the "Copies" option with 4, if
> you want. Using code you can do it with the "Copies" property. If you are
> using the TReportSystem component, you can "set" the number of copies. To
> do that just expand the "System Printer" properties and set the "Copies"
> property.

> HTH, Jim
> An Old and Biased RP user

Re:Report Printer Pro - Multiple Reports and 1 Preview.


(Sorry if you get this twice).

I want the user to be able to choose 4 invoices and see one preview. The
simplest way is to run the report 4 times. I really don't want to have to go
and change all the report logic.

If it goes to the printer it is not problem. Only the preview is a problem.

To answer you question it is not 4 copies of the same report, each copy is a
different invoice.

Brad

Quote
<j...@nospamprimenet.com> wrote in message

news:MPG.1215fb5718524dcb989689@forums.borland.com...
Quote
> > I'm new to report printer pro.

> I would suggest you visit www.Nevrona.com. They have a "Forums" area
> which is dedicated to all of their products.

> > I want to run the same report 4 times yet only show one preview window.
With
> > all 4 reports. I could do this in quick reports but not in RPP.

> I may not understand your problem, but if you are trying to send multiple
> copies of the "SAME" report to a printer, that should not be an issue.

[snip
]>
Quote
> HTH, Jim
> An Old and Biased RP user

Other Threads