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

Problem printing 2 copies of same fist label after skipping

edited June 2001 in General
The skipping itself works fine now I'm using the last sample you created,
but I'm still having the same problem trying to print 2 copies of the
same label. I've set BandsPerRecord to 2 but the first label is only
printed once. All other labels are printed twice as they should !

In article <8EAE82296ACCD311A039005004E0CAC003D292@DMSERVER>,
support@digital-metaphors.com says...

Comments

  • edited June 2001
    You'll need to set BandsPerRecordCount to 1 in this case. It is a read only
    property. However, you can open ppBands.pas and change the
    DetailBand.BandsPerRecord property to writeable. Then you can set it to 1
    when the skipping has finished, in the DetailBand.BeforePrint in the demo.
    Be sure your new ppBands.pas is linked into your project.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2001
    Can you tell me exactly what I have to change because I don't know what to
    look for.

    Thanks,
    Harry.
  • edited July 2001
    When the detail band prints, the detail band count isn't getting reset when
    you assign the detail band count. So, open ppBands.pas in your installed
    RBuilder\Source. Change the Detailband.SetBandsPerRecord method as shown
    below. Change your library path in the environment options to include
    ..\RBuilder\Source instead of ..\RBuilder\Lib


    {---------------------------------------------------------------------------
    ---}
    { TppDetailBand.SetBandsPerRecord }

    procedure TppDetailBand.SetBandsPerRecord(aValue: Integer);
    begin

    if (aValue < 1) then
    FBandsPerRecord := 1
    else
    FBandsPerRecord := aValue;

    FBandsPerRecordCount := 1; <--add this line

    Reset;

    end; {procedure, SetBandsPerRecord}



    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.