I am using VS2010 and Crystal reports plug-in and getting a value from stored procedure.
The values on this field are whole numbers and some of the numbers do have decimals.
Col 1
-----
42
25,725
5.22
When I right-click and format object. I am unable to achieve this. If I enable decimal it is displaying
42.00
25,725.00
5.22
How can I achieve the format that I have mentioned. I appreciate your support.
I tried the following formula:
//FieldOne is float
//Probably don't need the else.
If InStr(ToText({proc1;1.FieldOne}),".") > 0 THEN
Truncate({Proc1;1.FieldOne},2)
Else
Truncate({Proc1;1.FieldOne})
I am getting a "string is required here." error
When you right-click on the field and chose Format Field, click on the Number tab and then on customize. Create a formula in the Decimals option to not show a decimal if there is no "." in the value and to show 2 decimals if there is a "." in the value.
There are number of options when you will select Format Object:
and Within Custom Style we have;
Related
How to replace 0.00 values with null in OBIEE12c . my column datatype is number
i need to apply it in RPD or as a self servicing report . it is not require for dashboard and prebuild report
You can use a CASE statement in the column formula of the report, e.g.
case "MyTable"."MyColumn" when 0 then null else "MyTable"."MyColumn" end
0 and NULL are totally different things in analytics and what you're trying to do is already conceptually wrong.
If you made 500 this month and -500 last month does NOT mean you did NULL when aggregating both months. You did 0. And that also why you can't use NULL with numerical data types because you can not aggregate NULL.
Please don't force the system to violate all rules of data processing just do pull some GUI stunts.
EDIT: "Show blank"? Well you're supposed to be doing analytics with corporate data and not MS Paint, but here goes: Set a conditional rule on the column where value = 0 and then set a custom CSS style of "display:none". Ridiculous but will do what you want.
The easiest option is to save as a system wide default for that column.
Set the formatting you want and then on column properties click the save as default and save as the system wide default for that column
Both options will work in the front end but the value will still be output if you export data
Conditional Formatting
Create an analysis with the column you want formatting in.
Add conditional formatting where this value = 0
Either set the font size to 0 or use an image and set to image only
Custom Number Format
Set the number format to be #
I see total like below in one of my BIP report.
Can I restrict the value to 2 digit after decimal.
In this example: 174264.87. I tried to find the option
You can do it with column properties and click data format tab
I am pulling data from an Oracle database into Spotfire. For some reason, Spotfire formats all numbers as currency with 2 decimals. In my data sets there are a significant number of columns that should be integers. Having them come in as currency doesn't cause any calculation issues that I've found, but it is a formatting issue when columns that obviously should not have decimals are displaced with them.
I have tried using the CAST AS SMALLINT, INTEGER, and also ROUND in my SQL statements to try and get rid of the decimal places. So far, they have all been unsuccessful.
Any ideas on how I can get Spotfire to import numbers with the desired format, or am I going to have to manually change them after they are imported?
Below is an example of some of the functions I have tried.
> SELECT
>
> NAME,
>
> CAST(X_ID AS SMALLINT) X_ID,
>
> CAST(Y_ID AS INTEGER) Y_ID,
>
> ROUND(Z_ID,0) AS Z_ID,
>
> FROM TABLE
Thanks
Spotfire is importing It to the largest most precise data type needed. If you want to display it differently then simply go to Edit > Column Properties, click on the column in question and change the format. You can also do this for each individual chart if you don’t want to make a global change
I'm struggling with Crystal Reports suppressing rows whenever I add a field that some rows may not have data in.
I've been able to fix some of the rows and make them show by using the formula:
if not isnull({field}) then {field} else "Arbitrary string to make row display"
This at least fills in the absent field with something and displays the row.
Do I really have to try and identify every field that may have incomplete data for some rows? Or is there some global method to make all rows show no matter what?
Something like: If isnull(ANYTHING) then " "?
you can do right click on the field, then under suppress, click the formula icon beside it and you can input there the conditions.
You can try the following in report options:
Convert Database NULL values to Default
Convert Other NULL values to Default.
This is hidden in File > Report Options. I have used Convert Database NULL Values to default to show 0's instead of blanks for null valued summaries
I am exporting data from oracle table into a csv file. I have a column of varchar2 datatype and it has values like 1.1 and 1.10. When I export these to a csv file the value 1.10 becomes 1.1 and thus creating duplicate records. Is there a way to get both the values 1.10, 1.1 into csv file without loosing the last zero in "1.10".
Thanks
When I export these to a csv file the value 1.10 becomes 1.1 and thus creating duplicate records.
This has nothing to do with Oracle. It is a display problem with the tool you are using. use proper formatting of cells to display up to required decimal places.
Also, 1.1 and 1.10 are same. Appending zeroes to the right after decimal makes no significant difference to the value.
Excel Text Formatting
Right click on the cell.
Select Format Cells.
In the first tab Number, select Text.
Click OK.
Text format cells are treated as text even when a number is in the cell.
The cell is displayed exactly as entered.