RowCount problem

Hello,

I'm trying to display the first record only in a DetailData band, so I have set the RowCount property to 1 but it still displays all records...Is this the right way to do it ?

Many thanks,
Vasile

Comments

  • edited 11:25AM
    set the TfrxDBDataset.RangeBegine = rbCurrent and RangeEnd=reCurrent in the detail TfrxDBDataSet.
  • edited 11:25AM
    Well, I can't do that because I have a single datasource for all the bands, so for some bands I want to display the first record, for others I want to display all records...

    Vasile
  • edited 11:25AM
    I've added this possibility to 3.03.
  • edited 11:25AM
    Setting the property RowCount = 1 to a band displays the first record only which is OK but in this case the FR enters an infinite loop which creates a huge number of pages (every band gets displayed again and again, I have stopped it after 1500 pages...).

    If you set RowCount = 2 for example everything works fine.
    I have tested this under C++Builder 6. The dataset has 3 records, all bands have the same dataset.

    Thanks,
    Vasile
  • edited 11:25AM
    It works fine for me at least on demo reports.
  • edited 11:25AM
    OK, I have tested the demo reports and it seems to work fine.

    But I'm using C++Builder 6 and it doesn't work properly...maybe the BCB is the cause?

    You can reproduce this easily:

    1. Open C++Builder 6
    2. Drop a FastReport and a BDE table linked to DBDEMOS->Biolife table onto the main form
    3. Drop a TFrxdataset component
    4. Link BDETable to TFrxdataset
    5. Link TFrxdataset to FastReport
    5. Make BDETable active
    6. Design report
    7. Goto Report->Data... menu and select frxDBDataset1
    8. Drop a MasterData band onto the report and assign frxDBDataset1 as datasource
    9. Drop a couple of fields onto the band
    10. Set the property RowCount = 1 for the MasterData band
    11. Preview the report

    You sould see lots of pages that are being produced.
  • edited 11:25AM
    You shouldn't link a dataset to the TfrxReport.DataSet!
  • edited 11:25AM
    OK, I have tried again:

    In C++Builder 6:

    It works fine if you have only one detail band, but if you place onto the report 2 Detail bands linked to the same datasource, and set RowCount = 1 for both it won't work (it will produce lots of pages).

    In Delphi 7: It works perfectly !

    So, the C++Builder 6 version of FR3 seems to have some problems...

    Regards,
    Vasile

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.