Report customization

Hi,

Any one have idea how to retain the original sales invoice not being overwrite by customization invoice report?

create class, control,??

Regards

What exactly you are looking for? Do you want to replace the original with the customized or do you want to remove the customized.

Well, it depends if you want to:

a) Not to spoil the original sales invoice report which you are not going to use anymore, but you want to leave it intact for future version upgrades.

b) You still want to use standard report along with your customized version (so have both active)

For the first solution - just customize it however you want to as original invoice will always be available in SYS layer, so you can delete your USR,'s CUS’s or whichever the layer you code in.

For the second one - if there is anything useful in standard report for your customized version (I believe there is), just duplicate the sales invoice object in AOT, modify it the way you want it to look like, modify those places where report printing is called, add an enum for user interface to choose which version of invoice to print out. Looks like 1 to 2 days of development work, depending on your modified invoice’s complexity.

Hi All,

Thks for suggestion. Yes, i still want to use standard report along with the customized version (so have both active).

it sound great idea to add an enum for UI. However, do appreciate if have any simple sample, how enum can call to choose for invoice version printed?

Regards

For the same report you can have two designs - one is standard and other is the customized.

and you can override the init method of the report - to tell which design need to excuted based on the enum selection or a check box.(you can add this enum to sales table)

Not a bad solution, Kranthi, but just if the data fetching is identical we are talking about differences in design and some display methods, and that there is no need to override fetch() or send() methods for the other design… because both designs will share those methods.

Thanks Janis for your comments. Your points are well noted.

I know very well it differs from the requirement. The poster will use my suggestion if it matches his/her requirement.

It will be better if you answer the posters question ranther than others…

hi All,

Thks. I will try using the enum for user to select which invoice report need call to print…

in btw, do anyone know does there any website provide very good AX report customization guide (using AX report tools)?

Regards

HAKO_AX.
If you use AX 2009 (I cant check AX4 at the moment), check the method on Table/CustinvoiceJour.printJournal(), there is a code line:
salesInvoiceMenu = new MenuFunction(menuitemoutputstr(SalesInvoice),MenuItemType::Output);
Which initializes the right report for the invoice printout. In standard this is SalesInvoice. However, you can easily modify the code here by adding a SWITCH (or just IF) statement which would initialize another report, (your duplicated report) according to parameter passed.

For example something like this:
switch (salesFormLetter.salesParmUpdate().MYENUM)
{
case MYENUM::StandardReport :
salesInvoiceMenu = new MenuFunction(menuitemoutputstr(SalesInvoice),MenuItemType::Output);
break;
case MYENUM::OurNewReport:
salesInvoiceMenu = new MenuFunction(menuitemoutputstr(HAKOSalesInvoice),MenuItemType::Output);
break;
}

As I mentioned, you still have to set up this enum field to SalesParmUpdate and CustInvoiceJour tables. Drag it to the right field groups, so that it appears on posting form, etc., etc… and do some more modifications here and there to finish it.

Hi,

i’m using AX2009. Thanks a lot for the help & advice.

In btw, i face an issue during sales invoice modification. The sales invoice document (during preview) did not display the item dimension (other field is display liek number, unit, qty, etc) which i curios why?

i did delete the report design of inventory dimension in first modification but i added it back after second modify.

Please help hint me where is the control hidding to display the column field in sales invoice?

path of sales invoice: -

report> sales invoice > design > section group (custinvoicejour) > body: bodyCustinvoicetrans > group: InventoryDimension (table: inventDim, datagroup: inventorydimension)

Appreciate the help