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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The remaining text doesnt appear to be part of the formula

Status
Not open for further replies.

JCooL

Programmer
Oct 21, 2001
89
US
Hi guys...

i try to do this...

*Crystal 8.5

Sum(IIf({MODELO_REPARACIONES.garantia}='1',1,0)).. and show me the message ...


Thanx
 
Is this the whole formula??? or just a part of it?

I have never tried to use IIF() in a summary function...If it worked that would be neat....but perhaps that cannot be done.

I can see nothing wrong if IIF is allowed, Also assuming that there is nothing missing in a formula .....

for example: this error commonly occurs when there is a missing semicolon (;) at the end of a statement.

A work around is to use a 3-formula sum

@initialization (suppressed in the header)

WhilePrintingRecords;
if not in repeatedgroupheader then numbervar total := 0;


@CalcSum (suppressed in the details)

WhilePrintingRecords;
numbervar total ;

if {MODELO_REPARACIONES.garantia} = '1' then
total := total + 1;


@DisplayTotal (placed where you want in the footer
WhilePrintingRecords;
numbervar total ;

total ; Jim Broadbent
 
Or you might just create a formula in the detail with part of your formula as the criteria:

IIf({MODELO_REPARACIONES.garantia}='1',1,0)

Now just right click and use an insert summary to create whatever subtotal/total you need.

-k kai@informeddatadecisions.com
 
Thank Guys!

I resolved the problem, its working perfectly with those ways...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top