473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Change report path in ReportViewer control

I have a reportviewer control. I programmatically set the local
report path based on a drop down on a page. This allows the user to
choose which format (RDLC file) to use when generating the report.

The first request, the report processes properly, however if I choose
a different report format, the old report still renders. I'm doing
a .refresh for the report...

I tried turning off Viewstate for the report, but it says that
Viewstate must be true for the ReportViewer control.

If I "reenter" the page as new (such as by clicking on my menu item
for that page), it will then run the first report type chosen.

I'm changing the local report path such as

ReportViewer1.LocalReport.ReportPath = "myreport1.rdlc"
or
ReportViewer1.LocalReport.ReportPath = "myreport2.rdlc"

Any ideas?
Nov 21 '07 #1
1 10346
On Nov 21, 9:30 am, Larry Bud <larrybud2...@yahoo.comwrote:
I have a reportviewer control. I programmatically set the local
report path based on a drop down on a page. This allows the user to
choose which format (RDLC file) to use when generating the report.

The first request, the report processes properly, however if I choose
a different report format, the old report still renders. I'm doing
a .refresh for the report...

I tried turning off Viewstate for the report, but it says that
Viewstate must be true for the ReportViewer control.

If I "reenter" the page as new (such as by clicking on my menu item
for that page), it will then run the first report type chosen.

I'm changing the local report path such as

ReportViewer1.LocalReport.ReportPath = "myreport1.rdlc"
or
ReportViewer1.LocalReport.ReportPath = "myreport2.rdlc"

Any ideas?
It never fails that I ALWAYS find the answer to my question 10 minutes
after I post...

Must do a

ReportViewer1.LocalReport.Reset()

first. Then set your reportpaths, then do a
ReportViewer1.LocalReport.Refresh()

You must have VS2005 SP1 for this.
Nov 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David Dvali | last post by:
Hello. I have just started using Microsoft Reporting tools and I like it very much. I'm using Microsoft SQL Server 2005 and Microsoft Visual Studio 2005 for generating reports in my ASP.NET web...
4
by: Raghu | last post by:
I have developed a web portal that uses ReportViewer web control to connect to a remote SQL 2005 Report server and displays the reports on the client side. The asp.net page has been coded to...
4
by: Sevu | last post by:
I am working with ASP.NET.I am using ReportViwer Control to show my report.I like to add dropdownlist with in the reportviewer control. ( Not top to the control some thing like that).I need to...
1
by: Rich | last post by:
Hello, I am trying to use the Reportviewer control. I have been following an example from the web, and the instructions from the help files on set up a ..rdlc and binding it to the reportviewer...
0
by: Fred G. Sanford | last post by:
I have a Reportviewer control (on an aspx page) that is getting populated from a SQL query in a strongly-typed dataset. I am creating and passing parameters to the report. My problem/question...
1
by: jessicahagg | last post by:
Hi, Goal: Change report body background color to white at runtime before exporting to pfd format. I am reproducing a web report useing .Net reportviewer -- The report is to have the same...
10
by: AG | last post by:
I am trying to use a ReportViewer control in a VS 2005 web application project (not Website project). When I try to create a new report (local), I can't seem to find any method to create a...
7
by: AG | last post by:
I am using a ReportViewer control in an ASP.NET 2.0 WAP aspx page in remote processing mode. The report server is on a shared web host. Can anyone tell me or point me to an example of how to...
1
by: ajaykhedekar | last post by:
I am Showing Mulitple MSRS Reports on Single ASP.Net WEB Page using Mulitple ReportViewer Controls. If User wants to Print the Reports, then user has to click Print button provided by ReportViewer...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.