Solved

Reporting Services Passing Sum from subreport to Main report

Posted on 2009-07-14
4
926 Views
Last Modified: 2012-05-07
Hello experts,

I have a report that I created with a few subreports.  I would like to pass the sum from various columns in the subreport to the main report to do some calculations.  Is there anyway I can accomplish this?  Either via passing it as a parameter or set a string somewhere and pass that?
0
Comment
Question by:holemania
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Emes
ID: 24852038
You can do this by selecting the expression component.

Then select the data source you want the sum  from.

Then select the data field.

Please note you can only take sums and first field from another Data source.

 


DATAS.bmp
0
 

Author Comment

by:holemania
ID: 24853196
That would've work if I created multiple datasets within the same report.  However, the way how I create my report, I setup the main report and then from that main report, I created several sub reports.  Each sub report has its own dataset.  Now I can pass the ID from the main report to the other subreports as parameter.  However, I need to pass the sum of these subreports back to the main report for calculations and that's where my problem is.  

I can take each dataset from each of the subreport and put it in the main, but that would mean I have to recreate all the calculated fields and there's a lot of those.  Any thought?  What about property code section?  Can that be done to pass a shared variable?
0
 
LVL 14

Accepted Solution

by:
Emes earned 500 total points
ID: 24853476
If you cut and paste the tables into one report why do you have to recreate the fields?

even if you do I would take the xml code and the do a search and replace on it if you have the same dataset names.

either way I would put everything into one report so you have easy access to all the needed data.
0
 

Author Comment

by:holemania
ID: 24870726
I think it could work if I create everything on the main page.  I'm just used to doing this in crystal report via creating subreport and passing data back and forth.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had to extract data from a Microsoft SQL Server database and export it to an Excel file, but did not want to use a DTS package? The concept in this article is not new, but it is the answer and will also work on 64-bit SQL boxes.   …
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question