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

problem with where clause in command

Status
Not open for further replies.

johnugly

Programmer
Jun 21, 2004
31
0
0
BE
Hi, i'm using CR9 and have a report with a subreport.
The supbreport uses a command to get its data.
In the command there's a where-clause which uses a parameter from the main report.
((where table.culture = {?Culture}))
culture is a string (varchar(5) in sql server)
Now here's the problem, when I execute the query in sql server i write : where table.Culture = 'culture', WITH quotes. When i write it in CR9 and use the quotes it says nada, no data. When i dont write the quotes it says the same, no data. when i dont write the where clause i get the data but for each culture which is exact.
the question is how do I implement the string parameter in the where clause?
thanks in advance
 
I'm using CR9 with Oracle so maybe different but I do it like that :

- create the param with "Value Type" set to "String"
- use it between quotes in the query of the subreport :
(...) AND CD.CD_ID = '{?MainID}'

Lemox
 
ok, that's it, i was trying to concatinate it with a "+"
tnx
 
This is a deviation to the original problem, but why do you need a subreport?
Since you are using v9, you can add a command which should mean you can write the sql without the possible need of a sub.
I still use 8.5, so I my be be barking up the wrong tree.

Cheers
Fred
 
you may be right, I'll try it the next time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top