change sales order invoice report format

Hi,

user requesting for change in sales order invoice report, if i do so it will change the format for all invoices.

Is there a way that we have different report formats for different customers? if so how can i do that?

Please explain.

Thanks

You have two basic approach. Either you’ll use complete separate designs (and you use either print management or code to select the right one), or you’ll have a single design that will change at runtime based on some input data (e.g. you’ll hide a certain field by an expression).

Hi Martin,

I tried to change it trough print management using the https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/analytics/custom-designs-business-docs this link.

I can see two report formats including custom report under the report format in print management. But even if i try to switch between these two formats, i can only see the custom report format i cant switch it back to standard report even after selecting standard report in report format.

Do i need to do any change in the set up or do i need to add any code for switching between report formats for different customers.

Thanks

I’m sorry, but I’m not sure if I understand your current situation. Can you please elaborate what you’ve done, how are you testing it and what problem you have with it?

AR->FormSetUp->Print management ->Customer Invoice Set report format to Standard report.

All customers → select customer account → Print Management set Report Format to Standard report.

Now Try to print sales order invoice for that above customer selected. Its printing in Standard report format

Next

All customers → select customer account → Print Management set Report Format to custom report but still it prints standard Report

But if i also change

AR->FormSetUp->Print management ->Customer Invoice Set report format to custom report it prints custom report.

My question is can i not change report format for each customer by selecting different report format in All customer print managemrntt for each customer with different reports.

If i try to do preview instead of print its always giving custom report no standard report even if i switch.

Sorry for lengthy message. hope you got me.

Thanks

It seems that you’re saying that if you set a format for a particular customer, this specific setup has a priority over the default setup for all customers. It’s the correct behavior, as far as I can say.

Okay, Thanks

Martin,

one more question, i get the custom report when i click “use print management” under view but i get standard report when i click on “original preview”. where and how i need to code for the preview to show custom report? or do i need to write some code in salesinvoicecontrollerExt?

Thanks

I figured it like i need to extend menu item for both original and copy and change class to salesinvoicecontrollerExt. but still preview shows standard report debugging takes me to ext class and custom report but preview not showing custom, is there any thing more to menuitem that i need to change?

Thanks