Can you reference a field in a subreport and use it in a calculation on the main report?

Hello,

I have an SSRS Report (Modified ARForm) that has a value in a subreport = Tax_Sum - Textbox5.

Is there a way to reference that value and use it in a calculation on the main report?

I can’t just add the table to the main report as it changes what prints out when I do that.

Any help is appreciated.

1 Like

Hello,

Does anyone know if this is possible?

Any help is appreciated!

I’ve never seen this as I don’t see anyway to pass parameters back to the parent report.

I don’t think there is, but there’s nothing that prevents you from looking where the subreport is getting the data and doing that same calc in the main report. You can run a query ahead of the main query and just grab that value to use in the main query.

1 Like

Hello,

I got it to work by just building a new dataset that pulls in the data I needed separately from main dataset.

That stopped it from blowing my report into a bloated mess.

I appreciate the help!

1 Like

In my opinion, this is an often-overlooked easy way to get desired results on an SSRS report. So often, I see people (ahem! talking to myself here) try to go into a very messy query and try to play around and add new subqueries or new table joins… and it really can be difficult to troubleshoot if anything doesn’t work as expected. But simply making a new dataset that starts from the table you care about and then you can reference that dataset from within another dataset similar to a table join within a query. It’s actually a very good solution to your problem. Nice work.

2 Likes