Sub Report in Group Footer
I'm newbie for FastReport but I've some experiences with other report tools. My goal it's to build a report in a similar way as I could make with other tool.
The scenario it's
1) I've an invoice detail rows table with some field like ID, CodPro, DescrPro, Qta, IdExt
2) IdExt is a foreign key on another table (suppose a category's product view)
3) I build correctly the main report, with each row printed in the data band; I add a group band on ID condition, so I can print a total value in the group footer
4) in the same group footer I insert a subreport
5) In the subreport I use a second data source (CatView) with sone field like ID, CatName, Amount and so on; in this table I have many records as the different category used in the invoice; the IdExt field of the invoice rows, Joins with ID of the CatView
6) In the sub report data band I insert the category fields
I expect that in the same report I show two different view of the same invoice: the first one (managed in the data band of the main report) shows the invoice rows (with codpro, description, qty, price, row amount) and the second one (in the group footer) shows the same data but from the category point of view (so I read for each used category its ID,Name, total amount of the category, percent and so on). Really the result instead is that the data band it's OK, but in the group footer I read ALL the data of the CatView, like as the foreign key IdExt was lost a t this point of process and so the subreport was unfiltered. Note that if I move the subreport in the data section, the result is that for each row of the invoice I see the correct data for that invoice (and not all data of the CatView).
So it's seems me that a subreport in a group band it is not joined with any field of the main report data source, whetever if I build a relation by tha invoice and the CatView tables.
Any Suggestion or confirmation about this? " border="0" alt="mad.gif" />" alt=">" />
The scenario it's
1) I've an invoice detail rows table with some field like ID, CodPro, DescrPro, Qta, IdExt
2) IdExt is a foreign key on another table (suppose a category's product view)
3) I build correctly the main report, with each row printed in the data band; I add a group band on ID condition, so I can print a total value in the group footer
4) in the same group footer I insert a subreport
5) In the subreport I use a second data source (CatView) with sone field like ID, CatName, Amount and so on; in this table I have many records as the different category used in the invoice; the IdExt field of the invoice rows, Joins with ID of the CatView
6) In the sub report data band I insert the category fields
I expect that in the same report I show two different view of the same invoice: the first one (managed in the data band of the main report) shows the invoice rows (with codpro, description, qty, price, row amount) and the second one (in the group footer) shows the same data but from the category point of view (so I read for each used category its ID,Name, total amount of the category, percent and so on). Really the result instead is that the data band it's OK, but in the group footer I read ALL the data of the CatView, like as the foreign key IdExt was lost a t this point of process and so the subreport was unfiltered. Note that if I move the subreport in the data section, the result is that for each row of the invoice I see the correct data for that invoice (and not all data of the CatView).
So it's seems me that a subreport in a group band it is not joined with any field of the main report data source, whetever if I build a relation by tha invoice and the CatView tables.
Any Suggestion or confirmation about this? " border="0" alt="mad.gif" />" alt=">" />