显示标签为“reportviewer”的博文。显示所有博文
显示标签为“reportviewer”的博文。显示所有博文

2012年3月8日星期四

Disappearing parameter values

I have an ASP.NET application with a page which has a Reportviewer control
linked to a Reporting Services report on a Remote Server. I pass parameters
into it OK including the name of the database which is then referenced by a
dynamic connection string. The database is the first parameter. Other
parameters have dropdown lists based on datasets using the dynamic connection
string.
All of this works fine, but...
When I hide some of the parameters, because I know what value is required,
the value is not acceoted, nor does the report use the default value. It is
as though hiding the parameter prevents the list of available values being
requeried; consequently the passed in value is ignored as it does not match
an available value!
Can anyone help please?
Thanks
GeorgeGeorge,
I assume you are setting the Visible property of some web control that
holds the value of your report parameter. You should set the Visibility
Style of the control to 'hidden' so that it still gets rendered into the web
form but is not 'seen' in the web browser. This way the controls value is
still within the form and viewstate when the form is posted back.
Hope I made the correct assumption and this helps.
thx
-jsh
"George Davies" wrote:
> I have an ASP.NET application with a page which has a Reportviewer control
> linked to a Reporting Services report on a Remote Server. I pass parameters
> into it OK including the name of the database which is then referenced by a
> dynamic connection string. The database is the first parameter. Other
> parameters have dropdown lists based on datasets using the dynamic connection
> string.
> All of this works fine, but...
> When I hide some of the parameters, because I know what value is required,
> the value is not acceoted, nor does the report use the default value. It is
> as though hiding the parameter prevents the list of available values being
> requeried; consequently the passed in value is ignored as it does not match
> an available value!
> Can anyone help please?
> Thanks
> George|||Thanks jsh for replying so promptly
I'm not sure I've explained the problem correctly, as I could not find the
Visibility Style for the control as you suggested. I am using RS2005 and
ASP.NET 1.1 with a ReportViewer control linked to a deployed remote report.
But I think you may be on to something as the problem does not arise when
designing the report, nor in Report Manager, only when I run it from within
the ASP ReportViewer control as a Remote Report.
The parameter is passed into the Reporting Services report OK, but when the
Report Server processes the parameters it first takes the name of the
database as the first parameter, then it recognises that there are cascading
parameters because the dropdown lists require data from tables which have
been queried using the dynamic connection string. At this point it seems to
assume that because it is going to refresh the dropdown lists that it can no
longer rely on the selections supplied in the other parameters and scrubs
them i.e. it insists that the user rekey each of the parameter values
wherever the dropdown lists use the dynamic connection string.
This causes two problems:
1 When I want a parameter value hidden, it is impossible to set it and the
report fails with e.g. "Parameter zzz does not have a value". I could get
round this by using two parameters for each value, one for when I want to
force the parameter to be a certain value and hide it with no associated
dropdown list, and one for when I want to show it and ask the user to pick
from a list. Messy, but I could get the report SQL to test for either of the
values in the two parameters. But this still leaves problem number 2...
2 When cascading parameters are used, each time the user picks a value, it
postbacks to the server. This is not very clever of Reporting Services. It
should post back when the value for a parameter is changed where that
parameter is used by other parameters, not when a parameter changes which
uses the value from another parameter.
The long and short of it is that with eight parameters, the selection of
report options is excruciatingly slow and won't be acceptable to my users.
If you or anyone else can shed any light on this problem, I would be really
grateful.
Thanks again and best wishes
George
"jsh02_nova@.hotmail.com" wrote:
> George,
> I assume you are setting the Visible property of some web control that
> holds the value of your report parameter. You should set the Visibility
> Style of the control to 'hidden' so that it still gets rendered into the web
> form but is not 'seen' in the web browser. This way the controls value is
> still within the form and viewstate when the form is posted back.
> Hope I made the correct assumption and this helps.
> thx
> -jsh
> "George Davies" wrote:
> > I have an ASP.NET application with a page which has a Reportviewer control
> > linked to a Reporting Services report on a Remote Server. I pass parameters
> > into it OK including the name of the database which is then referenced by a
> > dynamic connection string. The database is the first parameter. Other
> > parameters have dropdown lists based on datasets using the dynamic connection
> > string.
> >
> > All of this works fine, but...
> >
> > When I hide some of the parameters, because I know what value is required,
> > the value is not acceoted, nor does the report use the default value. It is
> > as though hiding the parameter prevents the list of available values being
> > requeried; consequently the passed in value is ignored as it does not match
> > an available value!
> >
> > Can anyone help please?
> >
> > Thanks
> >
> > George

2012年2月25日星期六

Disabling JavaScript for report shown in ASP.Net ReportViewer

