Displaying the results of a formula (1 Viewer)

shabbaranks

Registered User.
Local time
Today, 17:24
Joined
Oct 17, 2011
Messages
300
Hi,

Im trying to work out how I show only fields which have text in them. For this I have a formula which works out if that field is true or false (contains text or not) and now Im trying to display the ones which show text only.

I've managed to do this within the supress format but because I think I'll be using this in a command object I need to do the filtering within an additional formula or something else?

Thanks
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:24
Joined
Feb 19, 2013
Messages
16,553
do you want to rephrase what you are trying to do, I cannot make sense of what you are saying

show only fields which have text in them - show where? form? report?

within the supress format - what does this mean?

I'll be using this in a command object - what does this mean?

filtering within an additional formula - what does this mean?
 

shabbaranks

Registered User.
Local time
Today, 17:24
Joined
Oct 17, 2011
Messages
300
Thanks for the reply, and apologies for not being clear. What I mean is:

do you want to rephrase what you are trying to do, I cannot make sense of what you are saying

show only fields which have text in them - show where? form? report? I want to show the notes field on a report, but only the results which have information in them.

within the supress format - what does this mean? I have used the format field option to supress any values which are false based on the formula I created which makes empty notes true and not empty notes false (bad English but you get the drift)

I'll be using this in a command object - what does this mean? Im struggling to get a link between two tables. When I create the link and try and add the field to the report I get thousands of returns rather than just the notes which relates to another field on a different table. So I thought a solution was to get a working report copy the SQL from that and add that to a command function within Crystal reporting?

filtering within an additional formula - what does this mean? Can I create a second formula based on my original true\false formula to show the notes field on the report?

Thanks
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:24
Joined
Feb 19, 2013
Messages
16,553
OK, I don't see why you need a formula as such

assuming the control in your report is called Notes and is in the detail section of the report then in the detail format event put

Code:
 notes.visible=not isnull(notes)
[QUOTE]
When I create the link and try and add the field to the report I get thousands of returns rather than just the notes which relates to another field on a different table
[/QUOTE]you'll need to post the sql for a solution to this, sounds like you are missing a link
 

shabbaranks

Registered User.
Local time
Today, 17:24
Joined
Oct 17, 2011
Messages
300
I cant seem to get the .visible function to work?? If I don't add brackets I get an error the remaining text does not appear to be part of the formula. And if I add the brackets it still doesn't like it?

{Transaction_Detail.Notes}.visible=not isnull({Transaction_Detail.Notes})

Thanks
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:24
Joined
Feb 19, 2013
Messages
16,553
the code needs to be in the section of form where the notes are - if this is a subform, then it needs to be in the subform, not the main form.

However, just realised you are in the crystal reports section of the forum - my bad:eek:

Regret I don't know enough about crystal reports to be able to help

Recommend you start a new thread, but be clearer about the problem

good luck!
 

accedeholdings

Registered User.
Local time
Today, 10:24
Joined
Sep 29, 2014
Messages
15
I am having the same issues as you whenever I use Crystal Reports to print out the results.
 

kevlray

Registered User.
Local time
Today, 10:24
Joined
Apr 5, 2010
Messages
1,046
I was trying to follow the original thread and it was not particularly clear what shabbaranks was trying to accomplish. For one thing each object on a Crystal Reports form has the option to have a formula suppress it. The tricky part is with Nulls. Normally in the formula editor it defaults to "Exception for Nulls", but when "Default values for Nulls" is selected then one can check for Nulls easier. Of course if a field value is Null, it will not show anything normally. Sometimes checking the length of a string field seems to work better (len({somefield})>0).
 

Users who are viewing this thread

Top Bottom