Repeating the MasterData for n-times

edited 2:26AM in FastReport 4.0
Hi,

I tried to find a similar question like this in the database but had no luck.

I want to repeat the MasterData for n-times, where n is the number I'll set up before printing the MasterData.
The thing is that I would like the same data to be printed until the print number is equal to n, and the next data to come after this and that to be printed n-times also.


Thanks in Advance.

Comments

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 2:26AM
    Set the RowCount property of the band to your n (n *2 maybe).
    Then put some control inside the onbeforeprint event of it to get the next data to be displayed.


    zdravkin wrote: »
    Hi,

    I tried to find a similar question like this in the database but had no luck.

    I want to repeat the MasterData for n-times, where n is the number I'll set up before printing the MasterData.
    The thing is that I would like the same data to be printed until the print number is equal to n, and the next data to come after this and that to be printed n-times also.


    Thanks in Advance.
  • gordkgordk St.Catherines On. Canada.
    edited 2:26AM
    do not connect the band to a dataset set its rowcount property and control dataset positioning from script code.
    var
    ds: TfrxDataSet;

    ds := Report.GetDataset('frxDBDataSet1'); use the username of the dataset
    you can now set the ds to first, last, next, prior. you can test eof and obtain record count.
  • edited 2:26AM
    Hi Gordk -
    I need the same, can you kindly post more details about this technique?
    In which event do you put this line:
    ds := Report.GetDataset('frxDBDataSet1');
    Please be patient I am a beginner...
    Thank You - Lorenzo -
    gordk wrote: »
    do not connect the band to a dataset set its rowcount property and control dataset positioning from script code.
    var
    ds: TfrxDataSet;

    ds := Report.GetDataset('frxDBDataSet1'); use the username of the dataset
    you can now set the ds to first, last, next, prior. you can test eof and obtain record count.
  • gordkgordk St.Catherines On. Canada.
    edited 2:26AM
    ds := Report.GetDataset('frxDBDataSet1');
    place it in the empty begin end. block on the code page this is the first code to be processed
  • gpigpi
    edited 2:26AM
    Use MasterData and DetailData band. Set MasterData.Height to 0, set DetailData.RowCount to n and place memos with MasterData dataset fields on DetailData band

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.