rsWeb:ReportViewer control - issues in ASP .NET

D

Doug

I am using the rsWeb:ReportViewer control inside my ASP .NET web
application to view SRS reports. It works great except for a couple
issues I'm seeing.

1. It seems like everytime I do a postback it was wiping my
ReportServerCredential properties. So if I have a RadioButtonList
control with two option, when the page first loads, it loads the
ReportServerCredentials with this line of code:


if (!IsPostBack)
{
rptViewer.ServerReport.ReportServerCredentials = new
StarrsFesReports.ReportServerCredentials();



}


When the user switches to a different option in that RadioButtonList
it does not execute this code (because it is a postback. However, it
appears that the credentials it got previously are wiped. So then
the
report doesn't run.

So I fixed this by pulling it out of the "if (!IsPostBack)" line.
Things started working great until:


2. It appears that now, once the report has run for the first time,
if the user switches a parameter on the screen, it reruns the report
-
but not with the parameter she switched to and BEFORE she tells it to
do so. I put breakpoints all over my code to see where this happens
and it doesn't appear to happen directly in my code (a product of the
control perhaps?)


So I thought I'd put a "rptViewer.Reset" right after I get my
ReportServerCredentials in the code I described above. But that has
the same effect (obviously) of wiping my credentials.


So, is there some way I can get both of these issues resolved?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top