Crytal Report Variable

mrkamran
10-15-2004, 06:35 AM
Hi,
i have 2 groups in my report. in group #1's footer, i have 2 subtotals field and 1 formula field which calculate sum of field1 - sum of field2.
Now at the end of report i want to sum up the formula values. what should i do bccause this formula can not be sumerized.
Now i declare a variable initiate it on report header as the following code:

Global NumberVar Amt;
Amt:=0;

After this i use another formula and place it in the footer of group1 as that code :

WhileReadingRecords;
Global NumberVar Amt;
DrAmt:=DrAmt+ {@MainAmt};

But i get an error "This Formula cannot be used becuase it must be eveluated later"

what should i do?

thanks

MKoslof
10-15-2004, 07:05 PM
What you should do instead is used a shared variable..this will allow you to simply pass in the variable value, which can be accessed at any point in the Crystal Report object. So instead, you code would look like:



DrAmt:=DrAmt + mySharedVariable

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum