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!

Crystal 8.5 Question

Status
Not open for further replies.

DotNetNewbie

Programmer
Mar 3, 2004
344
GB
Hi,

This really is not my area of experience but one of my colleagues asked me to post the following question:

In Crystal version 8.5 I wish to insert a parameter which allows me to see accounts start with “S-“ or “C-“ also, I wish to see both accounts. I compiled a formula however, it only displays data for parameter options Account C or Account S but not both.

In my parameter I have the options :-

Account C
Account S
Both

Any help much appreciated.

.net
 
I'd do it as:
Code:
(@Parameter = "Account C" and Left({your.field}, 2) = "C-")
or 
(@Parameter = "Account S" and Left({your.field}, 2) = "S-")
or
(@Parameter = "Both" and Left({your.field}, 2) in ["C-", "S-"])
First put this with unselected data, and check that it says 'True' or 'False' at the correct times. Then say @Testing in your record selection and the test will be applied.

This should really be in - this is for Crystal Enterprise.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hi,

I have asked my colleague to check and she said the following:

TRUE appeared for 'Both', however FALSE for Account C and Account S.

Cheers,

.net
 
Hi,

This worked:

({parameter} startswith "Account C" and Left ({your.field,2) = "C-")
or
({parameter} startswith "Account S" and Left (your.field},2) = "S-")
or
({parameter} = "Both" and Left ({your.field},2) in ["C-","S-"])

Then in select expert is “True”


Cheers for your assistance.

.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top