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.