Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to dynamically create a report in an ASP.NET Web Forms application (with a SQL query as a data source)

$
0
0

Description:
 I need to implement a generic kind of web report viewer to display the result of my SQL query, which accepts some parameters.

Solution:
 This can be done by creating an XRTable control dynamically.

To pass a table name (which is a query parameter), you can use a query string variable. As a result, you can pass the "TableName" parameter as follows:
http://hostname/PassSQLQuery/ReportViewer.aspx?TableName=Customers.

Then, the XtraReport code-behind methods will populate data using the SQL query, which returns all the table rows from the table.
In the final step, an XRTable control is created, and gets bound to the column names of the data table.

Question Comments

Added By: Krishna Raj 1 at: 8/27/2015 12:06:02 AM    

I have tried the below sample to my current project using dataset as the binding source but got the blank report at the end.

Added By: Vasily (DevExpress Support) at: 8/27/2015 1:56:13 AM    

Hello Krishna,

To process your recent post more efficiently, I created a separate ticket on your behalf: T282890: How to dynamically create a report in an ASP.NET Web Forms application. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Basil Kadara at: 11/4/2015 9:52:24 PM    

Hi ,

i want to deign the report and bind only the values at run time , because it is difficult to align the controls during run time.

is there a way to place the controls during design time and just bind the values at run time in asp.net web application.

Added By: Jannet (DevExpress Support) at: 11/4/2015 11:21:43 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T308234: How to place the controls during design time and just bind the values at run time in asp.net web application. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>