Wednesday, March 28, 2012

ReportViewer control doesn't accept Parameters

Hello,
I have developed a web application that uses ReportViewer Web control
supplied with VS 2005 RTM version. The ReportViewer control uses
Network credentials to connect to a remote SQL 2005 server to get the
reports. It works fine for reports that doesn't use any parameters.
But, for the reports that accepts parameters, the reportviewer control
doesn't seem to read the Parameters selected from the drop-down box.
When I click on the "ViewReport" button the report just reloads with
the initial/default parameter. Can someone please advise if I'm missing
anything here?
PS: All the other options of the control works fine (ie., export,
refresh, page navigation, subreports, document map, etc).I have the same problem so we must both be missing something.
Chris
"Raghu" wrote:
> Hello,
> I have developed a web application that uses ReportViewer Web control
> supplied with VS 2005 RTM version. The ReportViewer control uses
> Network credentials to connect to a remote SQL 2005 server to get the
> reports. It works fine for reports that doesn't use any parameters.
> But, for the reports that accepts parameters, the reportviewer control
> doesn't seem to read the Parameters selected from the drop-down box.
> When I click on the "ViewReport" button the report just reloads with
> the initial/default parameter. Can someone please advise if I'm missing
> anything here?
> PS: All the other options of the control works fine (ie., export,
> refresh, page navigation, subreports, document map, etc).
>|||Hey Ragu, I think I've figured it out.
I was setting the network credentials on each page load instead of the first
time the page was loaded.
I had a look at the ReportViewer code through .NET Reflector and found some
code that indicated that parameter values where not read when the credentials
changed.
Chris
"Raghu" wrote:
> Hello,
> I have developed a web application that uses ReportViewer Web control
> supplied with VS 2005 RTM version. The ReportViewer control uses
> Network credentials to connect to a remote SQL 2005 server to get the
> reports. It works fine for reports that doesn't use any parameters.
> But, for the reports that accepts parameters, the reportviewer control
> doesn't seem to read the Parameters selected from the drop-down box.
> When I click on the "ViewReport" button the report just reloads with
> the initial/default parameter. Can someone please advise if I'm missing
> anything here?
> PS: All the other options of the control works fine (ie., export,
> refresh, page navigation, subreports, document map, etc).
>

No comments:

Post a Comment