This is a migrated thread and some comments may be shown as answers.

ReportViewer export not working with ajax

6 Answers 158 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 04 Feb 2013, 07:48 PM
Hi,
I'm using:
- ReportViewer from Microsoft.ReportViewer.WebForms version 8.0.0.0
- Telerik.Web.UI version 2012.912.35
- Visual Studio 2010 with .Net Framework 3.5
- Sharepoint 2010.
 
Inside a visual web part in a Sharepoint project, I added the report viewer. Everything works fine until I try to ajaxify the page. If I added Ajax to the page, I lose the Export functionality as well as the paging functionality INSIDE the Report.

Attached is a picture of the report viewer paging and export settings with Ajax and without Ajax.
Please advise on what should I do to get the page ajaxified an have the ReportViewer control fully functional.

Thanks in advance,

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Feb 2013, 09:14 AM
Hi,

You do not have to ajaxify the ASP.NET ReportViewer itself as all its commands are issued through an http handler and update only the report/report parameters areas and not the entire page.

A valid case is only when you want to change the Report assigned to the viewer on another control action e.g. button click, is this your scenario? We would appreciate if you elaborate on your exact setup.

Kind regards,
Steve
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
L
Top achievements
Rank 1
answered on 19 Feb 2013, 02:53 PM
Yes, this is my scenario. 
I have five drop downs, one button and a reportviewer. The user selects the combination of options he wants from the drop downs and then click the button. At this point, the report viewer refreshes. Back to my first post, if I ajaxify the page, the paging in the report viewer control gets disabled. See the pictures attached in my first post.

I would appreciate your help,
Thanks in advance
0
Steve
Telerik team
answered on 19 Feb 2013, 05:58 PM
Hi,

We've not been able to reproduce such a problem in our local tests and I have attached a sample project where on button click a report is assigned to the viewer and this event is ajaxified. Please review it and if the problem persists on your end, we would appreciate if you modify our sample to exhibit the issue.

Greetings,
Steve
the Telerik team

See what's new in Telerik Reporting Q1 2013. Register for the March 4 webinar to witness the impressive new visualizations in Telerik Reporting. Just for fun, 10 webinar attendees will be randomly selected to win a Telerik T-shirt and a $50 Gift Certificate to ThinkGeek. Register now! Seats are limited!

0
L
Top achievements
Rank 1
answered on 19 Feb 2013, 07:16 PM
Thanks Steve for your quick answer.
I'm using Microsoft.ReportViewer not telerik report viewer, I will try with Telerik report viewer to see if it works the same since I never use it before. I will get back to you.
0
L
Top achievements
Rank 1
answered on 19 Feb 2013, 09:02 PM
Hi Steve,

Now I have to migrate the code that is written based on a Microsoft Report Viewer to the Telerik report Viewer. Currently I have this:
    ReportViewer1.Reset(); // Compilation error. Does not contain a definition for Refresh
    ReportViewer1.LocalReport.ReportPath = "Report Path"; // Compilation error.
                    ReportViewer1.LocalReport.EnableHyperlinks = true; //Compilation error.
                    ReportViewer1.ShowPrintButton = true;
                    ReportViewer1.ShowRefreshButton = false;
                    ReportViewer1.LocalReport.DataSources.Clear();   // Compilation error.
                    ReportViewer1.DocumentMapVisible = true;
                    ReportViewer1.LocalReport.ExecuteReportInCurrentAppDomain(System.Reflection.Assembly.GetExecutingAssembly().Evidence);
                    ReportViewer1.LocalReport.Refresh();    // Compilation error.
                    ReportViewer1.Visible = true;
                    int ID = Convert.ToInt32(dataSet.Tables[0].Rows[0]["ID"]);
                    Telerik.Reporting.ReportParameter rp = new Telerik.Reporting.ReportParameter("ID", ReportParameterType.String, ID.ToString());
                    Telerik.Reporting.ReportParameter[] rps = { rp };
                    ReportViewer1.LocalReport.SetParameters(rps);
Please advise, on how to translate those lines of code so I don;t get the compilation error.
Thanks in advance.
0
Steve
Telerik team
answered on 20 Feb 2013, 08:05 AM
Hello,

Then you are in the wrong forum as we only provide support and assistance for Telerik products. I have not suggested you should switch to Telerik Reporting, and if you need help with MS product, you should go on MSDN forums for help. Please also note that the Telerik viewer can and will only show Telerik Reports, you would not be able to show your MS reports inside our viewer, which basically means you should create all of your existing reports with our product.

Should you decide to migrate, we highly recommend going through our documentation, before starting the migration and specifically the following help sections:

All the best,
Steve
the Telerik team

See what's new in Telerik Reporting Q1 2013. Register for the March 4 webinar to witness the impressive new visualizations in Telerik Reporting. Just for fun, 10 webinar attendees will be randomly selected to win a Telerik T-shirt and a $50 Gift Certificate to ThinkGeek. Register now! Seats are limited!

Tags
General Discussions
Asked by
L
Top achievements
Rank 1
Answers by
Steve
Telerik team
L
Top achievements
Rank 1
Share this question
or