Recent

Author Topic: [SOLVED] How to print 2 datasets in the same report  (Read 2860 times)

pbruccoleri

  • New Member
  • *
  • Posts: 28
[SOLVED] How to print 2 datasets in the same report
« on: October 02, 2012, 07:40:10 pm »
I have a form with two grids: one showing a detailed listing, and the other grid, shows summary data for payment.
Now, when I set the report, in the band master data put objects with data grid1 query, for example: [qry."Date"], etc. ..

Now at the end of the report, after the totals, I place the summary data grid.

At the foot band teacher put the totals, and down,  the data from the second query
[qryFormasPago."code"] [qryFormasPago."amount"]

obviously only displays the first record in the query ... because there's something I'm doing wrong.
what would be the bands to use and in what order?
How can you solve this? very thanks..
« Last Edit: October 03, 2012, 02:52:19 pm by pbruccoleri »

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: How to print 2 datasets in the same report
« Reply #1 on: October 02, 2012, 08:21:43 pm »
sorry you lost me. What is the exact relationship of the two queries on the screen when you scroll to a new record do the summaries change to show that records summaries or they always show the summaries from all the records on the master grid?

Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

pbruccoleri

  • New Member
  • *
  • Posts: 28
Re: How to print 2 datasets in the same report
« Reply #2 on: October 02, 2012, 09:12:11 pm »
Hello taazz
2 queries are unrelated. In the first grid show total sales between two dates, in the 2nd grid show sales totaled by payment type.
not a master / detail between the two.

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: How to print 2 datasets in the same report
« Reply #3 on: October 03, 2012, 09:57:36 am »
In that case you add two master Data bands link them to the respective datasets and place them as you want the data to flow eg first the band with the sales fields then the band with the totals.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

pbruccoleri

  • New Member
  • *
  • Posts: 28
Re: How to print 2 datasets in the same report
« Reply #4 on: October 03, 2012, 02:51:58 pm »
Hello
Well, in the end I settled with these bands:
master header
master data

master header
master data
(for the second query)
very thanks!