Localization problems on numeric columns on .net datareader
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.
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;
while ((count = stream.Read(buffer, 0, buffer.Length)) > 0)
outputStream.Write(buffer, 0, count);
}, new MediaTypeHeaderValue("text/plain"));
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:
___ocsv2___2.309/2.213 -NUMERO_LINHA,-PRODUCAO 1,82,99 2,286,11 3,303,94 4,323,66 5,240,46 6,290,64 7,162,84 8,68,01
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 for reporting this issue. We will prepare the necessary fix in the version 2.311 ETA Mar13.