Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula Field

Status
Not open for further replies.

saran26

Programmer
May 20, 2008
173
0
0
US
Hi All,

My query returns the following values.

ClearQuest.id
ClearQuest.iterations
ClearQuest.testlogs_iteration

for a distinct value of an id , I need to check whether the ClearQuest.iterations is equal to ClearQuest.testlogs_iteration and then I have to increment the counter by one if it is equal otherwise i have to skip incrementing the counter.

Finally, I have to display the counter grouped by plan.

I have written the following code in a formula field and tried displaying the counter, but it is not displaying the exact value , it just displays zero.

Please help me out.

whileprintingrecords;
numbervar i;

if ({ClearQuest.iterations}={ClearQuest.testlogs_iteration}) then i=i+1;
i

Thanks

Saran
 
Have you tried using the DistinctCount summary function?

MrBill
 
Distinctcount({ClearQuest.iterations})-Distinctcount({ClearQuest.testlogs_iteration})

No variables needed.


Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top