Hi
I have a problem because when I try to get a subreport in detail, it seems to be out of place, like subreport of page 1 appears in detail of report on page 2 and goes on
I call the subreport in this way in main report and set the pareter in detail_ItemDataBinding event for get a parameter for actual detail for show or hide this subreport :
Do you have any suggestions?
Thanks in advance
I have a problem because when I try to get a subreport in detail, it seems to be out of place, like subreport of page 1 appears in detail of report on page 2 and goes on
I call the subreport in this way in main report and set the pareter in detail_ItemDataBinding event for get a parameter for actual detail for show or hide this subreport :
private
void
detail_ItemDataBinding(
object
sender, EventArgs e)
{
// Get the detail section object from sender
Telerik.Reporting.Processing.DetailSection section = (Telerik.Reporting.Processing.DetailSection)sender;
// From the section object get the current DataRow
Telerik.Reporting.Processing.IDataObject dataObject = (Telerik.Reporting.Processing.IDataObject)section.DataObject;
object
rowdata = (
object
)section.DataObject.RawData;
subReport1.Visible =
false
;
if
(Convert.ToInt32(((System.Data.DataRow)rowdata)[
"GraphCount"
].ToString()) == 0)
{
Unit unitX = Unit.Inch(0.1);
Unit unitY = Unit.Inch(0.0);
SizeU size =
new
SizeU(Unit.Inch(1), Unit.Inch(0.5));
subReport1.Location =
new
PointU(unitX, unitY);
subReport1.Size = size;
unitY = unitY.Add(Unit.Inch(1));
subReport1.Visible =
true
;
subReport1.ReportSource =
new
rtSubReport(Convert.ToInt32(
this
.ReportParameters[
"id"
].Value), Convert.ToInt32(((System.Data.DataRow)rowdata)[
"num"
].ToString()));
}
}
Do you have any suggestions?
Thanks in advance