Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional print how to use? #47

Closed
gamadoleo opened this issue Jun 12, 2021 · 4 comments
Closed

Conditional print how to use? #47

gamadoleo opened this issue Jun 12, 2021 · 4 comments

Comments

@gamadoleo
Copy link
Contributor

conditional print how to use?
I have reports that I basically use two functions for.
New Boolean and the AND() and OR() functions all native to jasper report, I realize that JasperPHP doesn't work I would like to know what is the recommendation to work with conditional print and how I can adapt my example:
printWhenExpression:

AND(new Boolean($F{invoice_bar_code} != null), new Boolean($F{invoice_payment_form_id} != 4) )

@Rctnet
Copy link
Member

Rctnet commented Jun 12, 2021

Use a PHP "if" default condition sintaxe. in future can be implement to make compatibility to jasper native functionality.

@gamadoleo
Copy link
Contributor Author

I understand the point is that since I use jasper itself to test and see the behavior, I thought it would be possible to maintain compatibility between both

@gamadoleo
Copy link
Contributor Author

Another problem I've noticed is related to the use of the jasper concatenate

see the example:
$F{customer_name}+
" CPF/CNPJ: "+$F{cliente_cpf_cnpj}+"\n"+
$F{client_address_cobranca}

JasperPHP does not deal with this issue and the "+" sign is displayed on screen, exactly the same thing, for example, if I mount a file patch by concatenating the address with a database variable

@Rctnet
Copy link
Member

Rctnet commented Jun 17, 2021

see this sample

<textFieldExpression><![CDATA[$F{cedente_endereco1}+" "+$F{cedente_endereco2}]]></textFieldExpression>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants