473,698 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change report path in ReportViewer control

I have a reportviewer control. I programmaticall y 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.L ocalReport.Repo rtPath = "myreport1.rdlc "
or
ReportViewer1.L ocalReport.Repo rtPath = "myreport2.rdlc "

Any ideas?
Nov 21 '07 #1
1 10380
On Nov 21, 9:30 am, Larry Bud <larrybud2...@y ahoo.comwrote:
I have a reportviewer control. I programmaticall y 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.L ocalReport.Repo rtPath = "myreport1.rdlc "
or
ReportViewer1.L ocalReport.Repo rtPath = "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.L ocalReport.Rese t()

first. Then set your reportpaths, then do a
ReportViewer1.L ocalReport.Refr esh()

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
2793
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 application. Now I want to do following: I want to add feature which will allow user to upload untyped report file to the web server and then my application will dynamically bind and display this report in ReportViewer Control.
4
7728
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 automatically impersonate a specific user who has access to the report server so that the customer don't get a pop-up asking for login credentials. Once the report has been displayed in the Report viewer control, I am getting an error when I click on...
4
4471
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 place dropdown near to Export link ( Excel and PDF Export).Is it possible to add at the dropdown list with in report viewer control?. I found the property as ReportViewer.Controls.Add.But its not working.Please help me. Regards, S.Sevugan.
1
17953
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 control. The help files state that in the form the contains the reportviewer control there is a tasks smart tags panel in design view. I don't see any such thing. Where do I need to look to see this panel? So I have been trying to follow...
0
1046
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 is...one of the parameters i am trying to pass into the report is based on a field value in each row returned from the SQL query. More to the point, on the report, I need to set a control's BorderColor based on a column value for each row returned...
1
4488
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 background color as the web page but a white/no background color when exported to a pdf. - Setting the report page body to transparent does not work. - Using a css on the reportviewer background does not work. How can I access the report's page...
10
3757
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 datasource. I would like to use an existing class object. The examples I have found state that the class should be in the App_Code folder. However a WAP does not have an App_Code folder. Is there any way to specify a datasource for a local report in a...
7
10761
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 pass user name and password to the report server via the ReportViewer control? --
1
2244
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 Control multiple times, So I want to do this with one button Click.This Button Click event will handle the Printing process of ReportViewer Control. In Case of CrystalReportViewer we have direct functions as "PrintReport" and "ExportReport" to Print...
0
8601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9156
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7716
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.