Has anyone tried to dynamically pass in DataTableMapping and DataColumnMapping to a report that has been created? I am attemtping to do this. I have various reports and based on the report I select, I pass in the dataadapter and connection string.
string strSP = name of stored procedure
sqlSelectCommand1.CommandText = "dbo." + strSP;
sqlSelectCommand1.CommandType = CommandType.StoredProcedure;
sqlConnection1.ConnectionString = SqlClient.GetConnectionStr();
sqlSelectCommand1.Connection = sqlConnection1;
sqlDataAdapter1.SelectCommand = sqlSelectCommand1;
Can I do the mapping in this code or do I have to do the mappings within the report itself?
Report report = new Report();
report.DataSource = sqlDataAdapter1;
ReportViewer1.Report = report;
ReportViewer1.Report = new InvoiceReport();
I am unable to accomplish this because this is the code I have.
string strddl = ddl1.SelectedItem.Value + "()";
ReportViewer1.Report = new strddl;
Or I have been trying to do this as well...
Telerik.Reporting.Report report = (Telerik.Reporting.Report)ddl1.SelectedItem.Value;
How do I pass in the string value of the report name into the reportviewer1.report loading declaration?
Have any ideas?
Thanks
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
[OverflowException: Overflow error.] |
The goal of the Telerik Forum is to provide all registered users with a way to find answers to their questions before officially contacting Telerik. In case you need a faster and precise response, please start a new support ticket as it gets higher priority than Forum posts.
A post in the Forums doesn't guarantee you a response from the Telerik support team although 95% of all posts are eventually addressed. Additionally, a post is not assigned a response time as with the support ticketing system.
The Forums can be used to:
Telerik strives to constantly improve its support services but it is essential to have full information to supply precise replies. If we do not have enough details we will not be able to properly address your inquiry and we will ask for further info. The extra loop is sure to slow down the time it takes to resolve your problem, and subsequently the further development of your project.
It is vital that you follow these guidelines in order to receive an accurate response:
ENJOY!!!
Best Wishes,
The Telerik team