Philip
Philip

Reputation: 599

Pass data from ssrs subreport to parent

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

Answers (3)

Michael Barnett
Michael Barnett

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

Russell Fox
Russell Fox

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

Philip
Philip

Reputation: 599

Its has been posted on another forum that this cannot be done :(

Upvotes: 0

Related Questions