When I tested the report on JasperSoft Studio it's working fine.

[![error](https://i.stack.imgur.com/hsccn.png)](https://i.stack.imgur.com/hsccn.png)

but when I exported report and test it on my main project I get this error:

> 
> Error evaluating expression for source text:
>  IF($F{jdpmarc}.equals(""),new java.math.BigDecimal(0),$F{jdpprit})
> 
> 
> 

I have tried these things:

Changing this expression because it's a BigDecimal operation

```
IF($F{jdpmarc}.equals(""), 0,$F{jdpprit})

```

for this

```
IF($F{jdpmarc}.equals(""),new java.math.BigDecimal(0),$F{jdpprit})

```

this is my code:

```
Connection conn = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/db","user", "password");

    HashMap<String, Object> data = new HashMap<String, Object>();
    data.put("Proforma", 67929);

    String reportPath = "ReporteIva.jasper";

    JasperPrint report = JasperFillManager.fillReport(reportPath, data, conn);

    JasperViewer viewer = new JasperViewer(report);
    viewer.setVisible(true);

```