QuilhaSoft / JasperPHP

Pure PHP library to read JRXML files made in "JasperSoft Studio" and generate reports in PDF/XLS
https://jasperphp.net
MIT License
65 stars 25 forks source link

Update Report.php - support changing decimal and thousand separators #61

Closed gamadoleo closed 3 years ago

gamadoleo commented 3 years ago

Just look at my suggestion, with this change and setting the decimal and thousands separators as a property of the class, this maintains compatibility with the project definitions, not affecting those who already use the established masking pattern, as it has not changed the latin format of mask, however this way allows the user to use the format compatible with the studio report and define the separators when instantiating the Report: in my case I use the latin format the separators like this:

 $this->report = new JasperPHP\Report($xmlFile, $param); 
 $this->report::$dec_point=",";
 $this->report::$thousands_sep=".";