Monday, February 20, 2012

Parameterized connection strings for report parameters

Hi,
I'm posting this again - it is in fact the same issue all the time but
I'm just trying to tighten up the scope of question as I working on
the problem myself. Does anybody have used parameterized connection
strings for stored procedures used to populate report parameter
dropdown? It's just doesn't work! Even if I supply default parameter
values! Any ideas?
TommyIt doesn't work for drop downs, and why it should work? because for drop down
populating if you are passing a parameterized query then no meaning of drop
down instead it will be a main program for working as entry screen ofcourse
unless you have parameter as user id then it is different.
Amarnath, MCTS
"Tomaszek" wrote:
> Hi,
> I'm posting this again - it is in fact the same issue all the time but
> I'm just trying to tighten up the scope of question as I working on
> the problem myself. Does anybody have used parameterized connection
> strings for stored procedures used to populate report parameter
> dropdown? It's just doesn't work! Even if I supply default parameter
> values! Any ideas?
>
> Tommy
>|||Query (stored procedure) is not parameterized. What is parameterized
is connection string in data source used to run this stored procedure.
Report parameters. So why it shouldn't work? Especially that the same
parameterized connection string is working fine for stored procedure
used to fill ontent of the report.
Tommy
On Mar 21, 10:54 am, Amarnath <Amarn...@.discussions.microsoft.com>
wrote:
> It doesn't work for drop downs, and why it should work? because for drop down
> populating if you are passing a parameterized query then no meaning of drop
> down instead it will be a main program for working as entry screen ofcourse
> unless you have parameter as user id then it is different.
> Amarnath, MCTS
>
> "Tomaszek" wrote:
> > Hi,
> > I'm posting this again - it is in fact the same issue all the time but
> > I'm just trying to tighten up the scope of question as I working on
> > the problem myself. Does anybody have used parameterized connection
> > strings for stored procedures used to populate report parameter
> > dropdown? It's just doesn't work! Even if I supply default parameter
> > values! Any ideas?
> > Tommy- Hide quoted text -
> - Show quoted text -|||Sorry, I thought you are parameterizing the stored proc for drop down. can
you let me know what you have given in your parametereized connection
string.. For e.g. It should be something like this.
="data source=" & Parameters!ServerName.Value & ";initial
catalog=AdventureWorks
But some restrictions are there in creating this. I would suggest you go
through this link before writing one. search string like "Data Source
Expressions" in this link.
http://msdn2.microsoft.com/en-us/library/ms156450.aspx
Amarnath, MCTS
"Tomaszek" wrote:
> Query (stored procedure) is not parameterized. What is parameterized
> is connection string in data source used to run this stored procedure.
> Report parameters. So why it shouldn't work? Especially that the same
> parameterized connection string is working fine for stored procedure
> used to fill ontent of the report.
> Tommy
> On Mar 21, 10:54 am, Amarnath <Amarn...@.discussions.microsoft.com>
> wrote:
> > It doesn't work for drop downs, and why it should work? because for drop down
> > populating if you are passing a parameterized query then no meaning of drop
> > down instead it will be a main program for working as entry screen ofcourse
> > unless you have parameter as user id then it is different.
> >
> > Amarnath, MCTS
> >
> >
> >
> > "Tomaszek" wrote:
> > > Hi,
> > > I'm posting this again - it is in fact the same issue all the time but
> > > I'm just trying to tighten up the scope of question as I working on
> > > the problem myself. Does anybody have used parameterized connection
> > > strings for stored procedures used to populate report parameter
> > > dropdown? It's just doesn't work! Even if I supply default parameter
> > > values! Any ideas?
> >
> > > Tommy- Hide quoted text -
> >
> > - Show quoted text -
>
>|||Hi,
I have already visited mentioned link as lika a dozen others.
Connection string looks fairly simple
="Data Source=" & Parameters!SvrName.Value & ";Initial Catalog=" &
Parameters!DBName.Value
And as I write previously it works fine for filling the report
content. Alas when I'm using it for stored procedure that wills
parameter dropdown it fails. It faile even if I supply default values
for parameters.
It looks like parameters are avaliable after hitting 'view report
button' I mean after user will supply it's own report parameters - if
so this is the reason why they are unavaliable for connection string
that is needed actually for displaying parameters. But this are only
my guesses. Hope I described clearly what is happening. If you have
any suggestions please post them.
Thank you in advance.
Tommy.
On Mar 21, 11:55 am, Amarnath <Amarn...@.discussions.microsoft.com>
wrote:
> Sorry, I thought you are parameterizing the stored proc for drop down. can
> you let me know what you have given in your parametereized connection
> string.. For e.g. It should be something like this.
> ="data source=" & Parameters!ServerName.Value & ";initial
> catalog=AdventureWorks
> But some restrictions are there in creating this. I would suggest you go
> through this link before writing one. search string like "Data Source
> Expressions" in this link.
> http://msdn2.microsoft.com/en-us/library/ms156450.aspx
> Amarnath, MCTS
>
> "Tomaszek" wrote:
> > Query (stored procedure) is not parameterized. What is parameterized
> > is connection string in data source used to run this stored procedure.
> > Report parameters. So why it shouldn't work? Especially that the same
> > parameterized connection string is working fine for stored procedure
> > used to fill ontent of the report.
> > Tommy
> > On Mar 21, 10:54 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > wrote:
> > > It doesn't work for drop downs, and why it should work? because for drop down
> > > populating if you are passing a parameterized query then no meaning of drop
> > > down instead it will be a main program for working as entry screen ofcourse
> > > unless you have parameter as user id then it is different.
> > > Amarnath, MCTS
> > > "Tomaszek" wrote:
> > > > Hi,
> > > > I'm posting this again - it is in fact the same issue all the time but
> > > > I'm just trying to tighten up the scope of question as I working on
> > > > the problem myself. Does anybody have used parameterized connection
> > > > strings for stored procedures used to populate report parameter
> > > > dropdown? It's just doesn't work! Even if I supply default parameter
> > > > values! Any ideas?
> > > > Tommy- Hide quoted text -
> > > - Show quoted text -- Hide quoted text -
> - Show quoted text -

No comments:

Post a Comment