Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

receipt report.

edited September 2005 in Subreports
Hi you all.

I?m working with delphi 7.0 (build 8.01). Report builder EE 7.03

I have a receipts report with a fixed height. I need 3 receipts on a letter
size page.

The structure is as follows:

------------- page -----------------------
--------- receipt 1 ---------
--------------------------------- Customer data (Master row)
|subreport 1 {10 records max) | fixed labels (Master row)
| detail | fixed labels
(Master row)
| | fixed labels
(Master row)
| | fixed labels
(Master row)
--------------------------------- fixed labels (Master row)
amount in word

customer data (Master row) fixed labels (Master row)
address fixed labels (Master
row)
--------- receipt 2 ---------
--------------------------------- Customer data (Master row)
|subreport 1 {10 records max) | fixed labels (Master row)
| detail | fixed labels
(Master row)
| | fixed labels
(Master row)
| | fixed labels
(Master row)
--------------------------------- fixed labels (Master row)
amount in word

customer data (Master row) fixed labels (Master row)
address fixed labels (Master
row)
--------- receipt 3 ---------
--------------------------------- Customer data (Master row)
|subreport 1 {10 records max) | fixed labels (Master row)
| detail | fixed labels
(Master row)
| | fixed labels
(Master row)
| | fixed labels
(Master row)
--------------------------------- fixed labels (Master row)
amount in word

customer data (Master row) fixed labels (Master row)
address fixed labels (Master
row)
---------------- end page ---------------------
----- Case 1
I have a group. All the labels, subreport, etc are in the detail area.
Detail printheight = phStatic or phDynamic

Subreport is inside a region.
Subreport.printbehavior = pbFixed.

Output: print 1 receipt for each master row on different page. When detail
subreport has more than 10 rows, print out a second page, but without master
data, just the subport.

------- Case 2
I have a group. All the labels, subreport, etc are in the detail area.
Detail printheight = phStatic or phDynamic

Subreport is inside a region.
Subreport.printbehavior = pbChild

Output: print 1 receipt for each master row, 3 receipts per page. When
detail subreport has more than 10 rows, prints out superimposed on customer
data and address.

The report is working ok for detail subreport with less than 10 records, but
isn?t working with 10 records or more.
-------------

help please.

Daniel C?zarez Aguilar
Guadalajara, M?xico

Comments

  • edited September 2005
    Hi Daniel,

    Take a look at the following article.

    ----------------------------------------------------
    Article: Printing to Continuous Paper
    ----------------------------------------------------

    1. Layout

    For continuous printing (for example a receipt) use Title/Summary and
    removing the Header/Footer. Set the PrintHeight of each to phDynamic. Layout
    the DetailBand to print a single line item. Set the margins to 0 or to the
    smallest that the printer driver will support (some printers have an
    unprintable area).

    With this configuration The Report will generate a Title followed by a
    variable number of Detail bands that span pages if needed, and then finally
    print a Summary at the end.

    2. Pagination

    a. dtPrinter

    Some printer drivers have a continuous paper size setting. If not then try
    setting the paper size to be very small - perhaps the size of the tallest
    band in the layout. Or try setting the page height to be the size of a
    detail band. Note that some printer drivers will only accept page sizes
    within a certain range of paper sizes.

    b. dtReportTextFile

    With the above layout, the report text file will generate the page breaks
    properly, however the device will fill up a page with blank lines. You can
    control the number of lines per page by configuring the CharacterGrid
    property in the Report.BeforePrint event:

    example:


    procedure TForm1.ppReport1BeforePrint(Sender: TObject);
    var
    lDevice: TppReportTextFileDevice;
    begin

    if (ppReport1.FileDevice <> nil) and (ppReport1.FileDevice is
    TppReportTextFileDevice)then
    begin
    lDevice := TppReportTextFileDevice(ppReport1.FileDevice);

    {120 characters per line, 66 lines per page}
    lDevice.CharacterGrid(120, 66);
    end;

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2005
    This is a multi-part message in MIME format.
  • edited September 2005
    This is a multi-part message in MIME format.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.