Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Alternative to Assigning and Placing a variable? Post Reply Post New Topic
Author Message
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Topic: Alternative to Assigning and Placing a variable?
    Posted: 22 Apr 2011 at 8:50am
Hi, I'm working with a balance sheet that needs to display retained earnings adjusted for net income, which are held in two different accounts until the end of the year.
 
For example, let's assume the following scenario:
 
Retained Earnings = Acct 3310000, balance = $1,000,000
Net Income = Acct 5699999, balance = $100,000 
 
I've created a report that shows me this, but I need to submit the report to our parent company as:
 
Retained Earnings = Acct 3310000, balance = $1,100,000
Net Income = Acct 5699999, balance = $0 
 
I've created a variable that I call "Net Income Adjustment", and manually enter in the net income amount for each period.  I have coded the report to then add that amount whenever it presents Retained Earnings.  The report lines are ordered not by numeric account value, but by the specific sequence I desired, so my logic looks like this:
 
if {glaccounts.acctcd} = "3310000" then
Sum ({@Per 10 Balance}, {@Line Sequence}) - {@Net Inc Adj Per 10 YTD}
 
This is working fine, but the trouble is, I don't want to have to manually enter the net income.  It slows me down, and seems unnecessary, considering that the net income amount is already available under a different account.  However, it seems that because the Net Income resides in a different account, whenever I try to simply point that adjustment variable to the Net Income account, it comes up with a zero, because the account has to be 3310000 to be valid for the arguement.
 
I've tried creating a subreport where I calculate the net income, and then create an assignment of the calculation to a shared data variable, and then placing that shared data in the main report, hoping it would then be "decoupled" from the account, but it doesn't seem to work that way.
 
I've thought about just changing the account validation to read "3310000 or 5699999", but this report isn't actually a true Balance Sheet, in that it does also present other information, including the actual Net Income, so I think doing that would distort my Net Income presentation.
 
Does anyone have a suggestion of how I can harness the existing system calculation of Net Income to automate this process?
 
Seems like such a simple problem...
 
Thanks,
 
Paul


Edited by pgiering - 22 Apr 2011 at 10:27am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 22 Apr 2011 at 10:35am

it would seem that to 'decouple' from the main report your subreport should take the account from the main, but then it would need to know which account to look for subreport.

so if you passing 3310000, the subreport would return the value for 5699999.  It would be easier if these numbers were in a table somewhere...
 
that is what I would try.  If you already did this, sorry.
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.016 seconds.