Just Crystal Report XI and SQL (No VB or C#). Please bear with me since I am kinda new to CR.
Please note the questions below are not related.
Thanks in advance for the help.
1. In a CR embedded query (command in Database Expert), how to convert a SQL query
Select * from table1 a where (a.col1 like ‘%str1%’ or a.col1 like ‘%str2%’ …)
to a CR SQL query with a parameter (multiple values)
Select * from table1 a where a.col1 like {?Str} – incorrect, please provide the correct one.
For instance, rows with col1 values = ‘a,b,c’ and ‘d,e,f,’ are selected when the values of parameter {?Str} are ‘b’ and ’e,’
2. In the Selection Expert, a formula looks like “table1.col1 like {?Str}”. Have to enter ‘*a*’ in the parameter to find all rows containing ‘a’ in the col1 (similar to “like ‘%a%’” in SQL). What would be the correct formula if I don’t want to have enter ‘*’ in front and after ‘a’ in the parameter?
3. CR getting dataset from a SQL stored procedure. How to pass parameter values to the stored procedure? One values per parameter? Multiple values per parameter?
Dennis