I have problems with getting rid of decimals in my Trial Balance report (report Number 6) on the credit amounts. I had to use some bit of code and add in a new control because I couldn’t use the old ones successfully. The question is that Is there an easy way of getting rid of the decimals.
Wallyshe
Walter, I suggest that you open the layout of the report by View, Sections. Then, assign 0:0 (zero colon zero) at Decimal for the properties of “G/L Account”.“Net Change” and “G/L Account”.“Balance at Date”. This means no decimal. Hope this works…[:)] Enjoy!
I am afraid that Chongs solution will not work when using a table-field. Create [global] variables, put the amounts into theese variables, which you print. And for the variables you can set property DecimalsPlaces → 0:0.
Or you can set SourceExpr to +“G/L Account”.“Net Change” and set DecimalsPlaces to 0:0.
Hi, Anifinnur Hovgaard soultion would work perfectly.Try the same.
I tried Anfinnur’s solution and it does work fine. Now because I am trying to edit the trial balance reports not to show decimals e.g. report numnber 6. The new control I use will show negative values and zeroes. What I would really want to do is make the control visible if the value is negative or zero. How can I apply this in code. (probably using the visible property of the control).
Hi, have a look to the property ‘BlankNumbers’ in the variable output of your report. There is an option ‘BlankPos’
Thanks Mit freundlichen Grüßen. The properties worked perfectly. So is there a way of referencing properties on reports in code?
Hi Walter, my skills are only until Navision 2.01 and there is no way to do what you want. In such cases i solved the problem by using differnt sections which can be shown by CurrReport.SHOWOUTPUT in the OnPreSection()of the section
So you can’t really change reference controls in code? Are you saying that the only way to manipulate controls on a report is by having different sections with the same controls and show one section or the other depending on the output you want (please correct me if I’m wrong).
You could also try this. As you just want the report without the decimal, then go to the field in the section of the report & for the SourceExpression propery write ROUND(FieldName,0) It should work fine.
I am sorry. The second parameter of the round function is to be set to i. i.e. - ROUND(FieldName,1).
I am sorry. the second parameter of the Round function is to be set to 1. I.e. - ROUND(FieldName,1).
Thanks guys the Round(FieldName, 1) seems to work perfectly. Can you do anything at all to individual controls, (major or minor) if so what exactly.
Oh about the Round(FieldName,1). It works fine for ordinary fields but will not work for controls with formulas for example the credit field in the trial balance report (6).