Private Sub btnReport_Click(sender As Object, e As EventArgs) Handles btnReport.Click Dim rptTestReport As New Report() ' Report Dim dsReportDataSet As New DataSet() ' Dataset Dim pageReport As New ReportPage() ' Report page Dim __strReportFile = New HTMLExport() ' Generated report (HTML) Dim bandGroup As New GroupHeaderBand() ' Group band Dim bandSubGroup As New GroupHeaderBand() ' SubGroup band Dim bandRecordData As New DataBand() ' Data band Dim txtGroupTextObject As New TextObject() ' Group Text object Dim groupTotal As New Total() ' Group total Dim lblType As New TextObject() Dim lblStripe As New TextObject() Dim lblCode As New TextObject() Dim lblISO As New TextObject() Dim lblScanConfig As New TextObject() Dim lblNotes As New TextObject() Dim recType As New TextObject() Dim recStripe As New TextObject() Dim recCode As New TextObject() Dim recISO As New TextObject() Dim recScanConfig As New TextObject() Dim recNotes As New TextObject() __strReportFile.EmbedPictures = True __strReportFile.SinglePage = True __strReportFile.SubFolder = False __strReportFile.Navigator = False rptTestReport.Load("test_film.frx") dsReportDataSet.ReadXml("test_film.xml") rptTestReport.RegisterData(dsReportDataSet, "FilmProfile") rptTestReport.GetDataSource("FilmProfile") ' Create Report page rptTestReport.Pages.Add(pageReport) pageReport.CreateUniqueName() 'Create Group band pageReport.Bands.Add(bandGroup) bandGroup.CreateUniqueName() bandGroup.Height = Units.Centimeters * 1 bandGroup.Condition = "[FilmProfile.Brand]" bandGroup.SortOrder = SortOrder.Ascending 'Create SubGroup band pageReport.Bands.Add(bandSubGroup) bandSubGroup.CreateUniqueName() bandSubGroup.Height = Units.Centimeters * 1 bandSubGroup.Condition = "[FilmProfile.Series]" bandSubGroup.SortOrder = SortOrder.Ascending 'Create Group Band Text Object txtGroupTextObject.Parent = bandGroup txtGroupTextObject.CreateUniqueName() txtGroupTextObject.Bounds = New RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 1) txtGroupTextObject.Text = "[[FilmProfile.Brand]]" txtGroupTextObject.Font = New Font("Segoe UI", 16, FontStyle.Bold) txtGroupTextObject.VertAlign = VertAlign.Center txtGroupTextObject.Fill = New LinearGradientFill(Color.LightSkyBlue, Color.White, 90, 0.5F, 1) 'Create Subgroup Band Text Object txtGroupTextObject.Parent = bandSubGroup txtGroupTextObject.CreateUniqueName() txtGroupTextObject.Bounds = New RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 1) txtGroupTextObject.Text = "[[FilmProfile.Series]]" txtGroupTextObject.Font = New Font("Segoe UI", 12, FontStyle.Bold) txtGroupTextObject.FillColor = Color.Navy txtGroupTextObject.VertAlign = VertAlign.Center 'Create Data band bandGroup.Data = bandRecordData bandRecordData.CreateUniqueName() bandRecordData.DataSource = rptTestReport.GetDataSource("FilmProfile") bandRecordData.Height = Units.Centimeters * 0.5F 'Create Data band TextObjects lblType.Parent = bandRecordData lblType.CreateUniqueName() lblType.Bounds = New RectangleF(368.55, 9.45, 47.25, 18.9) lblType.Text = "Type:" lblType.Font = New Font("Segoe UI", 9.75, FontStyle.Bold) lblStripe.Parent = bandRecordData lblStripe.CreateUniqueName() lblStripe.Bounds = New RectangleF(0, 28.35, 75.6, 18.9) lblStripe.Text = "Stripe:" lblStripe.Font = New Font("Segoe UI", 9.75, FontStyle.Bold) lblCode.Parent = bandRecordData lblCode.CreateUniqueName() lblCode.Bounds = New RectangleF(0, 9.45, 75.6, 18.9) lblCode.Text = "Identifier:" lblCode.Font = New Font("Segoe UI", 9.75, FontStyle.Bold) lblISO.Parent = bandRecordData lblISO.CreateUniqueName() lblISO.Bounds = New RectangleF(557.55, 9.45, 37.8, 18.9) lblISO.Text = "ISO:" lblISO.Font = New Font("Segoe UI", 9.75, FontStyle.Bold) lblScanConfig.Parent = bandRecordData lblScanConfig.CreateUniqueName() lblScanConfig.Bounds = New RectangleF(368.55, 28.35, 47.25, 18.9) lblScanConfig.Text = "Scan:" lblScanConfig.Font = New Font("Segoe UI", 9.75, FontStyle.Bold) lblNotes.Parent = bandRecordData lblNotes.CreateUniqueName() lblNotes.Bounds = New RectangleF(0, 47.25, 56.7, 18.9) lblNotes.Text = "Notes:" lblNotes.Font = New Font("Segoe UI", 9.75, FontStyle.Bold) recType.Parent = bandRecordData recType.CreateUniqueName() recType.Bounds = New RectangleF(415.8, 0, Units.Centimeters * 10, Units.Centimeters * 0.5F) recType.Text = "[FilmProfile.Type]" recType.Font = New Font("Segoe UI", 9.75, FontStyle.Regular) recStripe.Parent = bandRecordData recStripe.CreateUniqueName() recStripe.Bounds = New RectangleF(85.05, 28.35, Units.Centimeters * 10, Units.Centimeters * 0.5F) recStripe.Text = "[FilmProfile.Type]" recStripe.Font = New Font("Segoe UI", 9.75, FontStyle.Regular) recCode.Parent = bandRecordData recCode.CreateUniqueName() recCode.Bounds = New RectangleF(85.05, 9.45, Units.Centimeters * 10, Units.Centimeters * 0.5F) recCode.Text = "[FilmProfile.Code]" recCode.Font = New Font("Segoe UI", 9.75, FontStyle.Regular) recISO.Parent = bandRecordData recISO.CreateUniqueName() recISO.Bounds = New RectangleF(595.35, 113.4, Units.Centimeters * 10, Units.Centimeters * 0.5F) recISO.Text = "[FilmProfile.ISO]" recISO.Font = New Font("Segoe UI", 9.75, FontStyle.Regular) recScanConfig.Parent = bandRecordData recScanConfig.CreateUniqueName() recScanConfig.Bounds = New RectangleF(415.8, 28.35, Units.Centimeters * 10, Units.Centimeters * 0.5F) recScanConfig.Text = "[FilmProfile.ScanConfig]" recScanConfig.Font = New Font("Segoe UI", 9.75, FontStyle.Regular) recNotes.Parent = bandRecordData recNotes.CreateUniqueName() recNotes.Bounds = New RectangleF(85.05, 47.25, Units.Centimeters * 10, Units.Centimeters * 0.5F) recNotes.Text = "[FilmProfile.Notes]" recNotes.Font = New Font("Segoe UI", 9.75, FontStyle.Regular) 'Create SubGroup Footer band bandSubGroup.GroupFooter = New GroupFooterBand() bandSubGroup.GroupFooter.CreateUniqueName() bandSubGroup.GroupFooter.Height = Units.Centimeters * 1 'Create Group Footer band bandGroup.GroupFooter = New GroupFooterBand() bandGroup.GroupFooter.CreateUniqueName() bandGroup.GroupFooter.Height = Units.Centimeters * 1 'Create Group total object groupTotal.Name = "TotalRows" groupTotal.TotalType = TotalType.Count groupTotal.Evaluator = bandRecordData groupTotal.PrintOn = bandGroup.GroupFooter rptTestReport.Dictionary.Totals.Add(groupTotal) 'create text object Dim totalText As New TextObject() totalText.Parent = bandGroup.GroupFooter totalText.CreateUniqueName() totalText.Bounds = New RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5F) totalText.Text = "Rows: [TotalRows]" totalText.HorzAlign = HorzAlign.Right totalText.Border.Lines = BorderLines.Top rptTestReport.Export(__strReportFile, "test_film_result.html") End Sub