We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Options not found for Aspose.Cells for Reporting Services

Hi,

I have downloaded “Aspose Total for Reporting services” for .Net. I have installed setup provided by Aspose and tried to integrate Export to Excel (XLS) feature using below link in my Report viewer page.
Link : http://www.aspose.com/documentation/ssrs-rendering-extensions/aspose.cells-for-reporting-services/integrate-with-microsoft-report-viewer-in-local-mode.html

I have followed all the steps provided by above link but still I am unable to find “XLS,CSV” Aspose options in my Report viewer Export drop down list. Please let me know how can I get this options in my Report viewer page. Please know me exact steps so I can get this options in my Report viewer page.

Thanks
chirag

Hi

Thank you for considering Aspose.

We have tested the latest version and we are able to find "XLS, CSV" Aspose options in our Report viewer “Save” drop down list.

Please see the attached samples (reportviewer2008 & reportviewer2005).

If you still face the issue, please try the latest version by downloading from the following location.

https://forum.aspose.com/t/70436

Thank You & Best Regards,

Hi,

In your replied link “https://forum.aspose.com/t/70436” is not working. Please give me another link.

I have followed all the steps for installing “Aspose Cells for Reporting Services” using “http://www.aspose.com/documentation/ssrs-rendering-extensions/aspose.cells-for-reporting-services/integrate-with-microsoft-report-viewer-in-local-mode.html” but I am unable to find Aspose Options for Cells and even I did not found “Save” Image in Report viewer page. Please let me know the reason so I can fix the problem.

Thanks
chirag

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells for Reporting Services.

Thank You & Best Regards,

Hi,

For integration with Report Viewer, please manually add reference to Aspose.Cells for Reporting Services Report Viewer. Here are the steps involved:<o:p></o:p>

Step 1. Create windows application , add Microsoft Report Viewer component in windows form and create local report.

Step 2. Add a Reference to Aspose.Cells.ReportingServices.dll into your project.

Click References and select “Add References…” .

Click Browse label and select Aspose.Cells.ReportingServices.dll in “${installation folder}/bin/reportviewer2008” folder.

Step 3. Copy and paste the following Add Extension method into your project.

using System.Collections;

using System.Reflection;

using Microsoft.ReportingServices.ReportRendering;

using Microsoft.Reporting.WinForms ;

private static void AddExtension(Microsoft.Reporting.WinForms.ReportViewer viewer, string formatName, Type extensionType)

{

const BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;

FieldInfo previewService = viewer.LocalReport.GetType().GetField("m_previewService", flags);

MethodInfo listRenderingExtensions = previewService.FieldType.GetMethod("ListRenderingExtensions", flags);

IList extensions = listRenderingExtensions.Invoke(previewService.GetValue(viewer.LocalReport), null) as IList;

Assembly commonAssembly = typeof(IRenderingExtension).Assembly;

Type localRenderingExtensionInfoType = commonAssembly.GetType("Microsoft.Reporting.LocalRenderingExtensionInfo");

ConstructorInfo ctor = localRenderingExtensionInfoType.GetConstructor(flags,null,

new Type[] { typeof(string), typeof(string), typeof(bool), typeof(Type), typeof(bool) }, null);

object instance = ctor.Invoke(new object[] { formatName, formatName, true, extensionType, true });

extensions.Add(instance);

}

private void Form1_Load(object sender, EventArgs e)

{

// TODO: This line of code loads data into the 'asposeDataSet.aspose_test_table' table. You can move, or remove it, as needed.

this.aspose_test_tableTableAdapter.Fill(this.asposeDataSet.aspose_test_table);

AddExtension(this.reportViewer1, "Xls - Xls via Aspose.Cells", typeof(Aspose.Cells.ReportingServices.XlsRenderer));

AddExtension(this.reportViewer1, "Xlsx - Xlsx via Aspose.Cells", typeof(Aspose.Cells.ReportingServices.Excel2007XlsxRenderer));

AddExtension(this.reportViewer1, "CSV - CSV via Aspose.Cells", typeof(Aspose.Cells.ReportingServices.CSVRenderer));

AddExtension(this.reportViewer1, "SpreadsheetML - SpreadsheetML via Aspose.Cells", typeof(Aspose.Cells.ReportingServices.SpreadsheetMLRenderer));

AddExtension(this.reportViewer1, "Txt - TabDelimited text via Aspose.Cells", typeof(Aspose.Cells.ReportingServices.TabDelimitedRenderer));

this.reportViewer1.RefreshReport();

}

