Tuesday, July 10, 2012

SubjectsAll dynamic prompt for Crystal


The prompt group 'RDS SubjAll M' in Crystal Reports requires logic in the Record Selection formula to account for the ' All' value for all subjects. Below is an example of how to construct the query:

if ({?Subject} <> " All") then 
({?Subject} = {RDS_CLASS_VW.CLASS_SUBJECT_CD} and
{?Institution} = {RDS_CLASS_VW.CLASS_INSTITUTION_CD})
else
{?Institution} = {RDS_CLASS_VW.CLASS_INSTITUTION_CD}

If the Subject parameter equals ' All' we simply ignore it.

No comments:

Post a Comment