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

displaying data

edited June 2005 in General
Hi

I have the following data to be displayed

Donation Number Date Product Code
Current Status Current Location
AAAAAAAAAA 01/01/2005 D611 - PLASMA
Issued 0001 - PRE-SORT-QUARANTINE

AAAAAAAAAA 01/01/2005 0054 - RCELLS
Issued 0001 - PRE-SORT-QUARANTINE

BBBBBBBBBB 01/01/2005 0054 - RCELLS
Issued 0001 - PRE-SORT-QUARANTINE

BBBBBBBBBB 01/01/2005 0053 - RCELLS
Issued 0001 - PRE-SORT-QUARANTINE


But i want to be able to display it as :

Donation Number Date Product Code
Current Status Current Location
AAAAAAAAAA 01/01/2005 D611 - PLASMA
Issued 0001 - PRE-SORT-QUARANTINE

0054 -
RCELLS Issued
0001 - PRE-SORT-QUARANTINE

BBBBBBBBBB 01/01/2005 0054 - RCELLS
Issued 0001 - PRE-SORT-QUARANTINE

0053 -
RCELLS Issued
0001 - PRE-SORT-QUARANTINE



Each donation number can have mulitiple products but i only want to display
the donation number and date when the donation number changes.
This part of the report is in a subreport based on a client dataset.

What is the easiest way of doing this?

If using the 'OnGetText' event on the donation number and date field to
decide whether to blank the field is the best way? How can i compare the
current donation number with the previous donations number in the dataset?

Cheers
George

Comments

  • edited June 2005
    Just checked the post and the examples are all messed up
    will try again

    Data to display

    Donation Number Product Code
    AAAAAAAAA D611 - Prod1
    AAAAAAAAA 0054 - Prod2
    BBBBBBBBBB D611 - Prod1
    BBBBBBBBBB 0054 - Prod2

    Need it displaying as
    Donation Number Product Code
    AAAAAAAAA D611 - Prod1
    0054 - Prod2
    BBBBBBBBBB D611 - Prod1
    0054 - Prod2

    Question on first post
    Hope the format of above is not changed once posted?

    Cheers
    George

  • edited June 2005
    Hi George,

    If your data is sorted on the Donation Number, you are going to want to
    create a group based on that field. This can be done using the groups
    dialog (Report | Groups|... option from the designer menu). Simply set the
    grouping field to Donation Number as well as some other options then place
    the Donation number inside the Group Header band that is created. Leave the
    product code inside the detail band with other data in the group. If you
    would like to see groups in action, there are numerous group examples
    located in the \RBuilder\Demos\1. Reports\... directory (run the demo.dpr
    project).

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2005
    Thanks Nico

    That works but the problem is the product information will be on the next
    line down from the donation number.
    (If grouping on the donation number)
    If possible i would like the first product on the same line as the donation
    number and then subsequent products (from the donation donation) directly
    under the first product. This would then be repeated for each new donation
    number.

    Donation Number Product Code
    AAAAAAAAA D611 - Prod1
    0054 - Prod2
    BBBBBBBBBB D611 - Prod1
    0054 - Prod2

    Cheers
    George


  • edited June 2005
    Hi George,

    Inside the Donation Number DBText.OnCreateDrawCommand, you can access the
    draw command before it is printed to screen or printer. From here, it would
    be possible to move the text down to line up with the rest of the data.
    Something like the following will move the draw command down one inch.
    (Draw commands are all measured in microns).

    uses
    ppDrwCmd;

    procedure TForm1.ppDBText1DrawCommandCreate(Sender, aDrawCommand: TObject);
    begin
    TppDrawText(aDrawCommand).Top := TppDrawText(aDrawCommand).Top + 25400;
    end;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    Thanks that worked.

    George
This discussion has been closed.