Durango122
MIS
hi All
cr 9.0
ms sql
i have this report that contains 2 subreports
1. i have these amount
sub report 1YTD sub report 2 Rep_Count
1062875/5294
1019197/4397
556346/4080
1123620/3837
409887/2801
3211420/1916
523793/2512
410306/2956
264899/2051
395437/3988
70871/1790
68954/2511
i'm dividing YTD by Rep_Count as you can see there no sero anywhere to be found
im using a shared variable to pass it to the main report.
in one of my sub report i'm using a count of rep
-------------------------------------------
here are my formula for the sub report YTD
@Total
WhilePrintingrecords;
shared NumberVar Sub2Total:={@Sum_YTD}
the formula for the @Sum_YTD is this
sum({@YTD_SLS},{TERR1_LIST.DESCRIPTION})
the YTD_SLS formula is this
if
{TRANSACTION_HISTORY.POSTING_DATE} in Date(year({?sub2_End_Date}),1,1) to
Date(Year({?sub2_End_Date}),Month({?sub2_End_Date}),day({?sub2_End_Date}))
and
{TRANSACTION_HISTORY.TRADE_CLASS} = "S"
then
{TRANSACTION_HISTORY.GROSS_AMOUNT else
0
-------------------------------------
for the rep sub report i have these formula
@Count_Rep
if
{CONTACT.CSTM_Active_Status} = "Active"
then
{TERR1_LIST.DESCRIPTION}
formula for total rep
@Total_Rep
count({@Count_Rep})
formula Total
WhilePrintingRecords;
Shared NumberVar Sub1Total:={@Total_Rep}
in my main report i have this formuls shared variable
@Sub_Total
WhilePrintingrecords;
Shared NumberVar Sub1Total;
Shared NumberVar Sub2Total;
Sub2Total/Sub1Total
i have no 0 anywhare but still gives division by sero error
Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
cr 9.0
ms sql
i have this report that contains 2 subreports
1. i have these amount
sub report 1YTD sub report 2 Rep_Count
1062875/5294
1019197/4397
556346/4080
1123620/3837
409887/2801
3211420/1916
523793/2512
410306/2956
264899/2051
395437/3988
70871/1790
68954/2511
i'm dividing YTD by Rep_Count as you can see there no sero anywhere to be found
im using a shared variable to pass it to the main report.
in one of my sub report i'm using a count of rep
-------------------------------------------
here are my formula for the sub report YTD
@Total
WhilePrintingrecords;
shared NumberVar Sub2Total:={@Sum_YTD}
the formula for the @Sum_YTD is this
sum({@YTD_SLS},{TERR1_LIST.DESCRIPTION})
the YTD_SLS formula is this
if
{TRANSACTION_HISTORY.POSTING_DATE} in Date(year({?sub2_End_Date}),1,1) to
Date(Year({?sub2_End_Date}),Month({?sub2_End_Date}),day({?sub2_End_Date}))
and
{TRANSACTION_HISTORY.TRADE_CLASS} = "S"
then
{TRANSACTION_HISTORY.GROSS_AMOUNT else
0
-------------------------------------
for the rep sub report i have these formula
@Count_Rep
if
{CONTACT.CSTM_Active_Status} = "Active"
then
{TERR1_LIST.DESCRIPTION}
formula for total rep
@Total_Rep
count({@Count_Rep})
formula Total
WhilePrintingRecords;
Shared NumberVar Sub1Total:={@Total_Rep}
in my main report i have this formuls shared variable
@Sub_Total
WhilePrintingrecords;
Shared NumberVar Sub1Total;
Shared NumberVar Sub2Total;
Sub2Total/Sub1Total
i have no 0 anywhare but still gives division by sero error
Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40