Change parent section at runtime (on export)

2 posts, 0 answers
  1. Márcio
    Márcio avatar
    47 posts
    Member since:
    Sep 2006

    Posted 23 May 2011 Link to this post

    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.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 27 May 2011 Link to this post

    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
  3. DevCraft banner
Back to Top