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

Selection Formula Syntax for Web Report, Urgent,please help !!!

Status
Not open for further replies.

donv

Programmer
Jun 11, 2001
18
US
Hi
Can anyone tell me the syntax for passing a SF string to a report?? I need to send 4 parameters to a table in the
web report in the following fashion:

select a,b,c,d
from table where
(a,b,c,d) in (1,'xyz',1,1)

I want to know how to pass such a combination of columns in the where clause for crystal to make sense.I am trying to build this string in javascript.

For example like:
sfsring ='{'+table+'.a,'+table+'.b,'+table+'.c,'+table+'.d} in [(1,"xyz",1,1),(1,"pqr",1,1)]'

basically,I am desperately trying to pass
" (a,b,c,d) in (1,'xyz,1,1) " to a SF field (sent as a hidden type ) submitted to the report.
I hope I am clear.Any help is hugely appreciated.

Thanks
donv

 
I'm not too sure if I'm understanding you correctly, but do you want column a = 1, column b = 'xyz', column c = 1 & column d = 1? I say this because my other interpretation is that you want column a when it equals one of 1 or 'xyz' (but why would you then repeat the 1 again I ask myself).
So to answer your question applying the first interpretation, (& given that I don't know JavaScript) you will need to end up with a string like
SelectionFormula = "{Table.a} = 1 And {Table.b} = 'xyz' And {Table.c} = 1 And {Table.d} = 1"
Note that I've use a single quote mark for the string xyz, since most languages will be confused if you try to use doulbe quotes, and Crystal doesn't care either way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top