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

Copies and Labels usage

edited October 2008 in General
Saw the Tip on copies. Customer requires a WorkOrder on first Copy, and
Invoice on Second. Data is the same, just some things suppressed on each
copy. If WorkOrder is more than one page, then AbsolutePageNo doesn'work,
correct? How do i know when Copy #2 starts?

if dsProposal.DataSet.FieldByName('WoInvoice').AsBoolean then // if print
the money
if (ppWorkOrder.PrinterSetup.Copies >1) and
(ppWorkOrder.AbsolutePageNo = 2) then // if 2nd copy
begin
ppLabelRptCaption.Caption := 'Invoice';
ppWoSubReportCustDirections.Visible := False;
ppWoSubReportJobInfo.Visible := False;
ppWoSubReportMoney.Visible := True;
end;

Thanks,
Mark

Comments

  • edited October 2008
    Hi Mark,

    ReportBuilder 11 includes new options for the TppSystemVariable to show the
    copy number for each separate copy of a report. If you need more
    customization than that, take a look at the following rbWiki article.

    http://www.digital-metaphors.com/rbWiki/Delphi_Code/Formatting/How_To...Unique_Caption_for_Each_Copy

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2008
    OK, I bought v11 and upgraded as well as ExtraDevices. Are there any code
    snippets to determine First Page of Second Copy?

  • edited October 2008
    Hi Mark,

    There should be no code needed. Simply place two system variables on your
    report, one set to show the page number (PageNo) and one set to show the
    copy number (CopyNo). Use the edit toolbar in the designer to adjust what
    the system variable will show (or the VarType property).

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2008
    Forgive me for being dense, but a ppSystemVariable1 set to vtPageNoDesc
    existed and I added ppSystemVariable2 and set vtCopyNo. ppWorkOrder.PageNo
    works, but the question is how to get the CopyNo variable. I can't seem to
    find it on the ppReport, the ppSystemVariable2, or the Printer, and it's not
    in Help.

  • edited October 2008
    Hi Mark,

    The new System Variable you have on your report will not show up until the
    second, third, and so on, copies of the report are printed to the printer.

    vtPageNoDesc will give you an output on your report like Page of
    .
    vtCopyNo will simply give you the copy number of the report being printed
    (only visible from the printer).

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2008
    Thanks Nico,
    The reports on set to OnePass, since we found years ago that some data was
    being repeated on output, therefore we do not have Page of . Once again, our need is to programmatically determine each Page 1 of
    3 copies. Certain bands to be visible/non-visible and report label to be
    "WorkOrder", "Invoice", or "Office Copy". This report exists in hundreds of
    customers in multiple countries. Only a couple of coustomer want this
    feature, so we can't modify the game too much. We know by data table
    settings if titles are to change. We can read the copies setting. We hoped
    you had an easier way of detemining the copy number.
    Mark

This discussion has been closed.