Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: How do you create formulas from sub-report fields? Post Reply Post New Topic
Author Message
BadBoyHouse
Newbie
Newbie


Joined: 25 May 2010
Online Status: Offline
Posts: 20
Quote BadBoyHouse Replybullet Topic: How do you create formulas from sub-report fields?
    Posted: 21 Jun 2010 at 5:48am
I have my main report which also uses a sub-report.
 
I need to create some formulas that calculate figures in both the main report and sub report.
 
For example:
 
Main report field AMOUNT + Sub Report field AMOUNT.
 
Can anyone tell me how to create formulas based on fields/formulas held in sub-reports
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 21 Jun 2010 at 6:19am
Hi
 
*Create a formula in subreport and main report
*To pass values from main to sub report and subreport to main declare the variable as Shared variable
*Check Crystal Reports help for more information
 
Cheers
Rahul
IP IP Logged
BadBoyHouse
Newbie
Newbie


Joined: 25 May 2010
Online Status: Offline
Posts: 20
Quote BadBoyHouse Replybullet Posted: 21 Jun 2010 at 11:00pm
I've almost got it working, however the figures are not correct:

Column 1 - main report - 77462.19
Colum 2 - from sub report shared variable - 0.00
Column 1 - main report - 358038.39
Colum 2 - from sub report shared variable - 77462.16
Column 1 - main report - 236918.00
Colum 2 - from sub report shared variable - 358038.37
Column 1 - main report - 359993.77
Colum 2 - from sub report shared variable - 236918.00

For some reason the first line in column 2 is showing 0.00 - and this is throwing all of the other lines out as you can see.
Any ideas why this might be?


Edited by BadBoyHouse - 22 Jun 2010 at 12:07am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.