Hello All,
I am having a structure of this report:
Group Header 1#: Account No.(different Accounts)
Group Header 2#:Type{Short-Medium} for each account
Details: {@Amount}, {Market_Total}
Group Footer 2#: {@sum_Type}, {@sum_Market_Total}
Group Footer 2#: {@grand_sum_Type}, {@grand_sum_Market_Total}
Now, In my case I tried to use the running totals in my report, but I can't because in the {@Amount}, {Market_Total}, I am using if statements to refer to fields and do some calculations, so I used the technique which was given by lbass:
//{@reset} to be placed in GH#1:
whileprintingrecords;
numbervar sumpct;
if not inrepeatedgroupheader then
sumpct := 0;
//{@accum} to be placed in the detail section (if that's where the percentages are):
whileprintingrecords;
numbervar sumpct := sumpct + {@yourpctformula};
numbervar grtotal := grtotal + {@yourpctformula};
//{@displaygrp} to be placed in the GF#1:
whileprintingrecords;
numbervar sumpct;
//{@displaygt} to be placed in the report footer:
whileprintingrecords;
numbervar grtot;
and it is giving the totals, but it is not reseting when the account number is changing, it is keeping on adding the sum amount.
So, what do you suggest to do in the {@reset formula}
//{@reset} to be placed in GH#1:
whileprintingrecords;
numbervar sumpct;
if not inrepeatedgroupheader then
sumpct := 0;
I am having a structure of this report:
Group Header 1#: Account No.(different Accounts)
Group Header 2#:Type{Short-Medium} for each account
Details: {@Amount}, {Market_Total}
Group Footer 2#: {@sum_Type}, {@sum_Market_Total}
Group Footer 2#: {@grand_sum_Type}, {@grand_sum_Market_Total}
Now, In my case I tried to use the running totals in my report, but I can't because in the {@Amount}, {Market_Total}, I am using if statements to refer to fields and do some calculations, so I used the technique which was given by lbass:
//{@reset} to be placed in GH#1:
whileprintingrecords;
numbervar sumpct;
if not inrepeatedgroupheader then
sumpct := 0;
//{@accum} to be placed in the detail section (if that's where the percentages are):
whileprintingrecords;
numbervar sumpct := sumpct + {@yourpctformula};
numbervar grtotal := grtotal + {@yourpctformula};
//{@displaygrp} to be placed in the GF#1:
whileprintingrecords;
numbervar sumpct;
//{@displaygt} to be placed in the report footer:
whileprintingrecords;
numbervar grtot;
and it is giving the totals, but it is not reseting when the account number is changing, it is keeping on adding the sum amount.
So, what do you suggest to do in the {@reset formula}
//{@reset} to be placed in GH#1:
whileprintingrecords;
numbervar sumpct;
if not inrepeatedgroupheader then
sumpct := 0;