Print Page | Close Window

Parameter setup query

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Announcements
Forum Discription: Please check this section for the latest announcements from Crystal Reports Forum
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19510
Printed Date: 26 Apr 2024 at 5:54am


Topic: Parameter setup query
Posted By: Gerard Boyle
Subject: Parameter setup query
Date Posted: 06 May 2013 at 10:40pm
I am new to Crystal Reports and have a query as to how I resolve an issue that I have with a report. I need to be able to run the report in 2 different ways and want to be able to allow this to be controlled by a parameter. I have a field in a table acctrans.outsbal which contains the outstanding balance on a customers account. I want to be able to run this report to select the customers either when the outsbal is = 0 or when it is <> 0.
How can I create a parameter to allow me to select which way I want the report to run.



Replies:
Posted By: Abhi
Date Posted: 09 Jun 2013 at 6:36am
Hi Boyle

Well you can do this

Step 1: create a static parameter {?balance} with two user input values as balance zero and balance not zero.

Step 2: Goto report selection formula now and write this below code.

if {?balance} = "balance zero" then
acctrans.outsba = 0
else
{?balance} = "balance not zero" then
acctrans.outsba <> 0

Note: All you you need to make sure that DB field outsba is Key figure.

Thanks
Abhi



Print Page | Close Window