Step 4. Build and run application.

If you still face this issue, please post your project here and we will check it soon.



Thank you.

Hi,
I am using ASP.Net web technology and making web application.
I have put below code in Page.Load event.
AddExtension(ReportViewer1, “Xls - Xls via Aspose.Cells”, typeof(Aspose.Cells.ReportingServices.XlsRenderer));

AddExtension(ReportViewer1, “Xlsx - Xlsx via Aspose.Cells”, typeof(Aspose.Cells.ReportingServices.Excel2007XlsxRenderer));

AddExtension(ReportViewer1, “CSV - CSV via Aspose.Cells”, typeof(Aspose.Cells.ReportingServices.CSVRenderer));

AddExtension(ReportViewer1, “SpreadsheetML - SpreadsheetML via Aspose.Cells”, typeof(Aspose.Cells.ReportingServices.SpreadsheetMLRenderer));

AddExtension(ReportViewer1, “Txt - TabDelimited text via Aspose.Cells”, typeof(Aspose.Cells.ReportingServices.TabDelimitedRenderer));

And then …I have used below method for AddExtension.

private static void AddExtension(ReportViewer viewer, string formatName, Type extensionType)
{

const BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;

// CommonService.ListRenderingExtension is an internal method that returns a list of supported

// rendering extensions. This list is also stored in a class field so we can simply get this list

// and add Aspose.Cells for Reporting Services rendering extensions to make Microsoft Excel

// export formats appear on the dropdown.

// Get the service type.

FieldInfo previewService = viewer.LocalReport.GetType().GetField(“m_previewService”, flags);

// Get the ListRenderingExtensions method info.

MethodInfo listRenderingExtensions = previewService.FieldType.GetMethod(“ListRenderingExtensions”, flags);

// Obtan a list of existing rendering extensions.

IList extensions = listRenderingExtensions.Invoke(previewService.GetValue(viewer.LocalReport), null) as IList;

// LocalRenderingExtensionInfo is a class that holds information about a rendering extension.

// We should create an instance of this class to add the info about the specified extension.

// Since the IRenderingExtension interface is defined in the Microsoft.ReportViewer.Common

// assembly, use this trick to obtain the corresponding Assembly instance. This will work for

// both Report Viewer 2005 (8.0) and 2008 (9.0).

Assembly commonAssembly = typeof(IRenderingExtension).Assembly;

// Now, get the LocalRenderingExtensionInfo type as it is defined in the same assembly.

Type localRenderingExtensionInfoType = commonAssembly.GetType(“Microsoft.Reporting.LocalRenderingExtensionInfo”);

// Get the LocalRenderingExtensionInfo constructor info.

ConstructorInfo ctor = localRenderingExtensionInfoType.GetConstructor(flags,

null,

new Type[] { typeof(string), typeof(string), typeof(bool), typeof(Type), typeof(bool) },

null);

// Create an instance of LocalRenderingExtensionInfo.

object instance = ctor.Invoke(new object[] { formatName, formatName, true, extensionType, true });

// Finally, add the info about our rendering extension to the list.

extensions.Add(instance);


}

---------------------------
But still I am unable to see any Export to Excel option as per Aspose site display. Also, I have already given Aspose DLL reference in BIN folder also. Please do the needful.

Thanks
chirag

Hi Chirag,

Thank you for considering Aspose.

We have checked your code. Please check / update references of your project (Aspose.Cells.ReportingServices.dll, Microsoft.ReportViewer.Common.dll, Microsoft.ReportViewer.WebForms.dll and so on). Also, do you create local report? Please check and reference to our attached examples as per your need.

Thank You & Best Regards,