How to get DetailBand to print 'n' rows.

Hi

I have a MasterDetail report where I need to print 10 rows for the Detail. The MasterData prints the Master data needed, but the DetailData only prints the query results.

The query for the Detail will always return at least 1 value, but for proper design structure and report conformity, 10 lines need to printed in total, so even if the query returns 1 result, another 9 blank rows need to be printed underneath it. How is this done?

I have tried to use the Add Child, but that then just adds a Blank row after each Detail loop. I need the Detail loop to run and finish, and once done, needs to print the remaining rows?

Using Delphi 10 Seattle and FR5 Embarcadero Edition.

Thanks in advance.

Comments

  • gpigpi
    edited 6:14AM
    Add second DetailData2 band with RowCount = 1 with empty TfrxMemoViews and set DetailData2.RowCount = 9 - DetailData1.RecordCount
  • edited October 2016
    gpi wrote: »
    Add second DetailData2 band with RowCount = 1 with empty TfrxMemoViews and set DetailData2.RowCount = 9 - DetailData1.RecordCount

    Hi, thanks for that.

    Where must I put the code 'DetailData2.RowCount = 9 - DetailData1.RecordCount' as I cannot access the DetailData2 from the Delphi source code.

    Thanks
  • gpigpi
    edited 6:14AM
    wrote:
    I cannot access the DetailData2 from the Delphi source code
    You can. Use TfrxDetailData(frxReport1.FindObject('DetailData2')).RowCount :=
  • edited 6:14AM
    gpi wrote: »
    gpi wrote: »
    I cannot access the DetailData2 from the Delphi source code
    You can. Use TfrxDetailData(frxReport1.FindObject('DetailData2')).RowCount :=

    Thank you very much, that did the trick >  .

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.