Hi,
I am using Reporting Q3 2013. I am using a crosstab which has one column group and three row groups. My issue is that due to the level of grouping, the main row group may extend to different pages, vertically. I want to be able to repeat certain rows from the group on each page. The RowHeadersPrintOnEveryPage property does not help me as it only repeats the left column if the report expands horizontally, and ColumnHeadersPrintOnEveryPage will repeat vertically, but only column values, nothing related to the row values. I aslo tried to add row values to column header, but it will only repeat the first value, as expected.
Thanks
I am using Reporting Q3 2013. I am using a crosstab which has one column group and three row groups. My issue is that due to the level of grouping, the main row group may extend to different pages, vertically. I want to be able to repeat certain rows from the group on each page. The RowHeadersPrintOnEveryPage property does not help me as it only repeats the left column if the report expands horizontally, and ColumnHeadersPrintOnEveryPage will repeat vertically, but only column values, nothing related to the row values. I aslo tried to add row values to column header, but it will only repeat the first value, as expected.
Thanks
4 Answers, 1 is accepted
0
Hinata
Top achievements
Rank 1
answered on 03 Jul 2014, 11:26 AM
Hi Felipe,
I'm not sure that such functionality exists out-of-the-box, but in any case it will be much easier to understand and test the described scenario if you provide us with a sample of it. Maybe a screenshot or even better - a report definition with some dummy data to help me and other forum members better understand the issue you are facing.
I'm not sure that such functionality exists out-of-the-box, but in any case it will be much easier to understand and test the described scenario if you provide us with a sample of it. Maybe a screenshot or even better - a report definition with some dummy data to help me and other forum members better understand the issue you are facing.
0
Felipe
Top achievements
Rank 1
answered on 10 Jul 2014, 04:23 PM
Hi Hardik,
Sorry it has taken me a bit to create a sample. Attached you can find a screenshot of the generated PDF and below are the source codes of the report files I used.
In the report I am using a crosstab. The line in blue are the column name/group. The line in green is the header for the row group, and this is the line I need to be able to repeat on the next page. The Grouping property is a field in the object, not being displayed. "Main" for all items in the first group, "Secondary" for items in the second group. Hope this helps and thanks for looking into this.
Report1.Designer.vb
Report1.vb
Sorry it has taken me a bit to create a sample. Attached you can find a screenshot of the generated PDF and below are the source codes of the report files I used.
In the report I am using a crosstab. The line in blue are the column name/group. The line in green is the header for the row group, and this is the line I need to be able to repeat on the next page. The Grouping property is a field in the object, not being displayed. "Main" for all items in the first group, "Secondary" for items in the second group. Hope this helps and thanks for looking into this.
Report1.Designer.vb
Partial Class Report1 'NOTE: The following procedure is required by the telerik Reporting Designer 'It can be modified using the telerik Reporting Designer. 'Do not modify it using the code editor. Private Sub InitializeComponent() Dim TableGroup1 As Telerik.Reporting.TableGroup = New Telerik.Reporting.TableGroup() Dim TableGroup2 As Telerik.Reporting.TableGroup = New Telerik.Reporting.TableGroup() Dim TableGroup3 As Telerik.Reporting.TableGroup = New Telerik.Reporting.TableGroup() Dim TableGroup4 As Telerik.Reporting.TableGroup = New Telerik.Reporting.TableGroup() Dim TableGroup5 As Telerik.Reporting.TableGroup = New Telerik.Reporting.TableGroup() Dim TableGroup6 As Telerik.Reporting.TableGroup = New Telerik.Reporting.TableGroup() Dim TableGroup7 As Telerik.Reporting.TableGroup = New Telerik.Reporting.TableGroup() Dim StyleRule1 As Telerik.Reporting.Drawing.StyleRule = New Telerik.Reporting.Drawing.StyleRule() Me.pageHeaderSection1 = New Telerik.Reporting.PageHeaderSection() Me.detail = New Telerik.Reporting.DetailSection() Me.pageFooterSection1 = New Telerik.Reporting.PageFooterSection() Me.ObjectDataSource1 = New Telerik.Reporting.ObjectDataSource() Me.TextBox1 = New Telerik.Reporting.TextBox() Me.TextBox2 = New Telerik.Reporting.TextBox() Me.Crosstab1 = New Telerik.Reporting.Crosstab() Me.TextBox4 = New Telerik.Reporting.TextBox() Me.TextBox5 = New Telerik.Reporting.TextBox() Me.TextBox9 = New Telerik.Reporting.TextBox() Me.TextBox10 = New Telerik.Reporting.TextBox() Me.TextBox11 = New Telerik.Reporting.TextBox() Me.TextBox7 = New Telerik.Reporting.TextBox() CType(Me, System.ComponentModel.ISupportInitialize).BeginInit() ' 'pageHeaderSection1 ' Me.pageHeaderSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929R) Me.pageHeaderSection1.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.TextBox1}) Me.pageHeaderSection1.Name = "pageHeaderSection1" ' 'detail ' Me.detail.Height = Telerik.Reporting.Drawing.Unit.Inch(5.6166672706604R) Me.detail.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.Crosstab1}) Me.detail.Name = "detail" ' 'pageFooterSection1 ' Me.pageFooterSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.599999725818634R) Me.pageFooterSection1.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.TextBox2}) Me.pageFooterSection1.Name = "pageFooterSection1" ' 'ObjectDataSource1 ' Me.ObjectDataSource1.DataMember = "GetData" Me.ObjectDataSource1.DataSource = "Mobile.Web.Report1, Mobile.Web, Version=3.0.0.0, Culture=neutral, PublicKeyToken=" & _ "null" Me.ObjectDataSource1.Name = "ObjectDataSource1" ' 'TextBox1 ' Me.TextBox1.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.19999997317790985R), Telerik.Reporting.Drawing.Unit.Inch(0.19999997317790985R)) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.2999999523162842R), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448R)) Me.TextBox1.Style.Font.Bold = True Me.TextBox1.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(20.0R) Me.TextBox1.Value = "Sample Report" ' 'TextBox2 ' Me.TextBox2.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.19999997317790985R), Telerik.Reporting.Drawing.Unit.Inch(0.099999748170375824R)) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(5.3916664123535156R), Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448R)) Me.TextBox2.Style.Font.Bold = True Me.TextBox2.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(20.0R) Me.TextBox2.Value = "=""Sample Report p-"" + CStr(PageNumber)" ' 'Crosstab1 ' Me.Crosstab1.Body.Columns.Add(New Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R))) Me.Crosstab1.Body.Rows.Add(New Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(1.0R))) Me.Crosstab1.Body.Rows.Add(New Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(0.50000005960464478R))) Me.Crosstab1.Body.Rows.Add(New Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(1.0R))) Me.Crosstab1.Body.Rows.Add(New Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(1.0R))) Me.Crosstab1.Body.Rows.Add(New Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(1.0000001192092896R))) Me.Crosstab1.Body.SetCellContent(1, 0, Me.TextBox4) Me.Crosstab1.Body.SetCellContent(4, 0, Me.TextBox9) Me.Crosstab1.Body.SetCellContent(3, 0, Me.TextBox10) Me.Crosstab1.Body.SetCellContent(2, 0, Me.TextBox11) Me.Crosstab1.Body.SetCellContent(0, 0, Me.TextBox7) TableGroup1.Groupings.Add(New Telerik.Reporting.Grouping("=Fields.ColumnName")) TableGroup1.Name = "columnGroup" TableGroup1.ReportItem = Me.TextBox5 Me.Crosstab1.ColumnGroups.Add(TableGroup1) Me.Crosstab1.ColumnHeadersPrintOnEveryPage = True Me.Crosstab1.DataSource = Me.ObjectDataSource1 Me.Crosstab1.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.TextBox4, Me.TextBox5, Me.TextBox9, Me.TextBox10, Me.TextBox11, Me.TextBox7}) Me.Crosstab1.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.78125R), Telerik.Reporting.Drawing.Unit.Inch(0.61666661500930786R)) Me.Crosstab1.Name = "Crosstab1" TableGroup3.Name = "group" TableGroup4.Name = "group1" TableGroup5.Name = "group4" TableGroup6.Name = "group3" TableGroup7.Name = "group2" TableGroup2.ChildGroups.Add(TableGroup3) TableGroup2.ChildGroups.Add(TableGroup4) TableGroup2.ChildGroups.Add(TableGroup5) TableGroup2.ChildGroups.Add(TableGroup6) TableGroup2.ChildGroups.Add(TableGroup7) TableGroup2.Groupings.Add(New Telerik.Reporting.Grouping("=Fields.FirstSubgroup")) TableGroup2.Name = "rowGroup" Me.Crosstab1.RowGroups.Add(TableGroup2) Me.Crosstab1.RowHeadersPrintOnEveryPage = True Me.Crosstab1.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R), Telerik.Reporting.Drawing.Unit.Inch(5.0R)) ' 'TextBox4 ' Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R), Telerik.Reporting.Drawing.Unit.Inch(0.50000005960464478R)) Me.TextBox4.Value = "= Fields.Value1" ' 'TextBox5 ' Me.TextBox5.Name = "TextBox5" Me.TextBox5.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R), Telerik.Reporting.Drawing.Unit.Inch(0.5R)) Me.TextBox5.Style.BackgroundColor = System.Drawing.SystemColors.ActiveCaption Me.TextBox5.Style.Font.Bold = True Me.TextBox5.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(15.0R) Me.TextBox5.Value = "= Fields.ColumnName" ' 'TextBox9 ' Me.TextBox9.Name = "TextBox9" Me.TextBox9.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R), Telerik.Reporting.Drawing.Unit.Inch(1.0000001192092896R)) Me.TextBox9.StyleName = "" Me.TextBox9.Value = "= Fields.Value4" ' 'TextBox10 ' Me.TextBox10.Name = "TextBox10" Me.TextBox10.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R), Telerik.Reporting.Drawing.Unit.Inch(1.0R)) Me.TextBox10.StyleName = "" Me.TextBox10.Value = "= Fields.Value3" ' 'TextBox11 ' Me.TextBox11.Name = "TextBox11" Me.TextBox11.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R), Telerik.Reporting.Drawing.Unit.Inch(1.0R)) Me.TextBox11.StyleName = "" Me.TextBox11.Value = "= Fields.Value2" ' 'TextBox7 ' Me.TextBox7.Name = "TextBox7" Me.TextBox7.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.7708332538604736R), Telerik.Reporting.Drawing.Unit.Inch(1.0R)) Me.TextBox7.Style.BackgroundColor = System.Drawing.Color.MediumSeaGreen Me.TextBox7.Style.Font.Italic = True Me.TextBox7.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(13.0R) Me.TextBox7.StyleName = "" Me.TextBox7.Value = "= Fields.SecondSubgroup" ' 'Report1 ' Me.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.pageHeaderSection1, Me.detail, Me.pageFooterSection1}) Me.Name = "Report1" Me.PageSettings.Margins = New Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1.0R), Telerik.Reporting.Drawing.Unit.Inch(1.0R), Telerik.Reporting.Drawing.Unit.Inch(1.0R), Telerik.Reporting.Drawing.Unit.Inch(1.0R)) Me.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter Me.Style.BackgroundColor = System.Drawing.Color.White StyleRule1.Selectors.AddRange(New Telerik.Reporting.Drawing.ISelector() {New Telerik.Reporting.Drawing.TypeSelector(GetType(Telerik.Reporting.TextItemBase)), New Telerik.Reporting.Drawing.TypeSelector(GetType(Telerik.Reporting.HtmlTextBox))}) StyleRule1.Style.Padding.Left = Telerik.Reporting.Drawing.Unit.Point(2.0R) StyleRule1.Style.Padding.Right = Telerik.Reporting.Drawing.Unit.Point(2.0R) Me.StyleSheet.AddRange(New Telerik.Reporting.Drawing.StyleRule() {StyleRule1}) Me.Width = Telerik.Reporting.Drawing.Unit.Inch(6.0R) CType(Me, System.ComponentModel.ISupportInitialize).EndInit() End Sub Friend WithEvents pageHeaderSection1 As Telerik.Reporting.PageHeaderSection Friend WithEvents detail As Telerik.Reporting.DetailSection Friend WithEvents pageFooterSection1 As Telerik.Reporting.PageFooterSection Friend WithEvents ObjectDataSource1 As Telerik.Reporting.ObjectDataSource Friend WithEvents TextBox1 As Telerik.Reporting.TextBox Friend WithEvents TextBox2 As Telerik.Reporting.TextBox Friend WithEvents Crosstab1 As Telerik.Reporting.Crosstab Friend WithEvents TextBox4 As Telerik.Reporting.TextBox Friend WithEvents TextBox9 As Telerik.Reporting.TextBox Friend WithEvents TextBox10 As Telerik.Reporting.TextBox Friend WithEvents TextBox11 As Telerik.Reporting.TextBox Friend WithEvents TextBox5 As Telerik.Reporting.TextBox Friend WithEvents TextBox7 As Telerik.Reporting.TextBoxEnd ClassReport1.vb
Imports System.ComponentModelImports System.DrawingImports System.Windows.FormsImports Telerik.ReportingImports Telerik.Reporting.DrawingPartial Public Class Report1 Inherits Telerik.Reporting.Report Public Sub New() InitializeComponent() End Sub Public Shared Function GetData() As List(Of ReportItem) Dim lst As New List(Of ReportItem) lst.Add(New ReportItem("Fast Food", "Main", "Chains", "Burger")) lst.Add(New ReportItem("Fast Food", "Main", "Chains", "Pizza")) lst.Add(New ReportItem("Fast Food", "Main", "Chains", "Sub")) lst.Add(New ReportItem("Fast Food", "Main", "Chains", "TexMex")) lst.Add(New ReportItem("Fast Food", "Secondary", "Independent", "Food Truck")) lst.Add(New ReportItem("Fast Food", "Secondary", "Independent", "Hot Dogs")) lst.Add(New ReportItem("Fast Food", "Secondary", "Independent", "Pit Stops")) lst.Add(New ReportItem("Fast Food", "Secondary", "Independent", "Randoms")) lst.Add(New ReportItem("Slow Food", "Main", "Restaurants", "Steakhouse")) lst.Add(New ReportItem("Slow Food", "Main", "Restaurants", "Sushi")) lst.Add(New ReportItem("Slow Food", "Main", "Restaurants", "Pasta")) lst.Add(New ReportItem("Slow Food", "Main", "Restaurants", "Sea food")) lst.Add(New ReportItem("Slow Food", "Secondary", "Home Cooked", "Breakfast")) lst.Add(New ReportItem("Slow Food", "Secondary", "Home Cooked", "Lunch")) lst.Add(New ReportItem("Slow Food", "Secondary", "Home Cooked", "Dinner")) lst.Add(New ReportItem("Slow Food", "Secondary", "Home Cooked", "Snacks")) Return lst End Function Public Class ReportItem Public Property ColumnName As String Public Property FirstSubgroup As String Public Property SecondSubgroup As String Public Property Value1 As String Public Property Value2 As String Public Property Value3 As String Public Property Value4 As String Public Sub New(cn As String, fsg As String, ssg As String, val As String) ColumnName = cn FirstSubgroup = fsg SecondSubgroup = ssg Value1 = val.ToString & 1 Value2 = val.ToString & 2 Value3 = val.ToString & 3 Value4 = val.ToString & 4 End Sub End ClassEnd Class0
Felipe
Top achievements
Rank 1
answered on 10 Jul 2014, 04:25 PM
Here's the image.
0
Hinata
Top achievements
Rank 1
answered on 15 Jul 2014, 11:45 AM
Hi Felipe,
The Crosstab item has the following properties:
ColumnHeadersPrintOnEveryPage
RowHeadersPrintOnEveryPage
which will force the Row / Column headers to be printed on every page.
However, this applies only to the headers and you cannot have the body rows to
be repeated on every page.
The Crosstab item has the following properties:
ColumnHeadersPrintOnEveryPage
RowHeadersPrintOnEveryPage
which will force the Row / Column headers to be printed on every page.
However, this applies only to the headers and you cannot have the body rows to
be repeated on every page.