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!

Displaying a value where it meeta a certain criteria

Status
Not open for further replies.

Rob2k2

Technical User
Oct 14, 2002
36
GB
Is there an easy way using a formula to carry out the following:-

Display {CompPerFLOAT.Lnamnt) where

{CompPerFLOAT.Month} = '10' and
{CompPerFLOAT.Year} = '2002' and
{CompPerFLOAT.ApptoTeam} = 'N'

as the where clause doesnt seem to be valid in the formula editor.


 
Place the field in question on your report, then conditionally supress the field when the above logic is not met. To do this, right click the field, select format object, click the X-2 button to the right of the supress checkbox and enter your formula.

Please be advised that supressed objects will STILL subtotal and grand total, so if you are going to do this, just scrap the above suggestion and create a formula:

if {CompPerFLOAT.Month} = 10 and
{CompPerFLOAT.Year} = 2002 and
{CompPerFLOAT.ApptoTeam} = "N" then {CompPerFLOAT.Lnamnt) else 0

then place this formula in your report and subtotal/grand total as needed


Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
If you want to limit rows in the report to this condition, use the record selection criteria (Report->Edit Selection Formula-Record):

{CompPerFLOAT.Month} = '10' and
{CompPerFLOAT.Year} = '2002' and
{CompPerFLOAT.ApptoTeam} = 'N'

This limits the results returned to that condition, increasing performance and decreasing Crystal side processing.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top