Print Page | Close Window

Parameter Select Formula

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22588
Printed Date: 28 Apr 2024 at 8:14pm


Topic: Parameter Select Formula
Posted By: ridershaun
Subject: Parameter Select Formula
Date Posted: 04 May 2018 at 7:36am
I'am trying to create a report where based on a parameter value of *, it converts that to "00" since that is what the value translates to in my data and I keep getting a error message. What I want to happen is when a user enters either the first two or three selections and puts an asterisk in the third or fourth parameter field it will change that asterisk to "00" to be able to pull back the correct information on the report. Please see below for the current formula I'm using. Any help would be appreciated. Thank You

{ICITEMCODE.ICFAMILY} = {?Family} and
{ICITEMCODE.ICSEGMENT} = {?Segment} and
if {?Class}="*" then "00" else {ICITEMCODE.ICCLASS} = {?Class} and
if {?Commodity}="*" then "00" else {ICITEMCODE.ICCOMMODITY} = {?Commodity}




Replies:
Posted By: kevlray
Date Posted: 07 May 2018 at 7:16am
First off, in the select expert.  All results have to evaluate to a True or False.  Thus where you have {?Class} = "*" then "00" does not evaluate to a True/False (same for the next statement).  You may be able to develop a separate formula (which you can still use in the selection criteria), but it either have to return a True/False or be used in the selection criteria so that it returns a True/False



Print Page | Close Window