Question

Ifs report designer

  • 17 April 2024
  • 4 replies
  • 43 views

Badge +3

Hello everyone,

I can’t find decent information about syntaxes to create visible condition in ifs report designer.

My goal right now is to hide a field (charge_amount) when the value is negative (starting with ‘-’).

There is also a second condition for this same field, which is core from ifs ivc report

tns:CUSTOMER_ORDER_IVC_REP/tns:INVOICE_TYPE = 'CUSTORDCRE'.

My question is how do I do this ? Should I use the visible condition as below and add an expression . If so, what’s the correct syntax for the negative parameter i’m looking for ?

Best regards,


4 replies

Userlevel 7
Badge +30

Moved to the framework section.

Userlevel 6
Badge +15

 @Romain_SNP I see that field already has a condition to show the field only if the invoice is a Credit Invoice. Normally amount fields are with minus ‘-’ in case of Credit Invoices.

 

Anyways, if you wanna hide the field you should leave the existing condition in place and add :

and tns:CUSTOMER_ORDER_IVC_REP/tns:INVOICE_LINE_TYPES/tns:INVOICE_LINE_TYPE/tns:CHARGE_GROUPS/tns:CHARGE_GROUP/tns:CHARGE_TYPE_ITEMS/tns:CHARGE_TYPE_ITEM/tns:CHARGE_AMOUNT > 0

Badge +3

Hello ! Thanks for your answer.

Unfortunately It’s not completly sovling my problem. Probably because there is something more I don”t understand in ifs report designer.

I should explain better also :

I have cf_charge_amount which is located in invoice_line_type LU of the report schema (it’s a custom field from entity configuration). The Custom field work as intended that’s not the question.

On this IVC report, we want to show this cf_charge_amount always when it’s a DEB invoice. So no condition, at this point.

When it’s a CRE invoice and the amount is >0, we also want to show it. Otherwise it should be hidden from the CRE invoice.

To do so, I was supposing I should do multiple condition using this :

In the (1) field I say “show the value of this field” when the invoice is DEB or CRE (always it seems).

In (2) I have writted :

tns:CUSTOMER_ORDER_IVC_REP/tns:INVOICE_TYPE ='CUSTORDCRE' and tns:CUSTOMER_ORDER_IVC_REP/tns:INVOICE_LINE_TYPES/tns:INVOICE_LINE_TYPE/tns:INVOICE_LINES/tns:INVOICE_LINE/tns:CF_CHARGE_AMOUNT>0

Strange thing when I test like that on CRE invoice, there is no data showing up on a credit invoice where there is a charge amount of 0,10€.

Can you help me a bit understand my mistakes ? 
Best regards

Userlevel 6
Badge +15

@Romain_SNP OK, then if I understood correctly you would need to combine and and or  conditions to make this work. I believe this is what you would need to use in the Visible condition field only:

tns:CUSTOMER_ORDER_IVC_REP/tns:INVOICE_TYPE ='CUSTORDDEB' or ( tns:CUSTOMER_ORDER_IVC_REP/tns:INVOICE_TYPE ='CUSTORDCRE' and tns:CUSTOMER_ORDER_IVC_REP/tns:INVOICE_LINE_TYPES/tns:INVOICE_LINE_TYPE/tns:INVOICE_LINES/tns:INVOICE_LINE/tns:CF_CHARGE_AMOUNT>0)

 

Let me know how it goes. If required we could get on a call to better understand what you are trying to achieve.

Reply