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

Can you tranform Report data before Exporting?

3 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abhay
Top achievements
Rank 1
Abhay asked on 17 Dec 2010, 09:45 PM
When exporting data from a Report to CSV or Excel format, we would like to transform the display data into internal data representation. For example, we will display a User friendly descriptive name on the report, but when exporting data we would like export internal DB equivalent instead (see below). Similarly, we would like to export additional columns during export if appropriate. Let me know if this is possible to do.

Report display
Loan #     Field Name
2       From Date
2       To Date
2       Buyer Amount


Exported Data
loan_id   uad_audit_field_name
2   l901_from_dt
2   l901_to_dt
2   l901_buyer_amt

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 Dec 2010, 05:00 PM
Hi Abhay,

There is no out of the box way to customize certain report items or sections according to the used rendering extension. However you can achieve the desired result if you create two similar reports - one with internal DB equivalent, set the Web Report Viewer ShowExportGroup property to False and add your own drop down and export button that will export the internal DB equivalent report to excel.

Greetings,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Abhay
Top achievements
Rank 1
answered on 05 Jan 2011, 12:36 AM
Hello,
Thanks for providing the code sample, that should work for us as far as customizing the export functionality. We are using the WPF ReportViewer control and I was not able to locate the ShowExportGroup property on the WPF ReportViewer, is the property supported only for the Web ReportViewer?

On a separate note, when we are exporting the data into XLS format, the date time does not export appropriately. It shows as "40542.70455" instead of "12/30/2010 4:54:33 PM". I have attached a snapshot of exported files for PDF (working) and XLS (not working). Is this a known issue? If so, do you know if it will be addressed soon?
0
Peter
Telerik team
answered on 07 Jan 2011, 08:51 AM
Hello Abhay,

The WPF Report Viewer is actually a template, and you can easily modify it with Blend. Thus we have not provided any special properties for modifying the WPF Report Viewer template.

TextBox values are converted to string or number cells in Excel depending on the actual value. If a supported .NET string format is supplied through the Format property of the TextBox, the resulting cell is accordingly formatted respecting the Culture of the TextBox.

Standard DateTime Format Strings

  • d (Short date pattern)
  • D (Long date pattern)
  • t (Short time pattern)
  • T (Long time pattern)
  • f (Full date/time pattern with short time)
  • F (Full date/time pattern with long time)
  • g (General date/time pattern with short time)
  • G (General date/time pattern with long time)
  • M or m (Month  day pattern)
  • R or r (RFC1123 pattern)
  • s (Sortable date/time pattern; conforms to ISO 8601)
  • u (Universal sortable date/time pattern)
  • U (Universal sortable date/time pattern)
  • Y or y (Year month pattern)
More information related on the topic is available in the Excel Rendering Extension help article.

Best wishes,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Abhay
Top achievements
Rank 1
Answers by
Peter
Telerik team
Abhay
Top achievements
Rank 1
Share this question
or