Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

Crosstab reports printing twice

edited September 2002 in Subreports
Hi All,

I'm having a problem with subreports.
I'm using the SubReport to print a CrossTab report.

Problem Desc:

1) I've a report that contains 5 subreports in the detail band with
PrintBehaviour = pbChild
2) I'm using MasterDetail relationship in the entire report.
3) The problem is, no matter how many record the Main report contains, if
the subreport
contains more than One record that subreport prints twice. But if the
subreport contains only
one record it prints only once.

This is the layout of the Report and Datasource structure for one subreport:

Main DataSource1.DataSet => DataSet1
PipeLine1.DataSource => DataSource1

Note: I didn't connect Report.DataPipeline to PipleLine1, because I saw you
mentioning this to somebody for the same kind of problem.

Report.SubReport1.DataPipeLine => PipeLine2.DataSource
DataSet2.DataSource(Detail) => DataSource1(Master).

Any ideas please...

Thanks
Anand.

Comments

  • edited September 2002
    The crosstab should be next to the subreport in the detail band. Imagine
    that the crosstab is like the subreport in that it will traverse and print N
    detail records. If you place the crosstab in the same detail band as the
    subreport component, then it should work just fine. The crosstab engine
    will traverse all of the records in the data pipeline that it is connected
    to.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    Hi Jim,

    I did exactly like you said, i.e. moved CrossTab report from the
    SubReport detail band to the MainReport detail band right next to the
    subreport component. But the subreport is printing twice.

    Thanks
    Anand.

  • edited September 2002
    Is the main report connected to a data pipeline? The subreport should only
    print once in the detail band. Is the crosstab set to ShiftRelativeTo the
    subreport?


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    Hi Jim,

    Crosstab's ShifRelelativeTo is set to the SubReport and also I
    tried both the options with/without Main Report connecting to a data
    pipeline. But I don't know why the subreport is printing twice.

    Thanks
    Anand.

This discussion has been closed.