Home » Developer & Programmer » Reports & Discoverer » Calculation help (disc 10.1.2)
Calculation help [message #428284] Tue, 27 October 2009 14:00 Go to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Hi All
In a report i have two fields:

CONTRACT_NUMBER TIME
0123 22
1254 78
6589 32
DC22 22
DC67 125

The user has the following requirement "When the contract number starts with DC, he doesnt want to see the corresponding value under TIME" , he wants the o/p as:

CONTRACT_NUMBER TIME
0123 22
1254 78
6589 32
DC22 
DC67 

TIME IS again a calculated field TIME=AVG(T1-T2).
Please need help.

Thanks
Re: Calculation help [message #428364 is a reply to message #428284] Wed, 28 October 2009 02:09 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
What are T1 and T2?

For show / hide, try writing a Format Trigger on Time field, which returns TRUE / FALSE depending on the CONTRACT_NUMBER value.
TRUE - show
FALSE - hide

By
Vamsi
Re: Calculation help [message #429958 is a reply to message #428364] Fri, 06 November 2009 08:48 Go to previous messageGo to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Thanks Vamsi instead i used the CASE function
Re: Calculation help [message #429959 is a reply to message #429958] Fri, 06 November 2009 08:50 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Post it here.
It may be helpful for others.

By
Vamsi
Re: Calculation help [message #429975 is a reply to message #429959] Fri, 06 November 2009 11:44 Go to previous messageGo to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
CASE WHEN CONTRACT_NUMBER LIKE '%DC' THEN NULL ESLE TIME ENDvamsi kasina wrote on Fri, 06 November 2009 08:50
Post it here.
It may be helpful for others.

By
Vamsi

Re: Calculation help [message #430437 is a reply to message #428284] Tue, 10 November 2009 07:15 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
That doesn't actually do what you want (ignoring the typo of ELSE). That'll suppress the time when the contract number ends with DC.
Re: Calculation help [message #430482 is a reply to message #430437] Tue, 10 November 2009 10:56 Go to previous messageGo to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Thats what i wanted, where ever the contract number starts with DC, i want to see a NULL in the TIME field.cookiemonster wrote on Tue, 10 November 2009 07:15
That doesn't actually do what you want (ignoring the typo of ELSE). That'll suppress the time when the contract number ends with DC.

Re: Calculation help [message #430486 is a reply to message #428284] Tue, 10 November 2009 11:18 Go to previous message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
Reread my post. Pay particular attention to the word in bold.
Previous Topic: Parameter Form Issues....
Next Topic: REP-1108 CANNOT FIT DEFAULT LAYOUT EVEN IN REGION EXTENDING TO PAGE BOUNDARIES
Goto Forum:
  


Current Time: Thu Sep 29 05:36:59 CDT 2016

Total time taken to generate the page: 0.05110 seconds