Incorrect number formatting in Pentaho Report - pentaho

I'm using Pentaho Report designer 3.9 for a legacy project that has some reports that should support different languages (English, Spanish and Euskera).
I have a problem with the number formatting. While in English and Spanish numbers show properly (#.###,## in Spanish and #,###.## in English), in Euskera numbers are shown the same way that are shown in English, but they should be shown the same as Spanish.
I've tried setting the language as eu, as eu_ES and es-ES but I haven't suceeded.
Have anyone had a similar problem?
Thank you very much for your help.

Number format field will not directly work for multi-language report.
In my current project we are using MySQL database and handling multi-language number format at query level and using text-field displaying it into report.

I had this problem when trying to use the mask in the Text Output to generate a CSV, the execution was ignored the mask to convert "0.00" to "0,00". I found that the problem was in the Oracle sql query with a TO_CHAR ( ) in the column, which caused masks to be ignored.

Related

Proper formatting of Excel sheets to avoid errors in SQL querying?

What do you avoid when creating and filling out a Excel spreadsheet of data for a SQL database (certain formats, characters, character length issues?)
2.Does it matter how dates are formatted?
VARCHAR or INTEGER errors you've seen?
Finally, what SQL or Python queries did you use to address errors you found that you might have shared for questions 1-3?
The easiest way would be, if you can import Database-EDI (e.g. Oracle SQL Developer) a TXT- or CSV-Excel-Export into our Database.
→ Depending on the database, different requirements must be observed.
The main focus is on the correct formatting with regard to the country settings (Excel & database):
Excel-Format-Date YYYY-M-DD HH24:MM / Databe-Timestamp YYYY-MM-DD HH24:MM:SS.FFFF
→ That would not work
In addition, make sure that Excel does not cut any numbers:
Excel-Format-Long-Number 89632150000 (orignal 896321512345 )
→ Excel automatically shortens the number in the standard settings.
The length of a text must not exceed the specified maximum length in the assigned column of the type (VARCHAR).
I think these would be the main points to look out for.

Formatting number in HANA

We have HANA database with SPS 12.
We have requirement where we need to format decimal as per business rule -
Typically I want comma as thousand separator as -
Input - 12345678.1234
Ouput - 1,23,45,678.12
In Oracle, it is possible with to_char(input,'99,99,99,999.99').
Is it possible to achieve same in HANA?
What you're asking sounds as if the format shall be used for client presentation of the number values. If that is the case, please use the data formatting options of the client tools you use.
The example you mentioned is actually doing two things: formatting the number by your specification and changing the data type to char. That means you cannot use it for further calculations.
Usually, with Oracle tools you would define the output formatting in the client tool (e.g. SQL*PLUS has the option to define formatting with the COLUMN setting).
The standard SAP HANA SQL clients like hdbsql or SAP HANA Studio take the formatting settings mainly from the OS environment and don't provide specific options to change the formatting.
For SAP HANA Studio I wrote a detailed explanation on what factors drive the formatting of dates and numbers, see here.

Downloading .csv from SSRS need to avoid scientific notation format

Have an issue where when a report is downloaded, a field that has over 15 digits is converted to scientific notation instead of displaying the full digits (i.e. 672000000000000 = 6.72×10 to the 14th degree). I know this is an excel feature, but is there any workaround for it on the SSRS end?
Thanks!
This is an Excel issue, not a Reporting Services one. The SSRS CSV export should contain the number as it exists in the report, e.g. 672000000000000
The default behaviour for Excel (which you are presumably using to open the CSV file) is to display values this large using scientific notation, i.e. "6.72E+14". This behaviour can't be controlled from within SSRS.
As an alternative you might consider using the Excel render method for the report, which might give you more control over the display of these numbers.
Excel won't mess with it if you convert the expression to a string within SSRS.
Go into the expression for the text box and type the following:
=Str(Fields!YourFieldHere.Value)

Access SQL: Format a calculation as a percentage (Numeric, not string)

I'm working in Access 2010's SQL editor and I'm performing a calculation that results in a ratio.
I would like to display this ratio as a percentage using the SQL syntax editor, but as a number, not a string. I'd like to be able to paste out/export to Excel and not have to convert text to numbers.
Let's say this is my calculation:
OriginCount/DestinationCount AS MatchRate
I used the FORMAT function to make it appear as a percentage, but the result appears as a string. (Which I think is how the FORMAT function is designed to work)
FORMAT(OriginCount/DestinationCount,'Percent') AS MatchRate
Question 1: Is this possible using the SQL syntax editor?
Question 2: How do I do it?
Thanks!
How will you be using this data? It is standard to leave it as a double, EG: 0.02354, and then simply change the format of any control displaying that field.
Users should not being seeing tables or queries without them being the recordsource of a form, so this shouldn't be a problem.
That way, when exporting to Excel/Wherever else, it will properly display as a decimal number, and when viewing in Access, it will display as a Percentage 2.35%
The result of the FORMAT function in access is always in string format, so that would be expected behavior.
Did you try the CONVERT function instead?
https://msdn.microsoft.com/en-us/library/ms187928.aspx

Formatting a string in SQL Server

I have a report and it must display text from a table, and I am not allowed to just type the text in the report or this would be really easy.
I just want to bold one word in a SQL string, and have it show up bolded in the SSRS report. Is there a way to format strings in SQL Server?
No, you can not. SQL Server stores and manipulates data, but is not meant to format it, let alone trying to apply some kind of visual formatting.
Strings in SQL Server (or rather, text types, like CHAR, VARCHAR, NCHAR and NVARCHAR) are simply textual - they have no formatting and can't have formatting.
You will need to make the values bold in the report itself.
You can't change the font for the strings in SQL Server. Any formatting must should be done in the Report.