Print Page | Close Window

Shared variable

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8301
Printed Date: 03 May 2024 at 4:57am


Topic: Shared variable
Posted By: andybrst
Subject: Shared variable
Date Posted: 11 Nov 2009 at 2:05am
I apologise if this is a daft question, but I am new to Crystal.
 
I have a main report which is showing two subreports (one totalling the labour value, one totalling the materials value) that have shared variable fields. All well and good so far as both totals are correct.
 
The question is; is it possible to add these two totals together within the main report, thereby getting the total value?
 
Thanks in anticipation



Replies:
Posted By: lockwelle
Date Posted: 11 Nov 2009 at 6:06am
sure, not a prob.  Create another formula:
shared numbervar varA;
shared numbervar varB;
 
varA + varB
 
drop it where you want the value displayed, or you can set a third variable to the sum and display that in multiple places or use it to create a 'running' total or to perform other aggregate functions.


Posted By: andybrst
Date Posted: 11 Nov 2009 at 8:26am
Hi thanks for the response.
 
I found what was causing me the problem. One of the fields was currency and one was numeric.
 
Have now solved the issued.
 
Thanks again



Print Page | Close Window