Print Page | Close Window

Group Footer value in Group Header

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16913
Printed Date: 07 May 2024 at 10:09pm


Topic: Group Footer value in Group Header
Posted By: karthikkjm
Subject: Group Footer value in Group Header
Date 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



Replies:
Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window