| |
ActiveReports for .NET 3.0 Support
Started by dangei at 07-06-2009 4:47 AM. Topic has 4 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
07-06-2009, 4:47 AM
|
dangei
Joined on 09-10-2003
Molde - Norway
Posts 17
|
RowSpan if cell content in above row is the same
|
|
|
|
|
Is there a way to use rowspan in AR.Net like this example: http://www.glamox.com/glx/DesktopDefault.aspx?itemid=168082
c",) GeirDa
|
|
|
|
|
Report
|
|
|
|
07-06-2009, 3:03 PM
|
AnkitN
Joined on 03-03-2009
Posts 767

|
Re: RowSpan if cell content in above row is the same
|
|
|
|
|
Hello dangei,
I would like to inform you that in ActiveReports for .Net you can simulate RowSpan by using GroupHeader. By using a GroupHeader you can print the data that belongs to the same group, together. To know more about GroupHeader you may check the following links:
1) GroupHeader Constructor
2) GroupHeader Class Properties
3) Grouping Data Walkthroughs
However if I misunderstood your issue then I would request you to please provide me your requirements in details.
Regards, Ankit Nigam
|
|
|
|
|
Report
|
|
|
|
07-06-2009, 10:38 PM
|
dangei
Joined on 09-10-2003
Molde - Norway
Posts 17
|
Re: RowSpan if cell content in above row is the same
|
|
|
|
|
Here is my DataGrid solution for this:
Dim rowsCount As Integer = CType(dataGrid.DataSource, DataSet).Tables(0).Rows.Count
For rowIndex As Integer = rowsCount - 2 To 0 Step -1<br>
Dim row As DataGridItem = dataGrid.Items(rowIndex)
Dim previousRow As DataGridItem = dataGrid.Items(rowIndex + 1)
For cellIndex As Integer = 0 To row.Cells.Count - 1
If row.Cells(cellIndex).Text = previousRow.Cells(cellIndex).Text Then<br>
Dim _curCellText As String = ""
Dim _prevCellText As String = ""
For cellIndex2 As Integer = 0 To cellIndex
_curCellText += row.Cells(cellIndex2).Text
_prevCellText += previousRow.Cells(cellIndex2).Text
Next
If _curCellText = _prevCellText Then
row.Cells(cellIndex).RowSpan = If(previousRow.Cells(cellIndex).RowSpan < 2, 2, previousRow.Cells(cellIndex).RowSpan + 1)
previousRow.Cells(cellIndex).Visible = False
End If
End If
Next
Next
As you can see in this code I begin in the bottom of the Grid and loop to the top to find cell who have the same content. Can this be done in ActiveReport.
c",) GeirDa
|
|
|
|
|
Report
|
|
|
|
07-07-2009, 11:06 AM
|
AnkitN
Joined on 03-03-2009
Posts 767

|
|
|
Hello dangei,
Please find the attached sample application which simulates the RowSpan. In this sample I have used two GroupHeaders. GroupHeader1 bounds to CategoryName and GroupHeader2 bounds to SupplierID. I have used the Detail_Format event to set the visibility of the CategoryName textbox and the SupplierID textbox.
I hope it is of some help. Do let us know if you need further clarification/assistance.
Regards, Ankit Nigam
|
|
|
|
|
Report
|
|
|
|
07-07-2009, 11:20 PM
|
dangei
Joined on 09-10-2003
Molde - Norway
Posts 17
|
Re: RowSpan if cell content in above row is the same
|
|
|
|
|
Thanks.
Nicely done! I am going to try it out on one of my reports.
c",) GeirDa
|
|
|
|
|
Report
|
|
|
|
|
GrapeCity » Product Support » ActiveReports f... » RowSpan if cell content in above row is the same
|
|
|
|
|