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

Guidance on creating ad hoc report mechanism

2 Answers 248 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 30 Jun 2015, 08:49 PM

Hello to all!

We have a requirement to create a system which will permit users to dynamically create "data extracts" for export via XLS format.

Imagine the following:

  • A "known" datasource which includes a list of available fields. The user would select which fields they want in the extract and then move around the selected fields to create a custom layout/ordering.
  • I'll know in advance the underlying datatype, i.e., string, integer, currency, etc., and default length of the fields.
  • Once the "Go" button is clicked, I could create a "simple" report programmatically by following the steps listed here: http://www.telerik.com/help/reporting/programmatic-control-of-reports.html and then persist the resulting Xml.
  • ​Once I had the custom report "structure" serialized to Xml, I'd then initiate a call to a Custom Report Resolver as described here: http://www.telerik.com/help/reporting/telerik-reporting-rest-custom-report-resolver.html.

While the above seems feasible, I'm wondering if I'm over complicating things and there is a far easier way.

Also, as I using the "Telerik Reporting Services Web API" functionality, I'm curious what is the best approach for using both the default and a custom resolver.

​Thanks.

Sam.

2 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 02 Jul 2015, 01:36 PM
Hi Sam,

The described approach seems feasible if you prefer users to work with your own custom UI. Other approach is to allow users to design reports with the Standalone Report Designer.

In general, the Standalone Designer tool is an immutable exe that cannot be integrated in other application, but can be extended with external assemblies containing business objects and custom functions - Extending Report Designer (the linked at the bottom articles are step-by-step tutorials for extending the tool and later deploying the reports) to ease end-users in retrieving data for reports. You can also create templates from which end-users to start new reports. Once configured you can distribute the modified configuration file and the tool to end-users (Telerik Reporting License agreement - 4. License for Redistribution ) as a part of your solution.


The created TRDX files can be directly deployed, where you will need to extend the application's configuration with any external assemblies used in the Standalone Designer. The plus is that you do not need to modify reports, instead you can replace the original external assembly with other that just has the same signature.

The XML in the TRDX file can be also deserialized in a custom resolver and further modified. The default report resolvers provide fallback option where you can use an instance of your own resolver. Note that the selected service's resolver will be called multiple times on resolving the report initially and further export/print operations. Thus consider caching any data retrieved in the resolver's Resolve method.
(for anyone concerned, the above lines are in the context of the HTML5 Report Viewer and Reporting REST service).


Let us know if you have any further questions.

Regards,
Stef
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Sam
Top achievements
Rank 1
answered on 04 Jul 2015, 03:11 AM

Hi Stef,

Thank you for replying, but using the report designer is beyond the capability of our small user community.

I'll proceed with the approach I describe coupled with the custom resolver and create a new question if I run into any 'gotchas'.

Thanks.

Sam.

Tags
General Discussions
Asked by
Sam
Top achievements
Rank 1
Answers by
Stef
Telerik team
Sam
Top achievements
Rank 1
Share this question
or