Skip to main content

Posts

Showing posts from 2015

How to add image dynamically from Ax database to SSRS report

Solution : In report design view, create a required table with a data source connection and a dataset with a field that contains binary image data. For more information, see . Insert a column in your table. On the  Insert  menu, click  Image , and then click in the data row of the new column. On the General page of the  Image Properties  dialog box, type a name in the  Name  text box or accept the default. In  Select the image source , select  Database . In the  Image Properties  dialog box, click the expression ( fx ) button. Add following line in expression   = System.Text.Encoding.Default.GetBytes(Mid(System.Text.Encoding.Default.GetString(Fields!IMAGE.Value),8)) In  Use this MIME type , select the MIME type, or file format, of the image—for example, bmp. Click OK.

get Financial dimension from Purchase Order AX 2012 X++

Problem: How to get Financial Dimension from Purchase order AX 2012 X++? Solution : public str getDimensionCombinationValues(PurchTable _purch,str _val) { PurchID _purchId = ""; DimensionAttributeValueSet    dimAttrValueSet; DimensionAttributeValueSetItem  dimAttrValueSetItem; DimensionAttributeValue dimAttrValue; DimensionAttribute dimAttr; Common                  dimensionValueEntity; DimensionValue          dimensionValue; DimensionAliasName      dimensionName; ; dimAttrValueSet = DimensionAttributeValueSet::find(_purch.defaultdimension); while select dimAttrValueSetItem where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId { dimAttrValue =  DimensionattributeValue::find(dimAttrValueSetItem.DimensionAttributeValue); dimAttr      = DimensionAttribute::find(dimAttrVa...

Error executing code: FormRun (data source) has no valid runable code in method 'new'.

Problem: Error executing code: FormRun (data source) has no valid runable code in method 'new'. Stack trace (C)\Classes\FormRun\new (C)\Classes\SysSetupFormRun\new - line 4 (C)\Classes\ClassFactory\formRunClassOnClient - line 10 (C)\Classes\ClassFactory\FormRunClass (C)\Classes\xMenuFunction\run (C)\Classes\MenuFunction\run - line 85 (C)\Classes\Docu\note - line 6 (C)\Classes\Info\formNotify - line 41 (C)\Classes\FormRun\task (C)\Classes\SysSetupFormRun\task Solution:  

SSRS Report ax 2012

https://community.dynamics.com/ax/f/33/t/146289

Solving the error " The CIL generator found errors and could not save the new assembly"

Step 1: Stop the AOS Step 2: Delete all of the source in the C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL directory Step 3: Start the AOS Step 3: Perform a full compile  Step 4: Perform a full CIL generation After a FULL CIL compilation I got the following errors: I just went to the object in question and compiled them separately.  The outcome would correctly compiled all the artifacts, including my new service group.

string Contain in X++ Ax 2012

string Contain in X++ Ax 2012 str target; int found; str  GeneralJournalAccountEntry            _GeneralJournalAccountEntry; ;   target=_GeneralJournalAccountEntry.LedgerAccount;                 found = strscan(target,"22222",found,strlen(target));                 If (found!=0)                     {                         subtotal+=_GeneralJournalAccountEntry.AccountingCurrencyAmount;                     }