开发者

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


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") 


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;


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