简体   繁体   中英

Crystal Reports, and running totals

I am designing a report in which a Running Balance column adds itself to Debit and subtracts the answer from Credit column on every row. Here in this example I have started calculating from 1st of January. In this case, my Running Balance column will have zero.

Now my client wants to have a look at records from 17 January to the end. In that case, my cumulative balance will NOT be zero at first but instead it will calculate cumulative balance for all the dates before 17 January, and present it as the starting balance for 17th of January. I am stuck at this point. How to add all the record before 17th of January and show their Total in a single row.

There are lots of different ways to achieve this, but here's one idea you might like to try.

  • Set the report selection criteria to include all records from 01/01.
  • Create 2 report detail sections.
  • In the first detail section just place the running total and maybe a label: "Starting Balance".
  • In the second detail section place your normal fields.
  • In the section expert use a formula to suppress the first detail section: {table.date} <> {?date parameter}
  • In the section expert use a formula to suppress the second detail section: {table.date} < {?date parameter}

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM