I have N number of Panel's that I want to stack vertically in my report. Each of those Panel's contains M number of child Panel's, which I also want to stack vertically. Each of these children contains a one or more TextBox/HtmlTextBox/Table's of an unknown size. I need everything to be dynamically sized, I do no know about the size of anything in advance. The report will be exported to PDF format.
A complete code sample is shown below. It creates 3 root level Panel's and each of these contains 2 child Panel's, which contains 2 TextBox's. Why is some of the content missing?
A complete code sample is shown below. It creates 3 root level Panel's and each of these contains 2 child Panel's, which contains 2 TextBox's. Why is some of the content missing?
public
partial
class
Report : Telerik.Reporting.Report
{
public
Report()
{
InitializeComponent();
for
(
int
i = 0; i < 3; ++i)
{
Panel panel =
new
Panel()
{
Docking = DockingStyle.Top,
};
for
(
int
j = 0; j < 2; ++j)
{
panel.Items.Add(GetPanel(j));
}
this
.detail.Items.Add(panel);
}
this
.detail.Items[0].Style.BackgroundColor = Color.LightBlue;
this
.detail.Items[1].Style.BackgroundColor = Color.LightCoral;
this
.detail.Items[2].Style.BackgroundColor = Color.LightCyan;
}
private
Panel GetPanel(
int
i)
{
Panel panel =
new
Panel()
{
Docking = DockingStyle.Top,
};
TextBox textBox1 =
new
TextBox()
{
Docking = DockingStyle.Left,
Location =
new
PointU(Unit.Mm(0D), Unit.Mm(0D)),
Size =
new
SizeU(Unit.Mm(50D), Unit.Mm(0D)),
Value = i +
" - Text Box"
};
panel.Items.Add(textBox1);
TextBox textBox2 =
new
TextBox()
{
Docking = DockingStyle.Fill,
Location =
new
PointU(Unit.Mm(50D), Unit.Mm(0D)),
Size =
new
SizeU(Unit.Mm(124D), Unit.Mm(0D)),
Value = i +
" - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eleifend, dolor ac posuere sollicitudin, nisl nisl hendrerit odio, at pulvinar orci odio vitae ante. Phasellus sapien neque, dignissim nec libero id, iaculis fermentum risus. Aliquam erat volutpat. Praesent mattis lorem vel vulputate fringilla. Donec posuere dui vel nisi egestas, sit amet egestas sapien accumsan. Nullam vehicula ac eros sit amet congue. Integer gravida dolor sit amet justo ultricies, ac euismod nisi auctor. Proin et sem laoreet, sollicitudin ipsum sed, pharetra quam. Sed dapibus, erat in hendrerit tincidunt, dui arcu lacinia mi, maximus ullamcorper purus diam ac nisl. Nunc pulvinar ante vel semper posuere. Ut in pretium sapien. Interdum et malesuada fames ac ante ipsum primis in faucibus. Ut sit amet egestas sem. Duis faucibus libero turpis, sit amet finibus nisl hendrerit nec. "
};
panel.Items.Add(textBox2);
return
panel;
}
}