I have a report that has been working perfectly up until now. There is a "Tax" field, which uses the following formula to calculate:
Sum ({JBIS.PrevTax}, {JBIS.BillNumber}) + Sum ({JBIS.TaxAmount}, {JBIS.BillNumber})
The formula works except for when the conclusion is a negative number. We need it to print even the negatives here. Currently, it displays "0.00" if the answer is negative.
We figured out that it was actually an issue with the data we entered in the software running the report.
Related
Decimals are being rounded in crystal reports. The field(database field defined as float) Hours is being wrongly displayed in the crystal report. For example, 1.5 in the db is showing as 2.00, .75 shows as 1.00 and so on. There is also a field used to sum all the hours. That field is also picking the rounded values and summing incorrectly. I have formatted Hours as 1.00 and .01 in the formatting of crystal reports(for rounding & decimals). I also have the common tab(in format editor) as LN_Hours. Nothing seems to be working. I tried using x-2 formula with no luck.
Using crystal reports XI and SQL server MS 2012 and Visual studio 2003. Please throw some light on this situation! Thanks!
After a lot of trial and error , finally figured it out! The float from the database was being converted to decimal and being shown on the crystal report. Someone forgot to define the decimal places! Its all fixed up and running as expected. Thanks for all your suggestions.
In Crystal report
1. "Right Click" on the field and go to Format Field
2. In Format Editor go to Number Tab and then select from the different available decimal formats.
It may be rounding because of rounding decimal places
i have a crystal report document, where i made 4 summaries, 3 of them works fine but the 4th just displays a series of sharps (########).
This problem will come when space is not sufficient for the field to display the number. Increase the size of the filed that displays the number.
Friends,
This is the formula in the crystal reports 9.
cdbl({nrconsolidated.collamt})/100000.000
nrconsolidated table is having 9 records.
in that one record's collamt value is 154250.
but in the crystal reports output its showing as 1.543 instead of 1.542.
i want only 3 decimal points.i dont know where the mistake is coming from?
in the crystal reports, i clicked on that collamt field and checked the data by seeing the browseData option...its showing as 154250.
how can i solve this issue? its showing the correct value in 4 decimal points but i want only 3 decimal points.
thanks
The below code will truncate the result after the calculation has been performed, and output it to 3 decimal places. This works for Crystal Syntax and should for Basic as well - I believe it is common amongst both.
truncate(cdbl({nrconsolidated.collamt})/100000.000,3)
On the field set the decimals 1.000 and rounding 0.001 will display what you want.
I have a series of very small positive and negative values stored in oracle which I am attempting to display in crystal reports. Crystal is displaying all the values as 0. However if I turn the max decimal places on I will see some values as 0.00...00XY.
I would like these values simply displayed as scientific notation with something like 1.2E-12.
It seems crystal automatically converts very large values to SN, but not very small values?
This is not possible so I went and created a view instead for each needed table. Kind of a dumb solution, but it seems the only way possible.
I know this has been asked time and again by people all over the net, but I can't for the life of me figure out why my solution isn't working.
I have a bunch of groups, and in each group's footer I have a running total which acts as a sub-total for that group. At the very bottom of the page, I have a running total which adds all these sub-totals together to give a grand-total. This all works great.
To the right of each sub-total (group footer), I have a formula field which calculates what proportion of the grand-total this sub-total represents.
i.e. if the Grand-total is 4, and the sub-total is 1, the formula field displays 25%.
The problem is that for each group in the report, the Grand-total hasn't yet been fully counted (until the last group), and so the percentages are being calculated against incomplete Grand-totals.
To combat this, I've tried using the WhilePrintingRecords; function on my percentage formula fields to ensure that the sub-total percentages are not calculated until the 2nd pass of the report, by which time the Grand-total should be fully calculated.
WhilePrintingRecords;
If {#LoggedToday} > 0 Then
{#LoggedToday} / {#TotalLoggedToday} * 100
Else
0
It's not working though! It's literally had no impact what-so-ever :o(
Does anyone have any idea where I'm going wrong here?
Thanks.
Yes, you're using a running total to calculate a grand total.
Instead, I suggest creating a Crystal formula for your percentage, in the form:
Sum ({ numeric field }, { grouping item }) % Sum ({ numeric field })