This is an updated question regarding a topic that exists in the version 10 forum
Post #735435
The question results from not being able to dynamically format the number of decimal places in a report.
I had originally posted these questions in the version 10 forum but I am on V12 and the issue will get more visibility here
My situation is this, I want to vary (Dynamically!) the number of decimal places shown on the report for a field according to the magnitude of the number in that same field
As the field value changes row by row in my report I want the number of decimal places to change depending on the following:
If the value of the field is >=100 then I want zero decimal places
If the value of the field is <100 then I want two decimal places
I put the following expression in the expression builder (available at the DEC parameter of the Properties pane in the report writer)
if(Field Name >=100,0,2) where in my case the Field Name is "Escalated_Cost_Per_Uom_3"
This field is a calculated field created in a view in the MYSQL backend
see attached pictures of the expression builder and the field selector screen
Field Selector.jpgExpression Builder.jpg
I could create no instance where this expression took hold and worked as I think it should
I tried blanking out the decimal place settings in the various other places they can be set
I tried with different field names in the expression
I tried by entering a single number in the expression
I tried publishing the report to Production environment
I did note that the expression passed the internal testing for validity and completeness. It was returning valid results of 0 and 2 and the results changed as I clicked through the records in the dataset
The result was a numeric type N
<dynamic> even appeared in the DEC parameter line as I guess it should
Does anyone know what I am doing wrong or if this feature works at all?
I am on version 12.4.5.2 build 4770 of Alpha Anywhere V4.5.2 with system addins build 5018
Also MYSQL56 5.6.39
Thank you for any help you can offer
Kevin Callanan
Post #735435
The question results from not being able to dynamically format the number of decimal places in a report.
I had originally posted these questions in the version 10 forum but I am on V12 and the issue will get more visibility here
My situation is this, I want to vary (Dynamically!) the number of decimal places shown on the report for a field according to the magnitude of the number in that same field
As the field value changes row by row in my report I want the number of decimal places to change depending on the following:
If the value of the field is >=100 then I want zero decimal places
If the value of the field is <100 then I want two decimal places
I put the following expression in the expression builder (available at the DEC parameter of the Properties pane in the report writer)
if(Field Name >=100,0,2) where in my case the Field Name is "Escalated_Cost_Per_Uom_3"
This field is a calculated field created in a view in the MYSQL backend
see attached pictures of the expression builder and the field selector screen
Field Selector.jpgExpression Builder.jpg
I could create no instance where this expression took hold and worked as I think it should
I tried blanking out the decimal place settings in the various other places they can be set
I tried with different field names in the expression
I tried by entering a single number in the expression
I tried publishing the report to Production environment
I did note that the expression passed the internal testing for validity and completeness. It was returning valid results of 0 and 2 and the results changed as I clicked through the records in the dataset
The result was a numeric type N
<dynamic> even appeared in the DEC parameter line as I guess it should
Does anyone know what I am doing wrong or if this feature works at all?
I am on version 12.4.5.2 build 4770 of Alpha Anywhere V4.5.2 with system addins build 5018
Also MYSQL56 5.6.39
Thank you for any help you can offer
Kevin Callanan
Comment