Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Group Footer value in Group Header Post Reply Post New Topic
Author Message
karthikkjm
Newbie
Newbie
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 21
Quote karthikkjm Replybullet Topic: Group Footer value in Group Header
    Posted: 29 Jun 2012 at 8:46pm
i am designing CASH BOOK REPORT in ACCOUNTS.

my current issue is for each day i need to show OPENING BALANCE AMOUNT & CLOSING BALANCE AMOUNT.

from database i am passing 1st days opening balance & showing it in GROUP HEADER of VOUCHER DATE, then  i am calculating and displaying the closing balance in GROUP FOOTER of VOUCHER DATE.

but my current issue is i need to show the calculated closing balance in the next GROUP HEADER of VOUCHER DATE.

how to do it ? when i am doing it with formula, the current closing balance is displayed as opening balance. but i need the previous...

pls help me,
thanks in advance.

Karthik K.

karthik
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 02 Jul 2012 at 5:13am
So, if I understand you correctly, you're displaying the opening balance that is entered as a parameter and then calculating the closing balance in the report.  When you put the closing balance in the group header, it's showing the same value as the opening balance.  This happens because the closing balance is calculated while the data is processing so it's generally only available in the footer.
 
For the sake of this example, I'm going to call the field you're calculating from {MyTable.Amount} and the parameter {?OpeningBalance}.  Try creating a formula that looks something like this:
 
{?OpeningBalance} + Sum({MyTable.Amount}, {MyTable.VoucherDate})
 
Summary functions are calculated in such a way that they can be used in either the group header or footer.  This formula will add up all of the amount values using a summary function and then add it to the opening balance.  Using this technique modifed for your data should give you what you're looking for.
 
-Dell
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.