Solved

Report Rule for different Company - Report Layout

  • 29 July 2020
  • 9 replies
  • 763 views

Userlevel 1
Badge +5

I am trying to create a Report Rule for Customer Order Confirmation, etc. to specify a default Report Layout for each Company, as they each have their own layout.

Goal is when a User goes to print a document that the Layout designated for that Company affiliation will be what appears as the Layout.

I have not been able to get this to work with Order Confirmation or Pro Forma Invoice from the Customer Order screen.

icon

Best answer by JohanLindstrom 11 August 2020, 14:10

View original

9 replies

Userlevel 6
Badge +13

Hi Renea,

From IFS8 on words you can setup Report Rules for this

 

Regards,

Mukesh Gupta

Userlevel 1
Badge +5

Mukesh,

I tried setting up a new Report Rule in our Apps 8 test environment exactly like your print screens above and have had no luck.

Userlevel 1
Badge +5

Print scene to show set up

With no other Report Rules for Customer Order Confirmation enabled

 

Report Definition for Customer Order Confirmation details

Intent with the Report Rule is to have the Prince US Crystal - Order.rpt be the default for Company 7, but Prince_UK is the one that keeps showing up.  Prince_UK will be the default for another company.

 

Userlevel 1
Badge +5

I even tried setting the Report Rule to specify Company 7 as the Expression and still did not work

 

Userlevel 4

If you go to your report rule and condition RMB edit expression 1
You can see that there is no Company on report xml data. So your condition won’t ever match.

You need to use site or make select or use api function to get company based on site at expression1 field 
 

Userlevel 1
Badge +5

Hello Jouni,

Thank you for your suggestion.

We are currently on Apps8 and it appears that for the CUSTOMER_ORDER_CONF_REP  that SITE is not an option.

I have tried several things, including select in this Expression 1 (above) without any success.  I can get it to work for one company/one report layout, but then when I create another rule for a separate company/report layout it will not work. 

I would have thought that creating a report rule for Customer Order Confirmation would have been more straight forward especially since this is a standard report.

We may have to just wait until the upgrade to Apps10 as it appears that SITE will be an option there.

Userlevel 4

Just confirmation, have you tried to use @CUSTOMER_ORDER_CONF_REP\CONTRACT

Userlevel 4
Badge +8

Hello,

As Jouni suggested you will need to use CONTRACT (other name for SITE)

 

In the example below I fetch the company by using @CUSTOMER_ORDER_CONF_REP\CONTRACT. And when the company equals 10 a specific layout is selected 

[&Site_Api.Get_Company('[@CUSTOMER_ORDER_CONF_REP/CONTRACT]')]

 

Best regards

Johan

Userlevel 1
Badge +5

CONTRACT did not work, but replacing CONTRACT with SITE did work

The actual resolution was the following for Apps8:

[&Site_api.Get_company('[@CUSTOMER_ORDER_CONF_REP\SITE]')]

 

Reply