SubReport and DataSources

Hi,
can I use the same data source for both report and his subreport?

I have a report with some TextObject (in a GroupHeaderBand, in a DataBand and in a GroupFooterBand) and it works properly.
When I add this changes to the report:
1) I split the DataBand in 3 ChildBand of GroupHeaderBand (setting DataBand visible to false)
2) I create 3 Subreports, one for each ChildBand
2) Each subreport has the same data source of the main report, but the Filter property with different conditions

In the preview I see data in GroupHeaderBand and in a Subreport but I don't see data in GroupFooterBand.


Thanks

Comments

  • pinbotpinbot Texas
    edited 3:08PM

    Let me add a reply here.

    I actually tried this last week and it won't work (unless you do some major .net coding to save/restore the current dataset record position at the beginning/end of the subreports).

    When your first subreport runs it iterates through the data in it's dataset. Since this is the same dataset as the parent report when the subreport finishes, the parent report is at the end of the dataset and has no more records.

    You need to have 2 different datasets, 1 for the parent and 1 for the subreports. That way as the subreport runs through the dataset, the parent is still on the same record. It also makes it easy to filter the child (subreport.filterfield==parentreport.filterfield).


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.