Solved

Reporting Services Passing Sum from subreport to Main report

Posted on 2009-07-14
4
949 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

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

Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

717 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