Reputation: 599
1 Is it possible to pass data from ssrs 2005 subreport to its parent report? 2 If yes, how? Thanks so much Philip
Upvotes: 0
Views: 3651
Reputation: 21
Create two datasets - one for the main report one that is the same used in the sub report.
Add your sub report but grab the total from the second dataset on the main report.
I'm not actually taking the info from the sub report. I'm only using the sub report to display the information correctly. I'm using the second dataset just to total what's in the sub report.
=Sum(Fields!Total.Value, "DataSource1") + Sum(Fields!ThinkTotal.Value, "ThinkCharge")
Upvotes: 2
Reputation: 11
You might be able to add a subquery to the query in the main report to get totals:
SELECT
t1.ClientID,
t1.Address,
-- Subquery to get invoice totals:
(SELECT SUM(InvoiceTotal)
FROM Invoices
WHERE Invoices.ClientID = t1.ClientID)
AS InvoiceTotal,
t1.CompanyName
FROM Clients t1;
Upvotes: 1