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

Creating report from SQL

1 Answer 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wesley
Top achievements
Rank 1
Wesley asked on 23 Apr 2012, 09:24 AM
Dear People,

In my ASP.NET/C# application I create a SQL String based on user input. This SQL String can contain a different table, colums etc. everytime the user sets values. Now I need to make a report containing the return data of the database. The problem is, there are no default tables and colums, so I can't predefine them in the designer. Is it possible to generate a report in code, without predefining the tables and or colums? If yes, how can i realize this?

Thank you in advance!

Kind regards,
Wesley

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 23 Apr 2012, 04:01 PM
Hi Wesley,

Generally you can control the data source query via DataSourceParameter that is wired up to a ReportParameter but this way you would only have control over filtering, sorting, grouping your data.
If you build the entire connection and select statement on the fly via some UI presented to the user, then you would have to build the reports programmatically as well. For more information, please check our online help articles which are in the Programmatic Control of Reports help section and of course the Reporting API.

Greetings,

Petio Petkov
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Wesley
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or