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

Sub Report duplicating Group Headers

1 Answer 145 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 05 Dec 2008, 06:20 PM
I recently upgraded to 2008 Q3 of telerik reporting and a new problem has arisen with my reports.

I have several Reports with Sub Reports.
Each sub report has a group header.
When I preview the report, the group header(s) of the sub reports are appearing twice.
If i export to PDF, TIFF, Excel, or any other format then the report is rendered correctly.

Any ideas?

I've been trying for 3 days to solve this with no luck.  Couldn't find anything on the forum about this either.

Here is the code for my Master Report.
This is a very simple report that serves as a standardized report header and footer with a SubReport in the details section.

Partial Public Class MasterReport 
    Inherits Report 
    Public Sub New() 
        InitializeComponent() 
    End Sub 
 
    Dim _ReportCriteria As IA.Reporting.ReportCriteria 
 
    'Public Sub New(ByVal subReport As ReportBase, ByVal criteria As ReportCriteria) 
    Public Sub New(ByVal subReport As IReport, ByVal criteria As ReportCriteria) 
        InitializeComponent() 
 
        'Init the DataSource 
        Dim oneRec As New GenericCollection(Of String
        oneRec.Add("one"
        Me.DataSource = oneRec 
 
        'Set the Sub Report Type 
        Me.SubReport1.ReportSource = subReport 
 
        Me.PictureBox1.Value = ReportRenderTools.ImageTools.IAHeaderImage 
        Me.reportNameTextBox.Value = subReport.ReportTitle 
        _ReportCriteria = criteria 
    End Sub 
 
    Private Sub SubReport1_NeedDataSource(ByVal sender As ObjectByVal e As System.EventArgs) Handles SubReport1.NeedDataSource 
        Dim subReport As Telerik.Reporting.Processing.SubReport = TryCast(sender, Telerik.Reporting.Processing.SubReport) 
        If Not subReport Is Nothing Then 
            Dim IRep As IReport = TryCast(subReport.InnerReport.ItemDefinition, IReport) 
            IRep.SetReportHeader(_ReportCriteria) 
            Dim data As Object = IRep.CreateDataSource(_ReportCriteria) 
            If data.Count = 0I Then 
                subReport.InnerReport.DataSource = Nothing 
            Else 
                subReport.InnerReport.DataSource = data 
            End If 
        End If 
    End Sub 
End Class 

1 Answer, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 08 Dec 2008, 10:24 AM
Hi Matt,

This is a known problem that has been addressed and would be part of the Q3 SP1 scheduled for tomorrow.

Please excuse us for the temporary inconvenience.

Greetings,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or