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 Enterprise 7 Passing list to parameter

Status
Not open for further replies.

jake29

IS-IT--Management
Jan 4, 2004
76
US
I am trying to pass a list of values (1,2,3,4,5) to a report from a .cfm page.

I setup the report with a parameter field that will accept multiple values.

The problem I am having is that SQL statement uses Or instead of In.

select this from MyTable
where this = 1 or this = 2

instead of where this in (1,2,3)

I have tried to change this by using a formula in the Select expert but it reverts back to using Or rather then in.

Any help would be appreciated.
 
Hi,
And you do not want that, why?

In (1,2,3)
is exactly the same as
1 or 2 or 3




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
What I am trying to do is pass a list of Zip Codes collected from a form submission to the report. I was going to loop the form and collect the zip codes in to a variable and then pass them to the report.

GetLabelsViaZip.rpt?Prompt0=#zips#
or
GetLabelsViaZip.rpt?Prompt0=01560,01561,01562

select name,address,zipCode from contact
where zipCode in (01560,01561,01562)

It seemed simpler/cleaner to roll with an In and List than seperate Or(s) for multiple and possibly discrete values.

Could be wrong, been before.
 
Don't use the crystal select expert... Write your own SQL command... Its much cleaner, and you have more control over how many records are returned to Crystal.

Then you can use whatever kind of query restraints that you want...

ASP, VB, VBS, Cold Fusion, SQL, DTS, T-SQL, PL-SQL, IBM-MQ, Crystal Reports, Crystal Enterprise
 
Please remember to at least post your software version.

Crystal can pass the appropriate SQL just fine if you create a solid Record Selection Formula, so you need to define some specifics, these posts aren't including nor asking for required technical information.

Perhaps you want the sample applications for CSP page development for Crystal Enterprise?


-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top