Hello everyone,
I'm facing a problem with telerik reportviewer. I am adding a reportviewer to an ascx UserControl like so:
and I have a report named test.cs that only containts a simple textbox in the header section and another textbox in the detail section. Both values were hardcoded for testing purposes because I was facing this problem with a much more complex report. But for the sake of easyness I setup this example for you:
this is the a part of my teste.designer.cs auto-generated code regarding the above mentioned textboxes definition:
Then, on the code-behind of my ascx control I setup my reportviewer like so:
Being "teste" my report class.
Then I put my usercontrol inside an aspx page and when I launch the page using Web Development Server from MS Visual Studio 2008 all I get is an empty reportviewer. However, if I try to print the "blank" report, it prints everything as it should!! Both textboxes are printed correctly.
If I place a reportviewer directly on an aspx page then the reports are correctly rendered....
Anything I'm missing here when using a reportviewer inside an usercontrol?
I'm facing a problem with telerik reportviewer. I am adding a reportviewer to an ascx UserControl like so:
<telerik:ReportViewer ID="rpvIssues" runat="server" Width="100%" Height="100%"> |
</telerik:ReportViewer> |
and I have a report named test.cs that only containts a simple textbox in the header section and another textbox in the detail section. Both values were hardcoded for testing purposes because I was facing this problem with a much more complex report. But for the sake of easyness I setup this example for you:
this is the a part of my teste.designer.cs auto-generated code regarding the above mentioned textboxes definition:
// |
// textBox1 |
// |
this.textBox1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.4000000953674316, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.4999997615814209, Telerik.Reporting.Drawing.UnitType.Cm)); |
this.textBox1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9999997615814209, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.60000008344650269, Telerik.Reporting.Drawing.UnitType.Cm)); |
this.textBox1.Value = "DETAIL SAMPLE TEXT"; |
// |
// textBox2 |
// |
this.textBox2.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(3.2999999523162842, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1.2000000476837158, Telerik.Reporting.Drawing.UnitType.Cm)); |
this.textBox2.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.0000002384185791, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.59999990463256836, Telerik.Reporting.Drawing.UnitType.Cm)); |
this.textBox2.Value = "TITLE SAMPLE TEXT"; |
Then, on the code-behind of my ascx control I setup my reportviewer like so:
protected void Page_Load(object sender, EventArgs e) |
{ |
teste t = new teste(); |
rpvIssues.Report = t; |
} |
Then I put my usercontrol inside an aspx page and when I launch the page using Web Development Server from MS Visual Studio 2008 all I get is an empty reportviewer. However, if I try to print the "blank" report, it prints everything as it should!! Both textboxes are printed correctly.
If I place a reportviewer directly on an aspx page then the reports are correctly rendered....
Anything I'm missing here when using a reportviewer inside an usercontrol?