robmason10
Technical User
I now have a report that contains 3 subreports in DetailsA - these subreports have all their sections individually supressed but pass a variable to the main report which uses a formulae (shown below) to display the required field in DetailsB - DetailsA is set to 'Underlay following sections' so that the subreports are effectively hidden and only the shared variable details are shown.
This all works fine when I am using the report for a single record selection but when I want multiple records the variables shows previous evaluations due to much of the data being NULL
i.e.
Record 1 123 345 567
Record 2 abc cde efg
Record 3 abc cde F12
when I know cols 1 and 2 for record 3 are blank in the data - basically the Shared variable is not re-evaluating if the data is null - doe stht make sense?
Shared Variable creation in subreport:
//@CostToDate
//Stores the Cost to date of the
//{tblAccountLedger.monAccountLine} field
//in a currency variable called 'CostToDate'
WhilePrintingRecords;
Shared currencyVar CostToDate := Sum ({tblAccountLedger.monAccountLine})
Retreival of shared variable in Main report:
//@CostToDate
//Returns the value that was stored
//in the shared currency variable called
//CostToDate in the subreport
WhilePrintingRecords;
Shared CurrencyVar CostToDate;
CostToDate
make any sense to anyone?
This all works fine when I am using the report for a single record selection but when I want multiple records the variables shows previous evaluations due to much of the data being NULL
i.e.
Record 1 123 345 567
Record 2 abc cde efg
Record 3 abc cde F12
when I know cols 1 and 2 for record 3 are blank in the data - basically the Shared variable is not re-evaluating if the data is null - doe stht make sense?
Shared Variable creation in subreport:
//@CostToDate
//Stores the Cost to date of the
//{tblAccountLedger.monAccountLine} field
//in a currency variable called 'CostToDate'
WhilePrintingRecords;
Shared currencyVar CostToDate := Sum ({tblAccountLedger.monAccountLine})
Retreival of shared variable in Main report:
//@CostToDate
//Returns the value that was stored
//in the shared currency variable called
//CostToDate in the subreport
WhilePrintingRecords;
Shared CurrencyVar CostToDate;
CostToDate
make any sense to anyone?