Profile Picture

Dynamic SQL Parameter

Posted By colin fowle 12 Years Ago
Author
Message
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 18 minutes ago
Posts: 3,054, Visits: 4,009

Hi,

In order for the chart to know that you are writing an expressoin, and not a regular string expressions must start with the '=' char.
So perhaps you just have a syntaxis problem - following is an expression that binds to a dynamic query:

="select co1, col2, " + Params![UserId].STR + " from table"



Best Regards,
Nevron Support Team



colin fowle
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 3, Visits: 1

Hi,

Using Nevron Chart for Sharepoint 2012 Vol1.  I notice the new feature for database properties which can be configured with expressions.

I want to pass a parameter to the SQL Command for a chart connecting to a Database Data Source.  So something like

Select col1, col2, col3

from table1

where table1.userid = Params![UserId].STR

However it doesnt work as the query parser throws an error

Error:Cannot connect to data source.  Eroor was:Invalid column name 'Params![UserSid].STR

Is there not some form of parameter expansion done before the SQL is passed to the query parser ?  I've tried a variety of ways of specifying the Params![UserId].STR (in quotes / double / single etc.)

How do I get one of these pre-defined parameters passed to my query ?

thanks

 





Similar Topics


Reading This Topic