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 8:43PM
    set the TfrxDBDataset.RangeBegine = rbCurrent and RangeEnd=reCurrent in the detail TfrxDBDataSet.
  • edited 8:43PM
    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 8:43PM
    I've added this possibility to 3.03.
  • edited 8:43PM
    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 8:43PM
    It works fine for me at least on demo reports.
  • edited 8:43PM
    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 8:43PM
    You shouldn't link a dataset to the TfrxReport.DataSet!
  • edited 8:43PM
    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