Print Page | Close Window

Variable Help

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Writing Code
Forum Discription: .NET 2003 programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16984
Printed Date: 28 Apr 2024 at 10:53pm


Topic: Variable Help
Posted By: Ricci
Subject: Variable Help
Date Posted: 09 Jul 2012 at 4:34am
I am having trouble passing a variable from my sub report back into the main report.
 
Main Report is a Change Order
  * Group 1 = Project Number
  * Group 2 = Contract Number & Change Order Number
 
The Sub Report is a different Budget Breakdown of the Change Order amounts
  (1) I have tried using Running Totals to assign the variables. This works if I only want to view the variable but not when I need to use it for a calculations in the main report
     Sub Report
      WhilePrintingRecords;
      If GroupName ({Contracts_10_ttx.Budget~Group5}) = '01'
          Then CurrencyVar OriginalMain := {#Originals};
 
     Main Report
      WhilePrintingRecords;
      shared currencyvar OriginalMain;
      OriginalMain
 
  (2) I have tried calculating the variable on each record. This also works for viewing only but not when I need to use it in calculations in the main report
 
  (3) I have tried putting the sub report in Group 1 header, Group 2 header and Group 2 footer in a higher section than where I need to use the variables, none works for calculations
 
I don't know what else to try. Can anyone help?
 



Replies:
Posted By: hilfy
Date Posted: 10 Jul 2012 at 7:15am
Please do not cross-post.  See my response on your other post.
 
-Dell


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



Print Page | Close Window