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

formatting specific for platform

3 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon H.
Top achievements
Rank 1
Simon H. asked on 30 Apr 2014, 06:01 PM
Hi all,

Suppose I want to apply a transformation specific to the output document format. Specifically, I need to format certain cells in the xslx table: say, all cells except the first one in a certain column formatted as dates, all cells in a certain row formatted as having a thick black border at the bottom, and so on. These transformations only apply to the xslx and not to any other output formats.

What would be the recommended way to achieve this?

Thank you!

3 Answers, 1 is accepted

Sort by
0
Accepted
Nasko
Telerik team
answered on 02 May 2014, 01:11 PM
Hello Simon,

The Telerik Reporting engine and the Report Viewers do not provide an out-of-the-box option to style the report/change its definition based on the selected export format.
In order to have such functionality, you will need to build your own custom UI in your application which will give users the option to select an export format. Then on exporting to the selected format you can create a new instance of the report, change its report definition based on the selected export format, and export it programmatically as explained in the Exporting Report Programmatically help article.

I hope the provided information and resources point you in the right direction.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Simon H.
Top achievements
Rank 1
answered on 02 May 2014, 01:32 PM
Thanks for a quick reply! I see I will have to effectively build a separate report definition based on the existing one but differing in the UI. That should be straightforward.

I wonder, however, whether I would need to build a separate UI control to allow the user to initiate the export. Perhaps it might be possible to use the existing exporting control Telerik provides out of the box, intercept the exporting request (or exporting event?) and then substitute a new report built on the basis of the existing one? I wonder if there are any provisions for that.

Thank you!
0
Nasko
Telerik team
answered on 07 May 2014, 11:04 AM
Hello Simon,

You need to create your own UI and behavior to handle the new operation. It can be added to your application UI, or you can modify the report viewer itself. Depending on the used report viewer you may or may not be able to customize the default report viewer UI.
For more information on report viewer customizations, please check the following resources:
Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Simon H.
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Simon H.
Top achievements
Rank 1
Share this question
or