Print Page | Close Window

Break up Amount (not as text)

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=22917
Printed Date: 02 May 2024 at 12:02pm


Topic: Break up Amount (not as text)
Posted By: Algebrina
Subject: Break up Amount (not as text)
Date Posted: 04 Jan 2021 at 3:00am
I'm trying to build a report where I can pull amounts that are over 100mm and break them up into smaller amounts, specifically 99,999,999.99 as many times as needed and whatever is left over.

Example:
200,000,000.00

Output needed:
99,999,999.99
99,999,999.99
.02

I've figured out how to calculate the .02 part, but I can't figure out how to return multiple rows of 99,999,999.99. I'm using Crystal Reports 2013 and pulling the amounts from an SQL database. Any help would be greatly appreciated!



Replies:
Posted By: kevlray
Date Posted: 04 Jan 2021 at 4:17am
The only thing I can think of is to create a string and append the values (with a CR) in  a formula.  Thus you would not really get multiple rows, but it would be broken up.


Posted By: lockwelle
Date Posted: 12 Mar 2021 at 8:31am
I know that I am late to the party...

I would create a function in SQL to break it up and return the multiple rows. Your detail section would become a group header, and your new multiple row would become the details.

At least it is a thought



Print Page | Close Window