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

Export to Word - Report Viewer

4 Answers 257 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alessandro
Top achievements
Rank 1
Alessandro asked on 06 Nov 2015, 03:23 PM

Hi,

I am encountering a problem during the Export to Word from the Report Viewer.

I added the references to DocumentFormat.Open XML(v. 2.5.5631.0)  and  Telerik.Reporting.OpenXMLRendering (Q2 2015 SP1).

The export in XLSX, PPTX and PDF runs fine, but when i try to export to DOC i get this Error:

[OpenXmlPackageException: "Only one instance of the type is allowed for this parent"]

---- DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer.InitPart(.....)

---- DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer.AddNewPartInternal(.....)

---- ​Telerik.Reporting.OpenXmlReader.Wordprocessing.DocumentBuilder.get_​Settings(.....)

 

 Googlin' didn't help me, but from what i can see, seems to be related to the document content. But i don't understand why. The excel / pdf / ppt works fine.

I have a copy of the Telerik.Reporting Cache Files if you need it

 

Thanks

 

 

 

4 Answers, 1 is accepted

Sort by
0
Alessandro
Top achievements
Rank 1
answered on 09 Nov 2015, 12:55 PM

Hi,

could anybody from the Support just answer and give me some hint ?

Are there any specific document settings/content that must be respected in order to have the export in DOCX working correctly?

Thanks

 

 

0
Nasko
Telerik team
answered on 10 Nov 2015, 03:09 PM
Hello Alessandro,

The issue indeed seems to be related to the report content. In order to give you any suggestions we will need to review a runnable version of the report exhibiting the problematic behavior. Please open a new support ticket where you will be able to zip and attach the requested report.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Alessandro
Top achievements
Rank 1
answered on 10 Nov 2015, 04:46 PM

Hello Nasko,

thanks for answering. I have actually discovered that the issue seems to be related to only certain reports.

That is, all the "ReportBook" objects , which consists of more that one "Report", cannot be exported in DOC.

If i run the same page, leaving only "Report" at a time, it exports it correctly. While, if i add just one more Report to the ReportBook, the DLL returns the error  "Only one instance of the type is allowed for this parent".

 

Does it make sense to you?

If it's the case, you should highlight this in the documentation.

 

Thanks

Alessandro

0
Nasko
Telerik team
answered on 13 Nov 2015, 12:31 PM
Hello Alessandro,

The Report Book Demo which contains multiple reports is exported successfully to DOCX format.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Alessandro
Top achievements
Rank 1
Answers by
Alessandro
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or