Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report to replace an item with a blank

Status
Not open for further replies.

mrnez

Technical User
Sep 11, 2002
37
GB
Hello

I have the current formula which works ok

{version_jazchar.data_type} = 1 and
{dir_common.name} = "GEN XMIT" and
{file_common.edit_time} >= Dateadd("h",-5,CurrentDateTime) and not
({user_table.user07} in ["BRIEF","PRESS","QUOTE","SCHEDULE","PEOPLE"])

I want the formula to look at a field and if it contains a # replace it with a blank

I though this would have worked but it is not the case

{version_jazchar.data_type} = 1 and
{dir_common.name} = "GEN XMIT" and
{file_common.edit_time} >= Dateadd("h",-5,CurrentDateTime) and not
({user_table.user07} in ["BRIEF","PRESS","QUOTE","SCHEDULE","PEOPLE"]) and
if {file_common.slug} = "#" then {file_common.slug} = " "

Many thanks in advance

Richard
 
Is this a record selection formula?

You need to create a separate formula for just:

if {file_common.slug} <> &quot;#&quot; then
{file_common.slug}
else
&quot;&quot;
and use it in your report in lieu of the field {file_common.slug}.

-k

kai@informeddatadecisions.com
 
Hi

Yes it is a record selection formula. Sorry for the ignorance but how do I create a seperate formula

Many thanks

Richard
 
Richard,

A record selection formula must evaluate to true or false. True records are included in the report, false records are discarded. When you add the last line of code:

if {file_common.slug} = &quot;#&quot; then {file_common.slug} = &quot; &quot;

This ceases to be a true/false formula, also known as a boolean formula.

Leave the first 4 lines of code as they are to act as your boolean record selection formula.

Create a new formula, insert, field object, formula field and use the formula SV suggested:

if {file_common.slug} <> &quot;#&quot; then {file_common.slug} else &quot;&quot;

The drag this formula to the details section of the report in place of where the database field {file_common.slug} is.





Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Hello

Many thanks yet again for this excellent forum you have once again solved a problem for me.

Rich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top