Re: Change report path in ReportViewer control
- From: Larry Bud <larrybud2002@xxxxxxxxx>
- Date: Wed, 21 Nov 2007 07:23:52 -0800 (PST)
On Nov 21, 9:30 am, Larry Bud <larrybud2...@xxxxxxxxx> wrote:
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.
.
- References:
- Change report path in ReportViewer control
- From: Larry Bud
- Change report path in ReportViewer control
- Prev by Date: Re: Visual Studio 2008
- Next by Date: encoding javascript
- Previous by thread: Change report path in ReportViewer control
- Next by thread: encoding javascript
- Index(es):
Relevant Pages
|