Page 1 of 1

Sub Reports Problem

Posted: Wed Jun 27, 2007 5:59 am
by jellis
Hi,

Hopefully someone can help. I'm very new to StimulReprts - just evaluating it as a replacement for Crystal Reports. A key requirement is to produce a detailed report which summarises data at the end of each section.

For example, If I had an account ledgers, each with several sections, and each section with several items, I need to report as follows.

Ledger 1
Section 1
Item 1 £10
Item 2 £20
Item 3 £30
Section 2
Item 1 £50
Item 2 £50
Item 3 £100

After producing the above (no problem) I need a summary (on a new page) as follows

Ledger 1 Section 1 £60
Ledger 2 Section 2 £200

Obviously, there could be many ledgers, each requiriing a summary section.

In crystal I'd achieve this with a sub report nested in the ledger group footer, but I'm really struggling to understand how they work in StimulReport. I'm getting my sub report appearing on the page, in the middle of other data etc.

Can anyone help please?

Jon.

Sub Reports Problem

Posted: Wed Jun 27, 2007 6:34 am
by Edward
The simplest way to achieve such result is to place the same Group Headers and a DataBand after existing bands on the same page or on the new one. Also please set ResetDatasource property of that DataBand in true. After that you should do the trick: set the height of the DataBand and GroupHeaders to zero. All text components should be removed from that DataBand. After that you should add a Group Footer with
{Ledger ...} {Section ...} £ {Sum(MyDatasource.MyItem)}

As example of a such technic please see the Demo.exe sample application. "Reports with groups" section "All GroupFooters at the end" sample report.

Thank you.