Skip to Content
0
Former Member
Feb 18, 2011 at 12:17 AM

sub-report variable on main report

26 Views

HI Forum,

I have a report with a sub-report.

I am trying to have the sub-report to get an item "price" from a salesorder on a given year in this case 2010... i get that with a shared variable... the sub-report prints the correct value.... except that i am using that shared variable to calculate the GP margin on the main report.

On the main report the value is the one from the last salesorder in the table.

Question:

How can i get the report to give me the correct "price", the price that printed on the sub-report?

this is my formula:

Sub-report

whileprintingrecords;

shared numbervar price;

price:=itemprice

Main report

whileprintingrecords:

shared numbervar price;

price

Any suggestions will be greatly appreciated.

Regards,

Manuel Roman