Hi Brian, Thanks - thought you were onto something (and you might well still be) but replacing " " with 0 gives the same result - I'm missing something here which is annoying I'll have to play further and re think maybe using apply.format type formulas to try and sort it. Your Cases scenario accepted - guess I've got into habit (probably for no good reason) of using If/else when limited choices and Case statements when it grows bigger than 4 or 5 or so
Cheers Colin ----- Original Message ----- From: "Brian Hancock" <[EMAIL PROTECTED]> To: "Dataperfect Users Discussion Group" <[email protected]> Sent: Tuesday, 12 June 2007 15:33 Subject: Re: [Dataperf] Not printing zero'd decimal fields > By the way Colin, > > The formula > IF RV150 = "Y" THEN 48.00 > ELSE IF RV150 = "O" THEN RV151 > ELSE IF RV150 = "N" OR RV150 = " " THEN " " > ENDIF ENDIF ENDIF > > can be made more readable with a CASES construct > > rv150 CASES > CASE cv="Y" OF 48.00 ENDOF > CASE cv="O" OF rv151 ENDOF > CASE cv="N" OF "" ENDOF > CASE cv="" OF "" ENDOF > ENDCASES > > or even > > rv150 CASES > CASE cv="Y" OF 48.00 ENDOF > CASE cv="O" OF rv151 ENDOF > DEFAULT "" > ENDCASES > > although this might have just been an oversight in the example, you possibly > should be checking that the value being returned by this formula is either > text or a number. The "Y" case is returning a number and the "N" and "" > case are returning text. > > Regards > Brian > > > > ----- Original Message ----- > From: "Colin Roberts" <[EMAIL PROTECTED]> > To: "Dataperfect Users Discussion Group" <[email protected]> > Sent: Tuesday, June 12, 2007 11:33 AM > Subject: Re: [Dataperf] Not printing zero'd decimal fields > > > > Hi Jim, > > > > The 9 forces that digit to print if zero so $10.10 doesn't print as $10.1 > > and it is a RV that I'm trying to print > > RV 155 is > > IF RV150 = "Y" THEN 48.00 > > ELSE IF RV150 = "O" THEN RV151 > > ELSE IF RV150 = "N" OR RV150 = " " THEN " " > > ENDIF ENDIF ENDIF > > > > RV 151 is a prompted report variable where the actual amount is manually > > entered at time of report. I'm convinced I've done this before - just > > can't > > find an example of it in all the reports I have - so maybe I haven't.??? > > > > Colin > > > > ----- Original Message ----- > > From: "J Bradley" <[EMAIL PROTECTED]> > > To: "Dataperfect Users Discussion Group" <[email protected]> > > Sent: Tuesday, 12 June 2007 12:55 > > Subject: RE: [Dataperf] Not printing zero'd decimal fields > > > > > >> A couple of thoughts: > >> > >> 1. eliminate the 9 from your field format e.g. Gz,zzz.zz instead of > >> Gz,zzz.z9 > >> > >> 2. Use a report variable, e.g. if p1f9 > 0 then p1f9 else "" endif (not > > sure > >> if that will work but it might lead you toward a solution > >> > >> Good luck! > >> > >> Jim > >> > >> > >> > >> -----Original Message----- > >> From: [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] Behalf Of Colin Roberts > >> Sent: June 11, 2007 8:43 PM > >> To: Dataperfect Users Discussion Group > >> Subject: [Dataperf] Not printing zero'd decimal fields > >> > >> > >> Hi All, > >> > >> Trying to NOT print zero'd decimal fields - and not getting there :-( > >> > >> Take a GZZZ.Z9 field and print as HZZZ.Z9 and if field is zero, still get > >> .00 printing. Can achieve with ;;E designator but then $48.00 prints as > > $48 > >> Ideally when the dollars are greater than 1, I want the cent value to > > print > >> even if the cents are zero - just want it to be blank/(print nothing) > >> when > >> both the dollars and cents are zero. Used H fields before successfully > >> but > >> this must be the first time that I've included a decimal point. Shock - > >> horror when it didn't work > >> I'm sure there's a work-around - Anyone know of one? ( I'm using DP26X) > >> Thanks > >> > >> Regards > >> > >> Colin Roberts > >> > >> _______________________________________________ > >> Dataperf mailing list > >> [email protected] > >> http://lists.dataperfect.nl/mailman/listinfo/dataperf > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.5.472 / Virus Database: 269.8.13/844 - Release Date: > >> 11/06/2007 > >> 5:10 PM > >> > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.5.472 / Virus Database: 269.8.13/844 - Release Date: > >> 11/06/2007 > >> 5:10 PM > >> > >> _______________________________________________ > >> Dataperf mailing list > >> [email protected] > >> http://lists.dataperfect.nl/mailman/listinfo/dataperf > > > > _______________________________________________ > > Dataperf mailing list > > [email protected] > > http://lists.dataperfect.nl/mailman/listinfo/dataperf > > > > _______________________________________________ > Dataperf mailing list > [email protected] > http://lists.dataperfect.nl/mailman/listinfo/dataperf _______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf
