How to get Company information and SSRS expression for company name using X++ code For Query based Reports
Hi,
How to get Company information using X++ code
static void CompanyInformation(Args _args)
{
CompanyInfo Company;
;
Company = CompanyInfo::find();
info(strFmt("Company Name : %1", Company.Name));
info(strFmt("Company Phone : %1", Company.phone()));
info(strFmt("Company Phone : %1", Company.telefax()));
info(strFmt("Company Address : %1", Company.postalAddress().Address));
//OR try below code for company primary infomation.
//CompanyInfo companyInfo;
// container companyImage;
//companyInfo = CompanyInfo::find();
//companyImage = CompanyImage::find(companyInfo.DataAreaId, companyInfo.TableId, companyInfo.RecId).Image;
//purchPurchaseOrderHeader.companyImage=companyImage;
// purchPurchaseOrderHeader.CompanyAddress =companyInfo.primaryAddress();
//purchPurchaseOrderHeader.purchPhone =companyInfo.primaryPhone ();
//purchPurchaseOrderHeader.purchEmail =companyInfo.primaryEmail ();
//purchPurchaseOrderHeader.purchFax =companyInfo.primaryFax () ;
}
{
CompanyInfo Company;
;
Company = CompanyInfo::find();
info(strFmt("Company Name : %1", Company.Name));
info(strFmt("Company Phone : %1", Company.phone()));
info(strFmt("Company Phone : %1", Company.telefax()));
info(strFmt("Company Address : %1", Company.postalAddress().Address));
//OR try below code for company primary infomation.
//CompanyInfo companyInfo;
// container companyImage;
//companyInfo = CompanyInfo::find();
//companyImage = CompanyImage::find(companyInfo.DataAreaId, companyInfo.TableId, companyInfo.RecId).Image;
//purchPurchaseOrderHeader.companyImage=companyImage;
// purchPurchaseOrderHeader.CompanyAddress =companyInfo.primaryAddress();
//purchPurchaseOrderHeader.purchPhone =companyInfo.primaryPhone ();
//purchPurchaseOrderHeader.purchEmail =companyInfo.primaryEmail ();
//purchPurchaseOrderHeader.purchFax =companyInfo.primaryFax () ;
}
SSRS expression for company name in ax
=Microsoft.Dynamics.Framework.Reports.DataMethodUtility.GetFullCompanyNameForUser( Parameters!AX_CompanyName.Value,Parameters!AX_UserContext.Value)
Reference
Step 3: Map the DataArea to CompanyName parameter in report
Page Number and Current Date and Time in SSRS.
Company Info in Query based Report
Step 1: Go to Application explorer --> Data Model --> Add new Query and Add CompanyInfo Table datasource and Add new Ranges --> DataArea
Step 2: Add new company info Data source in the report
Step 3: Map the DataArea to CompanyName parameter in report
Page Number and Current Date and Time in SSRS.
Following code worked for me:
ReplyDeleteMicrosoft.Dynamics.Framework.Reports.DataMethodUtility.GetFullCompanyNameForUser( Parameters!AX_CompanyName.Value,Parameters!AX_UserContext.Value)
Thanks
cloudkeeda
ReplyDeletewhat is azure
azure free account
azure data factory
cloudkeeda
cloudkeeda
cloudkeeda
get company details
ReplyDeleteGetCompanyDetails (GCD) is your one stop solution to find any company or people public detail. GCD applies various stringent check and measure to provide you most accurate company informatation. We are actively enhancing our company database, and we keep adding company details almost daily
Thanks for the information. I really like the way you express complex topics in lucid way. It really helps me understand it much better way. company database
ReplyDeleteGratitude for the data. I truly like the manner in which you express complex points in clear way. It truly assists me with understanding it much better way. Unique Business Name
ReplyDelete