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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter where user types in selection, else it defaults to ALL 1

Status
Not open for further replies.

urbanhim

MIS
Jul 11, 2007
154
GB
I have a report which is based around our client database, my users's want to be able to select the ACCOUNT.ID that they want to see in the report by typing it in, if they dont enter a value, they want to see all ACCOUNT.ID's.

I've tried following instructions from this thread, which is very similar to what I want, but it doesnt work.


What I need to mention is that my parameter needs to be dynamic as new accounts are added every single minute. Also there are over half a million accounts, so populating a picklist isnt really possible, so typing it in is the only option.

I'm happy to split this into two reports, one that shows ALL accounts, and one that shows specified accounts. Obviously its the specified report that I need help with.

Any ideas of how I can achieve this?

Many thanks



UrbanHim
Crystal XI Report Writer
London
[shadeshappy]
[small]What's the best cure for a hangover?... Heavy drinking the night before!![/small]
 
Ok, ive created the following formula:

If {?Parameter}='ALL'
Then {Database.Field} like '*'
Else {Database.Field} = {?Parameter}

This works ok, when I run the report I can type in ALL to get all accounts, or type in an Account ID to get just one.

However, the parameter has had to be set as Static in order for this to work, so presumably, even when ALL is entered, it will miss all newly added accounts? Can anyone shed light on this?

I dont think its possible to get this working with dynamic values, which gives me the impression this report is not achievable!?

Thank you

UrbanHim
Crystal XI Report Writer
London
[shadeshappy]
[small]What's the best cure for a hangover?... Heavy drinking the night before!![/small]
 
If you are not creating a picklist (and you aren't), then the fact that the parameter is static is irrelevant. The report will be checking whatever is currently in the table. If you think values are missing from the report, then go to database->verify database, but I think this occurs automatically in higher versions of CR.

-LB
 
Thanks LB, you're absolutely right of course. For some reason I thought the static parameter would always show static values, but i should've known that if you're not populating a picklist then there will be no such problem.



UrbanHim
Crystal XI Report Writer
London
[shadeshappy]
[small]What's the best cure for a hangover?... Heavy drinking the night before!![/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top