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
I'm trying out the Telerik Reporting software. Everytime I try to display a report that I've created I get the same error...
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Reporting.ImageRendering.CanvasBase.MeasureString(...)
...and the error message goes on much longer than that.
I even get this error when following the Quick Start tutorial.
Can someone help me out so I can evaluate whether or not Telerik Reporting is suitable for my project.
Thanks, Bryan
| private void ShowReport(DataTable mydt1) |
| { |
| try |
| { |
| Report report = new Report(); |
| DetailSection detail = new DetailSection(); |
| Telerik.Reporting.ReportItemBase[] mylist = new ReportItemBase[mydt1.Columns.Count]; |
| int icol = 0; |
| foreach (DataColumn col in mydt1.Columns) |
| { |
| mylist[icol] = createtextbox(col.ColumnName.ToString()); |
| icol++; |
| //detail.ColumnCount++; |
| } |
| detail.Items.AddRange(mylist); |
| report.DataMember = "HIPAAlog"; |
| report.DataSource = mydt1; |
| report.Items.Add((ReportItemBase)detail); |
| detail.KeepTogether = false; |
| ReportViewer1.Report = report; |
| ReportViewer1.Visible = true; |
| } |
| catch (Exception ex) |
| { |
| throw (ex); |
| } |
| } |
| private void ShowReport(DataTable mydt1) |
| { |
| try |
| { |
| Report report = new Report(); |
| //DetailSection detail = new DetailSection(); |
| //Telerik.Reporting.ReportItemBase[] mylist = new ReportItemBase[mydt1.Columns.Count]; |
| //int icol = 0; |
| //foreach (DataColumn col in mydt1.Columns) |
| //{ |
| // mylist[icol] = createtextbox(col.ColumnName.ToString()); |
| // icol++; |
| // //detail.ColumnCount++; |
| //} |
| //detail.Items.AddRange(mylist); |
| report.DataMember = "HIPAAlog"; |
| report.DataSource = mydt1; |
| //report.Items.Add((ReportItemBase)detail); |
| detail.KeepTogether = false; |
| ReportViewer1.Report = report; |
| ReportViewer1.Visible = true; |
| } |
| catch (Exception ex) |
| { |
| throw (ex); |
| } |
| } |
| private Telerik.Reporting.TextBox createtextbox(string FieldName) |
| { |
| Telerik.Reporting.TextBox textBox2 = new Telerik.Reporting.TextBox(); |
| textBox2.Value = "=[" + FieldName + "]"; |
| textBox2.TextWrap = false; |
| textBox2.CanGrow = true; |
| textBox2.CanShrink = true; |
| return textBox2; |
| } |