Hey guys,
I could not figure out a way how to disable rendering using JavaScript when
displaying a report in ReportViewer (ASP.Net). I need to render for browser
with JavaScript disabled. Is there a way to pass those URL parameters to the
report or so? I didn't see where.
Thanks, ChristophYou can do it by using any rendering extentions, but HTML4.0,
but you'd loose all interactive features of the report and report's
pagination.
You'll have to build your own pagination.
"Christoph Wienands" <christoph.wienands@.siemens.remove.com> wrote in
message news:OYPKzrLEGHA.1312@.TK2MSFTNGP09.phx.gbl...
> Hey guys,
> I could not figure out a way how to disable rendering using JavaScript
> when displaying a report in ReportViewer (ASP.Net). I need to render for
> browser with JavaScript disabled. Is there a way to pass those URL
> parameters to the report or so? I didn't see where.
> Thanks, Christoph
>|||Hey Oleg,
> You can do it by using any rendering extentions, but HTML4.0,
> but you'd loose all interactive features of the report and report's
> pagination.
> You'll have to build your own pagination.
Thanks for your help. As far as I know, if I use URL access with something
like this
http://localhost/reportserver?%2fReports%2fMyReport&ReportingPeriod=20054&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&rc:JavaScript=False&rc:Toolbar=True
I get a report with:
1) Toolbar and paging support
2) No parameters showing
3) No JavaScript, it's all plain HTML <-- and that's the feature I need
The ReportViewer control has a couple properties like ShowToolbar or
ShowParameterPrompts where I can control #1 and 2. However, there is no
property for #3.
Anybody any idea?
Thanks, Christoph|||The toolbar is controlled by Javascript, once you set ..&rc:Toolbar=True..
it disables it and no javascript present.
You need to write your own code to simulate paging and a toolbar using the
web service approach.
Not too difficult to do.
"Christoph Wienands" <christoph.wienands@.siemens.remove.com> wrote in
message news:%23b1RozTEGHA.828@.TK2MSFTNGP10.phx.gbl...
> Hey Oleg,
>> You can do it by using any rendering extentions, but HTML4.0,
>> but you'd loose all interactive features of the report and report's
>> pagination.
>> You'll have to build your own pagination.
> Thanks for your help. As far as I know, if I use URL access with something
> like this
> http://localhost/reportserver?%2fReports%2fMyReport&ReportingPeriod=20054&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&rc:JavaScript=False&rc:Toolbar=True
> I get a report with:
> 1) Toolbar and paging support
> 2) No parameters showing
> 3) No JavaScript, it's all plain HTML <-- and that's the feature I need
> The ReportViewer control has a couple properties like ShowToolbar or
> ShowParameterPrompts where I can control #1 and 2. However, there is no
> property for #3.
> Anybody any idea?
> Thanks, Christoph
>|||"Oleg Yevteyev" <myfirstname001atgmaildotcom> wrote in message
news:eFo1cCVEGHA.1424@.TK2MSFTNGP12.phx.gbl...
> The toolbar is controlled by Javascript, once you set ..&rc:Toolbar=True..
> it disables it and no javascript present.
> You need to write your own code to simulate paging and a toolbar using the
> web service approach.
> Not too difficult to do.
Hey Oleg,
now I understand. Thanks for the hint. I didn't realize that JavaScript was
coupled with the toolbar. Since most of our reports are single pages reports
anyway I probably won't even have to do the paging.
Christoph

2012年2月17日星期五

disable pagination

Hello
Is it possible to disable pagination? I use the reportviewer component but i
want to see all my data on one page and i don't use drilldowns?
If you can disable it how do you do that?
grtzAll you have to do is put: = â'Falseâ' in the table properties visibility
expression, and it will display continuously.
--
Tony
"David" wrote:
> Hello
> Is it possible to disable pagination? I use the reportviewer component but i
> want to see all my data on one page and i don't use drilldowns?
> If you can disable it how do you do that?
> grtz
>|||Does this work?
I tried it out on my lists which are having the same problem, and all it did
was make the report take about 20 times longer to render, and the preview is
a blank page, and when I exports as PDF, nothing actually changes...?
It sometimes even produces a GDI error when rendering...
How does setting the visibility with an expression affect the way
Pagination works anyway'
"Tony" wrote:
> All you have to do is put: = â'Falseâ' in the table properties visibility
> expression, and it will display continuously.
> --
> Tony
>
> "David" wrote:
> > Hello
> >
> > Is it possible to disable pagination? I use the reportviewer component but i
> > want to see all my data on one page and i don't use drilldowns?
> > If you can disable it how do you do that?
> >
> > grtz
> >
> >|||I tried it on one of my nested lists, and interestingly, the Preview did not
apply any page breaks!! But unfortunatly the exports to PDF still seemed to :(