Get Free Trial

Localization problems on numeric columns on .net datareader

Cleyton Barroso asked on February 17, 2017

We are starting with Flexmonster on our project. Our back-end is based on a Web API (.Net Framework) and this web api is responsible to access a database, hits a query and return the data to the flexmonster component. The database can be large and we are trying to following the documentation available on the flexmonster website.

We started with the Flexmonster.Compressor.Compressor.CompressDb dll to send my data through a Web API, and we hit a query on an Oracle database. We have issues with number columns on the result for Flexmonster. The problem is with the Culture of the information. We are using pt-BR culture (portugues-Brazil) and our decimal separator is ‘,’ character.

Our code:

public HttpResponseMessage GetCube(long dataSourceId)
HttpResponseMessage response = Request.CreateResponse();

using (var dataReader = GetCube(dataSourceId))
var stream = Flexmonster.Compressor.Compressor.CompressDb(dataReader);

response.Content = new PushStreamContent((Stream outputStream, HttpContent content, TransportContext context) =>
int count = 0;
byte[] buffer = new byte[10240];
while ((count = stream.Read(buffer, 0, buffer.Length)) > 0)
outputStream.Write(buffer, 0, count);
}, new MediaTypeHeaderValue("text/plain"));

return response;

The problem is that our result has a number column where values are: 82,99  286,11  303,94  etc. But, when we access the web api from browser, the results looks like the ‘,’ is a separator and the flexmonster just understand it is a integer value such as 82, 286, 303, etc.
If we access the url of the web api directly from the browser, we can see a result like this:


We think it is a culture/localization problem with numbers and possible it can happen with datetimes too. Is there any way to set the column separator,  for sample instead of ‘,‘ use ‘;‘ on the ocsv2 result?

How can we solve this problem?

Thank you.

1 answer

Dmytro Zvazhii Dmytro Zvazhii Flexmonster February 17, 2017

Hello Cleyton,
Thank you for reporting this issue. We will prepare the necessary fix in the version 2.311 ETA Mar13.
Best regards,

Please login or Register to Submit Answer