How do I export to WORD? I am using winform.
I can do to PDF and XLS DOC for not more!!
reportViewer1.ExportReport(
"DOC"
,
new
Hashtable()); // BAD
reportViewer1.ExportReport(
"XLS"
,
new
Hashtable()); // OK
reportViewer1.ExportReport(
"PDF"
,
new
Hashtable()); // OK
Could someone help me?
reportViewer1.ExportReport(
"DOC"
,
new
Hashtable()); // BAD
reportViewer1.ExportReport(
"XLS"
,
new
Hashtable()); // OK
reportViewer1.ExportReport(
"PDF"
,
new
Hashtable()); // OK
20 Answers, 1 is accepted
![](/forums/images/avatarimages/default.gif)
http://www.telerik.com/help/reporting/programmatic-exporting-report.html
I don't see a DOC output. But I do see an RTF output that could be imported into Word.
Does this help any?
Bernie
This is a quick follow up to let you know that in Q1 2011 we've added new export formats based on Office Open XML standards available in Microsoft Office 2007 and above:
- Excel Worksheet (.xlsx)
- Word Document (.docx)
- PowerPoint Presentation (.pptx)
Kind regards,
Steve
the Telerik team
![](/forums/images/avatarimages/b9f71464-f0b3-4e7b-83d9-6d4b2bf4e33bk%20logo.jpg)
I am trying to export the report programmatically but I am getting a "RendererNotAvailableException... rendering format is not available" for the following formats:
- DOCX
- HTML
- PPTX
- XPS
Here is my code:
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport(format, reportToExport, deviceInfo);
reportBytes = result.DocumentBytes;
if (reportBytes != null && reportBytes.Length > 0)
Mailer.SendNotifications(_report, reportBytes);
Am I missing something?
Can you also give me a sample code to export in HTML format? It needs the CreateStream, right?
Your prompt reply would be greatly appreciated!
Warm Regards,
Mae
As noted in the Deploying Applications using Telerik Reporting help section, the DOCX/PPTX/XLSX rendering extensions require Telerik.Reporting.OpenXmlRendering.dll and Open XML SDK 2.0 for Microsoft Office (DocumentFormat.OpenXml.dll v.2.0.5022.0 or above).
The XPS rendering extension requires Telerik.Reporting.XpsRendering assembly (Telerik.Reporting.XpsRendering.dll). In both cases your project should be targeting .NET 3.5 Framework or above.
About exporting to HTML, please refer to the Exporting Report Programmatically help article, specifically "Exporting a report to a multi page format" section.
All the best,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >
![](/forums/images/avatarimages/b9f71464-f0b3-4e7b-83d9-6d4b2bf4e33bk%20logo.jpg)
I have added all these 3 dlls but I am still getting the mentioned exception.
I am using .Net Framework 4.
Can you think of other reasons?
Warm Regards,
Mae
These are the only requirements to have the new rendering formats available. If you can prepare a runnable project that shows the problem, we would gladly review it and advise you.
Kind regards,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >
![](/forums/images/avatarimages/default.gif)
I added the dll files you had listed and the export functions work fine in the local mode. When I publish them to a web site I no longer am able to export to Word or Excel 2007. What am I missing?
Thanks,
Have you deployed the required assemblies for the new export formats as well? Check out the Deploying help articles depending on your project type in the Using Telerik Reporting in Applications help section.
Kind regards,
Steve
the Telerik team
HAPPY WITH TELERIK 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!
![](/forums/images/avatarimages/default.gif)
DocumentFormat.OpenXml.dll
Telerik.Reporting.dll
Telerik.Reporting.OpenXmlRendering.dll
Telerik.Reporting.Service.dll
Telerik.ReportViewer.WebForms.dll
Telerik.Web.UI.dll
We do not see any reason why those export options are missing from your viewer. Do you exhibit the same problem if you deploy to your local IIS on the dev machine? If you can reproduce this problem on couple of machines, we would appreciate providing us with a runnable project we can run locally and investigate.
Greetings,
Steve
the Telerik team
HAPPY WITH TELERIK 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!
![](/forums/images/avatarimages/default.gif)
![](/forums/images/avatarimages/default.gif)
but to no avail. Any help would be appreciated other wise there is no way of sending a project that will run for you.
Whether the report is databound or not is totally irrelevant in this case, as we're trying to reproduce an issue of missing export formats in the report viewer. So as far as sample report is concerned, it might as well be empty and unbound or you might not even create a report, but simply assign the base class i.e.:
InstanceReportSource reportSource =
new
InstanceReportSource();
reportSource.ReportDocument =
new
Telerik.Reporting.Report();
this
.ReportViewer1.ReportSource = reportSource;
All the best,
Steve
the Telerik team
HAPPY WITH TELERIK 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!
![](/forums/images/avatarimages/default.gif)
You should compare the differences in the deployed assemblies for your test project as well as your web.config entries if you are using the Telerik Reporting Configuration Section in your project. You might also consider copying over the files from your existing project to a new one which you verified has them.
If you're unable to identify the problem, try to isolate the issue as much as possible and attach a runnable project in official support ticket, so we can review it and advise you.
Regards,
Steve
the Telerik team
HAPPY WITH TELERIK 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!
![](/forums/images/avatarimages/default.gif)
When you run a report, the drop down in the center of the report header includes the following four options: Acrobat (PDF) file, Excel 97-2003, TIFF file and XPS Document. It does not include an entry for Word DOCX.
The app.config file contains the following
<Telerik.Reporting> <Extensions> <Render> <!-- Disable export of reports to formats that don't render well --> <Extension name="PDF" visible="true" /> <Extension name="DOCX" visible="true" /> <Extension name="XLS" visible="true" /> <Extension name="IMAGE" visible="true" /> <Extension name="XPS" visible="true" /> <Extension name="MHTML" visible="false" /> <Extension name="CSV" visible="false" /> <Extension name="RTF" visible="false" /> </Render> </Extensions> </Telerik.Reporting>
Today I added the reference to DOCX here but it did not seem to help. I have been told that the DOCX export was previously available until recently but I have not been able to confirm that.
I removed and re-added the references to the two required DLL files at the project level but that did not seem to help either.
Do we need any explicit reference in the app.config file to the DLL's?
This project is in a much larger solution which consists a more than twenty projects.
Please advise.
In our local tests we are unable to reproduce the experienced difficulty on our end. Check out the demos that came with you Telerik Reporting installation and if you need additional assistance we will need the problematic project to review on our end. Thus we will appreciate if you open a support thread and send us the project.
Regards,Peter
Telerik
Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.
![](/forums/images/avatarimages/default.gif)
I would like to ask a number of specific questions.
1. Should I be using a newer version than Telerik.Reporting.OpenXmlRendering.dll, Version 6.2.13.110 ?
2. Should I be using a newer version than DocumentFormat.OpenXml.dll, Version 2.0.5022.0.?
3. Are the versions of these DLL's which we are using compatible with the version of Telerik controls which we are using, Version 2012.3.1129.45?
4. To see the Word DOCX option in the list of export options, is is necessary to include the line
<Extension name="DOCX" visible="true" />in the Telerik.Reporting section of our app.config file or should this appear by default if the appropriate DLL files are present?
5. Is there a requirement for any specific reference to these two DLL files in our app.config file or is it sufficient that they be referenced in the project file itself along with other DLL references?
Thanks.
Up to your questions:
- The OpenXML document formats are working correctly with 6.2.13.110. You don't have to upgrade.
- We successfully use DocumentFormat.OpenXml.dll v.2.0.5022.0 in our demos.
- The RadControls shouldn't interfere with Telerik Reporting OpenXML rendering extensions.
- If the required assemblies are loaded successfully in the application domain the OpenXML rendering extension will be added automatically to the export list. You don't have to specify the extension element.
- Project reference with copy local set to true is sufficient.
You may find useful the demos that came with your Telerik Reporting installation and Deploying Web Applications help article.
Regards,Peter
Telerik
Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.
![](/forums/images/avatarimages/default.gif)
In our case, the problem turned out to be that the reference to DocumentFormat.OpenXml.dll was not in the correct project.
For the benefit of others with a similar problem, I would note that your sample application, CSharp.ReportExamples.VS2010 does not have a reference to Telerik.Reporting.OpenXmlRendering.dll and when I removed that DLL from the project in which the reference to DocumentFormat.OpenXml.dll solved my problem, the option to export to Word (and PPT and Excel xlsx) remained available. This experimental evidence suggests that a reference to this DLL is unnecessary. If you believe differently, please explain.
Identifying which project should contain the reference to DocumentFormat.OpenXml.dll in our case was not so simple as it turned out not to be either the project containing the actual reports nor the project which launches the reports. Rather it turned out to be the root client project. Any guidance which you might give in this respect would also be welcome.
I would also note that when I set the references to DocumentFormat.OpenXml.dll and Telerik.Reporting.OpenXmlRendering.dll, by default Copy Local was set to true for the former file and false for the latter file.