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

How can I prevent textboxes with aggregate functions from showing up on the CSV export?

2 Answers 118 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
theksmith
Top achievements
Rank 1
theksmith asked on 16 Nov 2010, 04:31 AM
2010 Q3 Reporting, using the Web Report Viewer:

Is there any way within an event for the Report object, or within an event for the Web Report Viewer control to detect that a report is being rendered to CSV and programmaticly modify the report layout (in order to hide any textboxes that have aggregate functions).

I have many reports with several groups and group "total" rows. This layout is desired for online/print/excel, but it's making the CSV export completely useless since there are so many "total" columns exported along with the actual data columns.

Alternatively, if this can't be handled via code on the Report object or the page that houses the Web Report Viewer control - then can I extend or replace the actual CSV rendering module easily?

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 17 Nov 2010, 05:03 PM
Hi theksmith,

This behavior of the CSV rendering extension is by design, you can read more info about its peculiarities in Design Considerations for CSV Rendering help article. Basically we denormalize the data, as the main purpose of the CSV format is to transfer data between different information systems (programs). For example you may import it in MS Excel or Word. For this reason the CSV format is not designed to be human-readable and is not "WYSIWYG" as Pdf, Html or Excel formats.
Generally it is possible to create your own rendering extension according to your specific requirements, although be aware that this is not documented on purpose and is not supported. I've attached a sample project that shows you how it is done.

Best wishes,
Steve
the Telerik team
See What's New in Telerik Reporting in Q3 2010 on Wednesday, November 17, 11am Eastern Time: Register here>>
0
theksmith
Top achievements
Rank 1
answered on 17 Nov 2010, 07:27 PM

Thank you very much for the sample project, I will review it later today.

"...as the main purpose of the CSV format is to transfer data between different information systems (programs). For example you may import it in MS Excel or Word. For this reason the CSV format is not designed to be human-readable...Generally it is possible to create your own rendering extension according to your specific requirements, although be aware that this is not documented on purpose and is not supported."

I'm sure Telerik has been doing this long enough to realize that you can't expect to know or understand every user requirement that will arise.

In my case, the users are familiar with, and prefer to work with data in Excel - but want just raw data. They do not want all the "junk" that the Excel renderer outputs, so they want CSV. However, they also expect to be able to have a report that is "pretty" for online viewing/printing while at the same time being able to export it and get just data that they can play with in Excel (and of course they don't want to have to delete a bunch of what they consider "junk" CSV columns). For a large number of reports, it is not feasible to have to create 2 versions of each report, when simple modifications during the rendering could achieve the desired results.

My point is that I would expect Telerik to strive to create highly extendable software, not decide for us what a particular functionally should and shouldn't be for. Please consider "opening up" the rendering functionality within Telerik Reporting, either through events and objects on the viewers or via official support for extending/overriding behaviors within the Rendering Extensions.

Thanks again for the sample project.

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