February 10, 2012  
   Login  
Forum  
 
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Using Report parameters with SQLopUsing Report parameters with SQLop
Previous Previous
 
Next Next
New Post
 7/9/2009 6:06 PM
 

Hello,

 

I am trying to use report parameters in my SQL query statement. However with strings it seems not to work.

The SQL statement works without the where clause.

It does not work with

<sqlQuery tableName="endresult">
    SELECT * FROM ProgramProjectWorkpackage
    WHERE
               ProgramProjectWorkpackage.Program like '%@Select_Program!%'

</sqlQuery>

However it works with a literal string

<sqlQuery tableName="endresult">
    SELECT * FROM ProgramProjectWorkpackage
    WHERE
               ProgramProjectWorkpackage.Program like '%est%'

</sqlQuery>

Can you let me know how I can solve this...

Thanks

 

New Post
 7/10/2009 10:14 AM
 

Hi,

We transform Reporting Services parameters to SQL parameters when they are in an sqlQuery statement. Therefore it is not just a string replacement. 

You can solve your problem by concatenating the '%' with the parameter name (string concatenation is done with || in SQL):

<sqlQuery tableName="endresult">
    SELECT * FROM ProgramProjectWorkpackage
    WHERE ProgramProjectWorkpackage.Program like '%' || @Select_Program! || '%'
</sqlQuery>

Don't hesitate to contact us if you need more information,

Regards,
Marien Monnier
Enesys

New Post
 7/10/2009 3:17 PM
 

Thanks for the reply.

It seems to work correctly. So Eensys supports "SQL string" handling. Fantastic !

Maybe it would be interesting to have more hands on information on how to use SQLite with Enesys on your support site.

Regards and Tank you

Peter Cattersel.

Previous Previous
 
Next Next
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Using Report parameters with SQLopUsing Report parameters with SQLop

 
You need to login for posting to the forums.
If you don't have a login, click here to register.
 
Copyright 2010 Enesys - All rights reserved Terms Of UsePrivacy Statement