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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stacked Barchart Displayed Data Formatting

Status
Not open for further replies.

robreports

Technical User
Feb 10, 2010
20
US
Each column of my eight-column stacked barchart has three different colors in it representing three different possible filter-returns on the same field of my database.Summary percentage values based on a formula are displayed within each of these three different colored sections.I have set these values to display as whole numbers.Everything looks good at first glance.The problem is with rounding.In one of my eight columns, the three displayed values add up to 101(%),instead of 100% because one value is 5.55% being rounded up to and displayed as 6%.Add 6% to the other two values of 46% and 49% for this same column=101%.This barchart I located in the Report Footer area and suppressed all other report sections above.I decided to cheat a little for now as this situation might not always occur depending on how the numbers come up at different points in time.So,up above in the appropriate group section of the report where these formula fields are located (GF1),I have tried to use the truncate function associated with both "rounding" and "decimals" in the formatting formula to drop off the decimal portion and essentially round the number down so as to display "5%".True,it might also truncate other corresponding values displayed in the other seven columns.But it might not.
It does not work after refreshing the data and closing out of the report several times.The numbers stay the same in the barchart no matter what I try.Any ideas?
 
Changing the numbers in the body of the report would only make a difference if you were using those values in the show value area in the chart expert. I'm guessing you are entering some summary and displaying the result as a percentage. Your best bet is to show decimals in the percentage, and if the fit is a problem, make the font smaller or rotate the value display 90 degrees.

-LB
 
Thanks LB, I left the numbers as two decimal places now in the chart instead of whole numbers.I was able to leave the font size the same and did not have to rotate them either.No more worrying about rounding issues causing the sum of the three different stacks going over "100" percent. Too bad Crystal Reports XI chart creation dialog boxes do not let the user control rounding in case we did want whole numbers displayed.Oh well.Thanks again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top