Report Writing with Crystal Reports 2011\Advanced Formulas\Some MET/CAL Example Formulas

The following formulas are commonly used in record selection formulas.

Formula

Purpose

{Assets.lActive} <> 0

Only include active Assets

{AssetServices.tNextMaintDate} <= {@DateLimit}

Calibration due at or before limit defined in @DateLimit formula

IsNull({CallSheets.tMaintDate})

Test if cal date is null

{CallSheets.tMaintDate} = DATE(0,0,0)

Test if cal date is null

{Assets.cID} = {?Asset Number}

Filter Assets by Asset number entered via user prompt

LooksLike ({Assets.cModelNumber},'H?’)

Include Assets whose model starts with H

{Assets.cDisposition} IN ['In Service', 'Out of Service', 'Lost', 'Scrapped'] OR ISNULL({Assets.cDisposition})

Filter Assets by disposition, based on an array of hard-coded values

{Assets.cModelNumber} in [‘55?’, ‘57?’]

Filter Assets by model with wildcards

{AssetServices.tNextMaintDate} IN Next30Days

Will only print for due dates that fall within the next 30 days from today

Total Records Printed: +ToText (Count ({Assets.nAssetUID}),0 )

Prints number of records

Print Date: +ToText (Today)+" at "+Now

Prints the date and time on the report

Top of Page