This is a migrated thread and some comments may be shown as answers.

Subreports overlap

1 Answer 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Al asked on 28 Sep 2009, 08:43 PM
I have generated some subreports with some of my newbie code.  However, they overlap and i have read about making them none zero ni hieght but can not get this to work.

 

Public Sub New()

 

InitializeComponent()

 

Dim mobjCert As New objCertificate(mJobNumber)

 

 

Dim MySubReport As Telerik.Reporting.SubReport

 

 

Dim mobjTemplate As New objTemplate(mobjCert.TemplateCode)

 

 

For tempcounter As Int16 = 1 To mobjTemplate.Count

 

    AddTestSubReports(MySubReport, mobjTemplate.TestCode(tempcounter - 1),

"Test " + tempcounter.ToString + " " + mobjTemplate.TestTitle(tempcounter - 1))

 

 

Next

 

 

End Sub

 

 



Private
Sub AddTestSubReports(ByVal MySubReport As Telerik.Reporting.SubReport, ByVal mTestCode As String, ByVal mTestTitle As String)

 

MySubReport =

New Telerik.Reporting.SubReport

 

MySubReport.Size =

New Telerik.Reporting.Drawing.SizeU(New Telerik.Reporting.Drawing.Unit(15.082725524902344, Telerik.Reporting.Drawing.UnitType.Cm), New Telerik.Reporting.Drawing.Unit(1.7001994848251343, Telerik.Reporting.Drawing.UnitType.Cm))

 

MySubReport.Style.Padding.Bottom =

New Telerik.Reporting.Drawing.Unit(1, Telerik.Reporting.Drawing.UnitType.Cm)

 

MySubReport.Dock = System.Windows.Forms.DockStyle.Top

MySubReport.Top =

New Telerik.Reporting.Drawing.Unit(1, Telerik.Reporting.Drawing.UnitType.Cm)

 

MySubReport.Name =

"SubReport2"

 

MySubReport.Style.BorderColor.Default = System.Drawing.Color.MidnightBlue

MySubReport.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid

MySubReport.Style.Color = System.Drawing.Color.Transparent

 


Dim
mobjTestTest As New objTestTest(mTestCode)

 

 

Dim mobjHeaders As New objTestHeading(mTestCode)

 

 

Dim txtTemp As New Telerik.Reporting.TextBox

 

 

Dim SubRep As New CertificatTestSubRep1

 

MySubReport.ReportSource = SubRep

SubRep.txtTestName.Value = mTestTitle

DeleteUnwantedSubRepItems(mobjHeaders.Count, SubRep, mobjHeaders)

SubRep.DataSource = mobjTestTest.dtTestTest

 

Me.DetailSection1.Items.Add(MySubReport)

 

 

End Sub

many thanks

Alo

 

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 29 Sep 2009, 10:40 AM
Hi Al,

You have not specified Location for the subreport items and this way their location would always be 0,0 and they would be on top of each other. Setting size and location is mandatory when creating report items.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Al
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or