Recent

Author Topic: Need help on LazReport  (Read 2215 times)

Robbie

  • Newbie
  • Posts: 2
Need help on LazReport
« on: September 14, 2016, 08:00:52 am »
Hi Everyone,
I need help in designing a Payslip using LazReport.

I have managed created Master/Detail Relationship:
Table_1 (or frDBDataset1)
(ID,SALARY,EXPENSES)
(151,1000,)
(165,1500,100)

Table_2 (or frDBDataset2)
(ID,DATE,EXTRA)
(151,01/08,0)
(151,02/08,10)
(151,03/08,0)
(165,01/08,50)
(165,02/08,100)
(165,03/08,100)
etc

I need them to be display as follows for each ID:
=====================
ID - 151

Date    Extra         SALARY - 1000
01/08  0               Expenses - 0
02/08  10
03/08  0               Total - 1010
======================
ID - 165

Date    Extra         SALARY - 1500
01/08  50             Expenses - 100
02/08  100
03/08  100           Total - 1650
======================

on my Main Report Page, I have :
1. GroupHeader Band (with Condition frDBDataset1.ID)
2. MasterData Band (frDBDataSet1)
3. SubReport Object.

on SubReport Page:
1. MasterData Band. (frDBDataSet2)

The Problems I have the SubReport keeps repeating itself, and I have no way of Linking them. I've read the FastReport Manual, and unable to locate "PrintOnParent" properties. I think this could help me, but I couldn't find it anywhere in LazReport.

By the way, Master Detail Relationship has been set and working properly. Tested using dbGrid1 and dbGrid2.
so Query is not an issue.

If anyone could point me in the right directions.

Thanks
Robbie.



Robbie

  • Newbie
  • Posts: 2
Re: Need help on LazReport
« Reply #1 on: September 14, 2016, 08:14:26 am »
Additional Info,
I've attached a screenshot of the Report Designer.
The data on my first post was simplified where as the screenshot a bit more complex.
but the Main issue is the SubReport doesn't follow the ID as describe.
in my screenshot the ID was 151 and 413.

Thank You.