Print Page | Close Window

Pass over data from SUB REPORT to MAIN REPORT

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Announcements
Forum Discription: Please check this section for the latest announcements from Crystal Reports Forum
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18857
Printed Date: 02 May 2024 at 10:17pm


Topic: Pass over data from SUB REPORT to MAIN REPORT
Posted By: guy723
Subject: Pass over data from SUB REPORT to MAIN REPORT
Date Posted: 23 Jan 2013 at 2:20am
Good Morning, I have a really painful reports that I am modifing and trying to add some subreports to it and for the life of me I can get it the way my boss wants it.
 
The report main report and sub reports have no relation EXCEPT the JOB# itself. 
1. I would like to know if I could pass over the jobs #from all my subreports and embeded them in the main report and all the jobs are line up numerically. Is that even possible?
 
2. Then I need the main report to add up the subreport and created the sub total for each job number, and grand total at the very bottom of the report. Is that even possible?
 
 
here is the main report and how its I got it to lay out right now
 
job#       Job Desc       materail      labour     overhead    Cont1 Cont  Cont3
2222-4     Sales            500             100             50
1202 -2    Sales2          1000           200             300
3333 -1    Sales            750             150             300
 
sub report 1
1202 -2                        (300)                                          300
5555-6                         (120)                                          200
  
Sub report 2
3333 - 7                        (90)                                                       90
 
sub report 3
1202 - 3                                         ( 120)          (20)                           140  
 
 
Here is how we wants it to look like
 
job#       Job Desc       materail      labour     overhead    Cont1 Cont  Cont3
1202 -2    Sales2          1000           200             300
1202 -2                        (300)                                            300
1202 - 3                                         ( 120)          (20)                           140  
 
                     Subtotals   7000          80              280         300            140
 
 so and so and so
 
at the very bottom
 
                    Grand Totals   of all the amounts
 
*** Please help I need this really bad*****
 
 
 
 



Replies:
Posted By: hilfy
Date Posted: 28 Jan 2013 at 6:11am
I have some questions first....
 
What type of section are you displaying the data in?  What type of section is the subreport in?
 
You would actually pass the Job# FROM the Main report TO the Subreport - not the other way around.  Right-click on the Subreport and select "Change Subreport Links".  At the top, move the Job# field for the Main report from "Available Fields" to "Fields to Link To".    At the bottom-right, select the Job# field in the subreport.
 
There are then ways to use shared variables to pass info between the Subreport and the Main report.  Once you've answered my questions above, I should be able to steer you in the right direction for that.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: guy723
Date Posted: 29 Jan 2013 at 1:31am

The main report displayed the data in the detail section and the subreports displayed in the report footer section. I even tried to place in the group herader and detail section nothing seems to work.

I follow your recomandation using the Change Subreport Links it didn't work. Nothing appear in subreport after I made the links.
 
 



Print Page | Close Window