Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub-report

Status
Not open for further replies.

quake1969

Technical User
Dec 21, 2011
5
US
Hi:

I am new to Crystal, so I apologize if this is a simple question.

I need to create a report that looks at customers who closed their accounts in the last 6 months. Of these people identified, I need to look at what their balances were 6 months prior to their closing date. I know I have to create a sub-report for this but do not know how. the primary report would have fields:

Account number Closing date Note balance( 6 months prior to closing)

One caveat would be that if the date 6 months ago fell on a weekend or holiday, I'd need to go to the last business day prior.

Any help would be appreciated.
 
I don't think you need a subreport. You would use a selection formula like this:

{table.closingdate} in dateadd("m",-6,currentdate) to currentdate and
{table.accounttransactiondate} < dateadd("m",-6,{table.closingdate})

Then you would group on the account, and sort in descending order on the account transaction date, and place the balance field in the group header and suppress the detail.

Of course you didn't explain whether balance is a field or a calculation, or whether you have a transaction date field as I am assuming.

-LB
 
The balance is a field, but the tranaction date is not a field. the current date would be a field called effective date, so I think the account transaction date transaction would be effective date as well. but how would that work based on what you mentioned.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top