Showing posts with label reportviewer. Show all posts
Showing posts with label reportviewer. Show all posts

Tuesday, March 20, 2012

ParameterValueClass for setting Parameters Property of ReportViewer

I am trying to set the ReportViewer (the one that runs as a .net control)
Parameters property, which is looking for an array of ParameterValue
objects. Where is the ParameterValue object defined? I cannot find it in
the ReportViewer, or the Web Services. Any ideas how to pass a set of
parameneters to the Parameters property of the ReportViewer?
Thanx, BobAre you referring to the ReportViewer sample control that ships with
Reporting Services?
The Parameters property of the control refers specifically to the parameters
area of the toolbar which can display input fields for report parameters.
This is not a property that can be used to pass report parameters. The
ReportViewer sample utilizes the report server built in parameters support.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Bob Feller" <bob@.nospam.morningdew.net> wrote in message
news:eoz$ml2aEHA.1644@.tk2msftngp13.phx.gbl...
> I am trying to set the ReportViewer (the one that runs as a .net control)
> Parameters property, which is looking for an array of ParameterValue
> objects. Where is the ParameterValue object defined? I cannot find it in
> the ReportViewer, or the Web Services. Any ideas how to pass a set of
> parameneters to the Parameters property of the ReportViewer?
> Thanx, Bob
>

Wednesday, March 7, 2012

Parameters hidden in ReportViewer

We have a report that opens via a URL. We send through the base parameters
and the report renders, but the parameter list is show.
What we really want to happen is to have the report run, but have the
parameter list minized so that it does not occupy so much screen space. The
user can then choose to make it visible if they wish.
Is this Possible? If so, how?
Thanks,
Chris E.On 18 juin, 21:02, "Chris" <cex...@.enableconsulting.com> wrote:
> We have a report that opens via a URL. We send through the base parameters
> and the report renders, but the parameter list is show.
> What we really want to happen is to have the report run, but have the
> parameter list minized so that it does not occupy so much screen space. The
> user can then choose to make it visible if they wish.
> Is this Possible? If so, how?
> Thanks,
> Chris E.
Try adding "rc:Parameters=Collapsed" in the URL|||If you're using the Report Manager to deploy to and view your reports, then the parameters can be shown or hidden via a button on the right hand side of the toolbar. Alternatively, you can hide the parameters completely from within the report definition file
From http://www.developmentnow.com/g/115_2007_6_0_0_984633/Parameters-hidden-in-ReportViewer.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

Saturday, February 25, 2012

Parameters and ReportViewer

I have a report in which I am trying to get a parameter to be displayed in a textbox. I have declared a parameter in my .rdlc called UserName and the expression in the textbox is as follows...

=Parameters!UserName.Value

With that said, I have code in the window containing my ReportViewer to set the parameters and run my report as shown below...

string UserName = "test";

List<ReportParameter> paramList = new List<ReportParameter>();

paramList.Add(new ReportParameter(UserName));

this.baseReportViewer.LocalReport.SetParameters(paramList);

this.baseReportViewer.RefreshReport();

With these things in mind, can anyone here provide me with a reason as to why my report on comes up with a message stating "An error occurred during local processing. One or more parameters required to run the report have not been specified." ?

If I remove the parameter and text box and strip out the code pertaining to the paramter in my window, the report runs without error.

Any ideas?

Answered my own question and it was a total noob mistake.

Assuming I have a parameter in my report named "UserName," the code in my form would need to look like the following...(I've highlighted the change in red)

string UserName = "test";

List<ReportParameter> paramList = new List<ReportParameter>();

paramList.Add(new ReportParameter("UserName", UserName));

this.baseReportViewer.LocalReport.SetParameters(paramList);

this.baseReportViewer.RefreshReport();