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

Change parent section at runtime (on export)

1 Answer 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Márcio
Top achievements
Rank 2
Márcio asked on 23 May 2011, 09:20 PM
I need to "move" a field from the Deatil Section to the Group Section when the user exports to CSV.

Here's why: When exporting to CSV and opening the document in Excel, every column present in he Group Section is repeated in every line of the CSV file, but the same does not happen to a grouping field that is within the Detail Section (unless it is the data of an unique register). Therefore, in order to make a field from Deatil Section repeat in every line, I have to "move" it to the Group Section when user exports to CSV.

Is there anyway to perform such action?

I'd appreciate any help.

All the best.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 May 2011, 07:49 AM
Hi Dias,

There is no concept for grouping field in the detail section. In fact the behavior you observe is by design and duly noted in our documentation: Design Considerations for CSV Rendering. Namely:

Group Header Section: Renders its content at the beginning of each detail row after the Report Header content if any.

The detail section renders a record for each detail row on a new line and this behavior is expected. Note that 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. More about the idea that lies behind the CSV format can be read here.

In short, there is no way to "move" a field when exporting to a specific format, and if you need such functionality, our suggestion would be to create a second report with changed layout according to your needs, which would be used for exporting to excel.

Greetings,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Márcio
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or