Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Getting Beginning Balance. Post Reply Post New Topic
Author Message
argel_joseph
Newbie
Newbie
Avatar

Joined: 26 Apr 2011
Location: Philippines
Online Status: Offline
Posts: 8
Quote argel_joseph Replybullet Topic: Getting Beginning Balance.
     Posted: 10 May 2011 at 5:35pm
Anyone out there, please help me. . Cry

I'm new in Crystal Report and

I want to get the Beginning Balance when I filter the date from (date1) to (date2). Wacko

Only need to display on the first row is the Total of Balance of the previous dates.
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 11 May 2011 at 7:20am
you want to get the balance from the dates prior to what you enter for your parameters?
if that is the case then i believe you need to create a sub report that sums the balance and then use shared variables to use in the main report.
if you are only displaying the value from the sub and do not need to use in a summary you dont need the shared variables.
sharona
IP IP Logged
argel_joseph
Newbie
Newbie
Avatar

Joined: 26 Apr 2011
Location: Philippines
Online Status: Offline
Posts: 8
Quote argel_joseph Replybullet Posted: 11 May 2011 at 11:02pm
Thanks for your reply sharona..

As I said I'm new in Crystal Report.Unhappy

So if you don't mind, can you give me a sample report of what you are saying. .
Confused
It will really help me a lot.

Thanks. .
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 12 May 2011 at 3:14am

i dont have a sample report

but start by inserting a sub report. there are some good instructions on the web. just search for that.

SHARED VARIABLE

Shared variables are used to pass values from sub report to the main report.
(if you want  to summarize totals from a sub report with totals from the main report, you would use the following formulas to pass the value from the sub report to main report.

 

SUB REPORT                          

         whileprintingrecords;

SHARED Numbervar 

         X := x + {field};

 

MAIN                                      

        whileprintingrecords;

SHARED Numbervar  X;

 X

 

Shared variables can not be suppressed.

Make the font white and the field very small.

They must be placed below the subreport to retrieve the value.

 

sharona
IP IP Logged
argel_joseph
Newbie
Newbie
Avatar

Joined: 26 Apr 2011
Location: Philippines
Online Status: Offline
Posts: 8
Quote argel_joseph Replybullet Posted: 12 May 2011 at 7:48pm
Thanks for d info. And I've got an idea on SHARED VARIABLES and how to pass it.

I used the formula that you gave.

But the problem is. . the result in field of MAIN REPORT always return to ZERO. It didn't get the value of the field in SUB REPORT...

What I did is wrong, or I forgot something. ? Confused



argel_joseph
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 13 May 2011 at 9:06am
can you see the value in the sub report when it is linked to the main report?
 
where do you have the sub placed?  is this to group total or an overall total? if it is a group total (customer amount) place on the customer group header
if it is an overall place on the report header
make sure you can see the value in the sub report
the shared variable in the sub should be placed below the value you want in the main report.
in the main report place the shared variable below the sub report
sharona
IP IP Logged
argel_joseph
Newbie
Newbie
Avatar

Joined: 26 Apr 2011
Location: Philippines
Online Status: Offline
Posts: 8
Quote argel_joseph Replybullet Posted: 15 May 2011 at 2:39pm
thanks for your help sharona. . .
argel_joseph
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 16 May 2011 at 5:24am
did you get it to work?
sharona
IP IP Logged
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