Showing posts with label SSRS. Show all posts
Showing posts with label SSRS. Show all posts

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.

INVENTTABLE AND ECORESPRODUCT RELATION JOIN QUERY LINK ECORESCATEGORY

INVENTTABLE AND ECORESPRODUCT RELATION 
JOIN QUERY LINK ECORESCATEGORY

InventTable and ECORESPRODUCT
select ecorescategorygroc where ecorescategorygroc.Name == catgnames;
    while select * from inventTable join product where inventTable.Product == product.RecId
                    join    productCat  where productCat.Product  == product.RecId
                    join    category    where   category.RecId      == productCat.Category && category.Name == catgnames//category.ParentCategory == ecorescategorygroc.RecId// && category.Name == catgnames
                    join catHierarchy   where   catHierarchy.RecId  == category.CategoryHierarchy//
                             && inventTable.itemid like

Friday, April 15, 2016

HOW TO DEBUG AX 2012 SSRS REPORT CODE BREAKPOINT SrsReportDataProviderPreProcess

HOW TO DEBUG AX 2012 SSRS REPORT 


1)   Open the DP class of the report.
2)  Extend SrsReportDataProviderPreProcess instead of SrsReportDataProviderBase
 in class declaration.
 Temp table properties should be

     (a) Table type : Regular instead of tempDB

     (b)  Created by : Yes

     (c) Created Transaction Id : Yes

Make sure  two checkboxes of user breakpoints and global breakpoints for debugging is enabled  in configuration .


Related Posts Plugin for WordPress, Blogger...