Monday, February 20, 2012

Problem with Parameters

I am writing a Data Processing Extension for Reporting Services and am
having a problem getting the values of parameters I pass in the query string
in ReportDesigner.
I have implemented the IDbCommandAnalysis GetParameters() method to parse
the query string in ReportDesigner. When I enter
"&CompanyId=1000&EmployeeId=2000" in the "Query string" field,
GetParameters() returns a local collection with my two parameters and their
values.
Upon command execution, the IDataParameterCollection IDbCommand.Parameters
property getter is called twice before calling ExecuteReader() and return my
member parameter collection. When ExecuteReader() is called, my member
parameter collection contains the two parameters of the correct name but
with values of null.
Because the parameters with correct names are added to the collection, it
seems that ReportDesigner saved the parameter collection I returned from
GetParameters() but what happened to the parameter values?
Since the values are null, ReportDesigner pops a window for the values to be
input. I don't want this to happen after the report is deployed but cannot
find a way to simulate the parameter name-value pairs being submitted on the
URL string.
What am I missing?
Thanks,
TomHi Tom,
Welcome to use MSDN Managd Newsgroup!
I am looking into this issue and will update you as soon as possible. I
have also noticed you have another two duplicated posts. To ensure the
integrity of newsgroup, I will answer your questions and follow up issue in
this thread.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Michael,
Thanks for your reply. I wanted to pass along some additional information
about the parameter problem I'm having.
I published my report and fount the parameters are passed to the report when
added to the URL. That's good, but it points out a big disparity between
parameter handling in ReportDesigner and in published reports.
I look forward to learning what you discover about the correct way to handle
parameters.
Thanks,
Tom
"Michael Cheng [MSFT]" <v-mingqc@.online.microsoft.com> wrote in message
news:WJlr33TeFHA.4856@.TK2MSFTNGXA01.phx.gbl...
> Hi Tom,
> Welcome to use MSDN Managd Newsgroup!
> I am looking into this issue and will update you as soon as possible. I
> have also noticed you have another two duplicated posts. To ensure the
> integrity of newsgroup, I will answer your questions and follow up issue
> in
> this thread.
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are always here to be of
> assistance!
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hi Tom,
Sorry for the delay, would you please provide me a sample project? I
understand the information may be sensitive to you, my direct email address
is v-mingqc@.online.microsoft.com (please REMOVE "online" before you click
SEND as it's ONLY for SPAM), you may send the file to me directly and I
will keep secure.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Michael,
I am having the same problem. Did you ever figure this out for Tom?
I am trying to run a report by passing in the parameter through the url.
The report comes up but prompts for the parameter instead of taking it
through url. If I enter it at the prompt, the report runs fine. My url looks
like:
http://server-1/Reports/Pages/Report.aspx?ItemPath=%2fMarkListingbyStudent%2fMarkListingbyStudent&rs:Command=Render&calendarID=155
It's internal though.
Thank you for your help!
Sharlyn
"Michael Cheng [MSFT]" wrote:
> Hi Tom,
> Sorry for the delay, would you please provide me a sample project? I
> understand the information may be sensitive to you, my direct email address
> is v-mingqc@.online.microsoft.com (please REMOVE "online" before you click
> SEND as it's ONLY for SPAM), you may send the file to me directly and I
> will keep secure.
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

No comments:

Post a Comment