Hello,
as usually I have a table in my report.
In this case it is a table who shows travelling expenses.
And now I want to export the table datas in a csv file.
But the output is not that what I want.
Please see the attached file!
It is a jumble of datas with Layout information textBox1,textBox3,textBox2, and so on.
The column headings should appear only in the first line of the csv file.
I also have some textboxes with content Format("created on: {0:dd/MMM/yyyy HH:mm} ", Now()) and "Reisekosten Report" in the report header, which should not appear in the csv file.
To make it short: How can I influence the output?
Best regards
Simon
4 Answers, 1 is accepted

UPDATE:
With the help of this site, all these Layoutinformation in the csv file I got it off.
https://docs.telerik.com/reporting/device-information-settings-csv?_ga=2.143424949.1850321217.1574669102-771678943.1574408885
But it is still not the desired result.
The column header should only be displayed in the first row of the csv file.
And then in the other rows the content.
But what I now have in the csv file is from structure: column header, content, column header, content, column header,content (in one row)
How can I solve this issue?
Best regards
Simon
Hello Simon,
The observed behavior is by design, e.g. the Table will be flattened and the name of the column with its value will be displayed for each table row. You may turn off the static headers by setting NoStaticText to true in the configuration file as explained in the referred article. The headers (if static) will not be shown in the first row though. For more information on the CSV format, you may check the Design Considerations for CSV Rendering article.
If you use some of our viewers, you may handle the ExportEnd event, where to get the document and modify it as required. For example, for the Html5 Report Viewer the exportEnd(e, args) args.url contains the URL of the exported report as a resource. You may get it and add the table columns names.
Regards,
Todor
Progress Telerik

Hi,
Ok, I have managed it.
In my project I have more than one report - at least 4 reports.
I have learned that I can make some settings in the app.config.
<
Telerik.Reporting
>
<
Extensions
>
<
Render
>
<
Extension
name
=
"IMAGE"
visible
=
"false"
>
</
Extension
>
<
Extension
name
=
"XPS"
visible
=
"false"
>
</
Extension
>
<
Extension
name
=
"MHTML"
visible
=
"false"
>
</
Extension
>
<
Extension
name
=
"XLS"
visible
=
"true"
>
</
Extension
>
<
Extension
name
=
"CSV"
visible
=
"true"
>
<
Parameters
>
<
Parameter
name
=
"NoHeader"
value
=
"false"
/>
<
Parameter
name
=
"NoStaticText"
value
=
"true"
/>
<!--<Parameter name="FieldDelimiter" value=", "/>-->
</
Parameters
>
</
Extension
>
<
Extension
name
=
"RTF"
visible
=
"false"
>
</
Extension
>
<
Extension
name
=
"PDF"
visible
=
"true"
>
<
Parameters
>
<
Parameter
name
=
"DocumentAuthor"
value
=
"TMS"
/>
</
Parameters
>
</
Extension
>
</
Render
>
</
Extensions
>
</
Telerik.Reporting
>
These settings are valid in the same way for all reports.
Now, how can I make special settings for one report.
What I mean is: In one report CSV is visible and in another report not.
Is it possible to distinguish the reports in the app.config file?
Best regards
Simon
Hi Simon,
The application settings in the configuration file will be applied to the entire application, including all viewers and it is not possible to specify reports that can be exported in CSV and others that cannot.
As a workaround, you may use a custom UI for export and handle the export with custom code, e.g. using the Report Processor class.
Note that you may customize the report based on the export format - check the RenderingFormat Global Object.
Regards,
Todor
Progress Telerik