Print Page | Close Window

pass a value to a crytsal report

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
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=20808
Printed Date: 04 Apr 2025 at 11:43am


Topic: pass a value to a crytsal report
Posted By: chris64
Subject: pass a value to a crytsal report
Date Posted: 13 Jun 2014 at 1:21am
Hi,
 
I have a data field in my report that is sometimes empty.
 
I want to  put a value in this field if it is empty. However I cannot hardcode it in
as it will vary for each client therefore each time I run the report.
 
How can I pass the value into the report at runtime.
 
Thanks,
 
Chris



Replies:
Posted By: hilfy
Date Posted: 24 Jun 2014 at 9:20am
I would use a parameter. If you're running the report through an application you've created, you could set the value of the parameter are run time.

In the report, you would create a formula that looks something like this:

if IsNull({MyTable.MyField}) the {?MyParameter} else {MyTable.MyField}

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window