Showing posts with label different. Show all posts
Showing posts with label different. Show all posts

Thursday, June 8, 2017

CALL DIFFERENT REPORT DESIGN IN AX 2012 MICROSOFT DYNAMICS

AX 2012 SSRS REPORT DESIGN 
Go to main method in controller class and write below code to call the report.

   SSRSRPTController   controller; 
   controller = new SSRSRPTController(); 
   controller.parmArgs(args); 
   controller.parmReportName(ssrsReportStr(SALESREPORT, DESIGN1)); 
   controller.parmShowDialog(true); 

   controller.startOperation()  

Thursday, May 4, 2017

MICROSOFT DYNAMICS AX 2012 : SETUP DIFFERENT DATE FORMATS DD/MM/YY OR REGION SPECIFIC ON AX SSRS REPORT

SETUP DIFFERENT DATE FORMATS ON AX SSRS REPORT


Hi

If you want to setup a different Format Date on a SSRS report,

1- Modify date format for all date textbox present in the SSRS Report using the Format function, like =Format(Fields!TransDate.Value, "dd/MM/yyyy")

2- If you want follow the User Timezone, for all date textbox you can use ConvertUtcToAxUserTimeZoneForUser method, like =Microsoft.Dynamics.Framework.Reports.DataMethodUtility.ConvertUtcToAxUserTimeZoneForUser(Parameters!AX_CompanyName.Value, Parameters!AX_UserContext.Value, =Fields!TransDate.Value, "d", Parameters!AX_RenderingCulture.Value)

Saturday, April 16, 2016

HOW TO PRINT A DIFFERENT SALES INVOICE PER COMPANY IN AX :VIKAS MEHTA

How to print a different Sales Invoice per company in AX

If you want to print a different Sales Invoice per every company you have,  change the method printJournal in the table CustInvoiceJour and the form CustInvoiceJournal (MenuButton "SalesInvoiceShow" -> Copy, Original and Original print):

Modified method printJournal for the table CustInvoiceJour:
server void  printJournal(SalesFormLetter      salesFormLetter = null,
                          RecordSortedList     journalList     = null,
                          NoYes                copy            = NoYes::No)
{
    Args                parameters = new Args();
    MenuFunction        salesInvoiceMenu;
    ;

    // Show the correct report for the every company in AX
    switch (strupr(curExt()))
    {
        case "CEU":
            salesInvoiceMenu = newMenuFunction(menuitemoutputstr(OPPSalesInvoice),MenuItemType::Output);
            break;
       
        default:
            salesInvoiceMenu = newMenuFunction(menuitemoutputstr(SalesInvoice),MenuItemType::Output);
    }
    // End

    parameters.caller(salesFormLetter);

    if (journalList)
        parameters.object(journalList);
    else
        parameters.record(this);

    salesInvoiceMenu.run(parameters);
}


For every MenuItemButton below the SalesInvoiceShow, you must override the clicked method as follows:
void clicked()
{
    Args                parameters = new Args();
    MenuFunction        salesInvoiceMenu;
    ;

    // Let the menuItemButton as this, with original parameters but
    // don't call super, to avoid call directly to report SalesInvoice
    //super();

    switch (strupr(curExt()))
    {
        case "OPP":
            salesInvoiceMenu = newMenuFunction(menuitemoutputstr(OPPSalesInvoiceCopy),MenuItemType::Output);
            break;

        default:
            salesInvoiceMenu = newMenuFunction(menuitemoutputstr(SalesInvoiceCopy),MenuItemType::Output);


Thanks,
Vikas Mehta.
Related Posts Plugin for WordPress, Blogger...