How to control footer in the report ?

My report is having body PurchTable having two section groups One Purch Line and another for VendPackingSlipJour

So for each PO am printing all lines and all packing slips.And i have taken footer section under PurchLine

so that after all lines finished total should be displayed.

For e.g PO :1000001

item1 10

item2 20

total 30



Now the problem is if PO has packing slip then footer is displaying after packslips section and if it has no packingslip then footer is displaying after itemline section correctly.

I want footer to be displayed after itemline section,no matter if it has packing slip or not.

because first section groups will execute and then footers will execute…so all section groups( Purch Line and VendPackingSlipJour in your case) will execute first and then footer.

if you are writing fetch method, use programmable section to print the packing slips so that you can print that packing slip after the footer also if you want…

Basically footer display the data at the end of the page. for your requirement try taking the programmable section and execute it.

Hi Ven,

Thank you for info now i got it why this is priting after vendpackingslipjour. But i tried that executesection but failed.I created new programmable section(1).

And executed it in Purchline section group…what is happening is …each line it is showing the total

For eg. item1 10 total 10

item2 20 total 30

Footer will display at end of every page.For that we will use footer

just try to calculate the total in fetch method it self and store it in a variable in fetch itself.

override executesection() method of the footer and execute programmable section before the super().

try it and let us know…

1.Removed datasources and used query

2.Removed footer

3.Used fetch method and after printing lines ->element.send(purchLine) called execute section for Total

4.Called packingslip ->element.send(vendPackingSlipJour)