cheerfulskeptic
Programmer
ok, I have tried and tried, but to no avail. Once more, here's my code and I'm trying to be as specific as possible:
Report Description
Main Report: SQL Server
Subreport: Pervasive SQL Server
Due to linking issues, I had to create a subreport for the Pervasive part, and thats why I need to create shared variables
Groups:
group 1 - territory
group 2 - account (contains subreport for each account)
In main report header, formula initTerritoryCats
whileprintingrecords;
Global numbervar numCatsTerritoryJul := 0;
In subreport report footer:
formula @TotJul calculates totalled value is diff for each account
then in a section below the formula @TotJul, is a shared variable formula @sharedvarnumJul
whileprintingrecords;
shared numbervar numCatsTerritoryJul := shared numbervar numCatsTerritoryJul + {@TotJul};
numCatsTerritoryJul
this should be the running total from the subreport totals.
Now finally, in the group footer in main report, I have to print the final values of the shared variable numCatsTerritoryJul
so I have formula @totTerrJul
whileprintingrecords;
shared numbervar numCatsTerritoryJul;
numCatsTerritoryJul;
That does NOT work. give me very strange values. Sometimes they work, but if I play around with the report (ie, delete blank group footers, etc.) the numbers keep changing.
Report Description
Main Report: SQL Server
Subreport: Pervasive SQL Server
Due to linking issues, I had to create a subreport for the Pervasive part, and thats why I need to create shared variables
Groups:
group 1 - territory
group 2 - account (contains subreport for each account)
In main report header, formula initTerritoryCats
whileprintingrecords;
Global numbervar numCatsTerritoryJul := 0;
In subreport report footer:
formula @TotJul calculates totalled value is diff for each account
then in a section below the formula @TotJul, is a shared variable formula @sharedvarnumJul
whileprintingrecords;
shared numbervar numCatsTerritoryJul := shared numbervar numCatsTerritoryJul + {@TotJul};
numCatsTerritoryJul
this should be the running total from the subreport totals.
Now finally, in the group footer in main report, I have to print the final values of the shared variable numCatsTerritoryJul
so I have formula @totTerrJul
whileprintingrecords;
shared numbervar numCatsTerritoryJul;
numCatsTerritoryJul;
That does NOT work. give me very strange values. Sometimes they work, but if I play around with the report (ie, delete blank group footers, etc.) the numbers keep changing.