Home End User
New Blog Post: Email: Multi-Service

Last item repeated on next page of subreport

Hello
I have a simple report - Quotation, quote header and quote items.
The items are in a subreport - detail section. The subreport is in the detail of the layout, with group header on "quoteno". If the report goes over to 2 pages, the last item repeated on next page of subreport as its first item. I've never had this on my old reports or Rb. Any suggestions to what I might try ? I use Delphi 10.3, Mysql with FireDac, Rb Ent v21.0 build 170
Thanks Andy

Comments

  • Hi Andy,

    1. Are you using the RB Data workspace to build and link the query's? If not make sure the datasets are linked correctly. Here's an rbWiki article with details for data linking

    https://rbwiki.digital-metaphors.com/data-access/database/linking-sql-queries/

    2. Try setting Report.PreviewFormSettings.SinglePageOnly True. This will generate report preview pages in the main thread.

    3. As a test try commenting all event-handler code, make sure there is no code that manipulates the data while the report is generating.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Hi Nard
    Its 2 straight select queries for the data,1 record for header and about 20 for the items. To test I've put a grid before the print to see the data and there are no dupes. The duplication changes with where the page break is, i.e. if I make the group header larger its further down. There are no event handers. Preview is single page only. I'm not linking queries. There are two pipelines 1 for header, 1 for items.
    Thanks Andy
  • An update. I have a quote that goes over 3 pages. The last item on each page is repeated as the first item on the new page. I recreated the report on the old version in Delphi 7 and it doesn't repeat.
  • Hi Andy,

    Please create a simple example project I can build and run in the debugger. Use only standard Delphi components and RB. Copy data to TClientDataSets. Send in zip format to support@.


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Hi Nard
    Which dataset component do you want me to use ? Is FireDAC ok ?
    Andy
  • Hi Andy,

    I need an example that uses TClientDataSets. This enables the example to be self contained - the required mySQL data will be stored within TClientDataSets. The example will not require mySQL or FireDAC.

    At Delphi design-time add a TClientDataset to form/datamodule. Set FDQuery.Active True. Right mouse over ClientDataSet and select Assign Local Data..., then from the dialog select the FDQuery. The data will be copied to the ClientDataSet. Do this for each FDQuery. Then delete the FDQuery objects.

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.