Langsung ke konten utama

Postingan

Menampilkan postingan dengan label AX

AX X++ str2Date

From time to time, a user will need to pull a date from a string. More often than not it is from an XML or from some other location. In order to actually use this date passed, it needs to be of data type 'date' so it can be written to fields, used in queries etc.  To do this, a user can use the 'str2Date' function. The str2Date function takes two parameters: datestring = The date in string format. It can be separated by either a dash ('-') or slash ('/') sequence = A three number combo using 1, 2, and 3 where 1 = day, 2 = month, and 3 = year. (e.g. 231 would be MM-YYY-DD, and 321 would be YYYY-MM-YY) If the sequence doesn't match the string or has an error, a '0' will result. Note that its very important to distinguish between day and month as an invalid month (>12) will result in a 0 and if both are <13, the date can translate totally wrong. I've detailed out the results of various scenarios below. Should be pretty self explan...

Use X++ wildcard (LIKE and NOT LIKE) in X++ select statement

For x++ select statements:  select firstOnly batchHistory      where batchHistory.Caption  LIKE  "*Test*"  For x++ queries:  queryBuildRange.value(*Test*); Note the LIKE instead of a '==' and the wildcards inside of the quotations. All other combinations of wildcard usage will work here. This is the same functionality as what the users would put in the grid filtering(eg. '*TEST*' in the caption field filter on the batch tasks form).  However, if you want to find all Captions that do not have the word Test in them (NOT LIKE, !LIKE), you will have to modify the above example slightly.  For x++ select statements:  select firstOnly batchHistory      where  !( batchHistory.Caption LIKE "*TEST*" ) ;  For x++ queries:  queryBuildRange.value(!*Test*);

FATAL EXCEPTION PERFORMING AXRDCE TRANSFORMATION STEP. THE REPORT CANNOT BE RENDERED. PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR.

FATAL EXCEPTION PERFORMING AXRDCE TRANSFORMATION STEP. THE REPORT CANNOT BE RENDERED. PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR. Today I came with new issue in AX Report. Few days back my report was working fine. But today it showed me something weird information while opening the report. Fatal exception performing AXRDCE transformation step. The report cannot be rendered. Please contact your system administrator. I was just googled, there is no luck. Finally I figured out the issue. First this SSRS report was developed with Query Dataset type. Few days before I just deleted one field from my table. but I checked in (Visual Studio) SSRS–> MyReport –> dataset –>fields  still my deleted field is exist in this report dataset. This is the only reason i got this error. I have tried to delete the unavailable field, but there is no option to delete the field from Report dataset. Here is the solution if you have same scenario.  Export the ...

How to make Relation in Extended Data Type and add 'View Details' for field on a form in AX 2012

Because AX 2012 is not support  for add relation to Extended Data Type like in AX 2009. This is my solution how to do it in 2012: - Duplicate an EDT have relation in AX 2012: ex SalesId and change name. relation table, reference table to yours -> you have an EDT with relation **** If your project have been customized already and have a lot tables with field extend from your EDT, you don't need to change  EDT property in each table (because it takes lot of time). Follow these steps: - Export your Proj xpo (with old EDT too) - Delete old EDT, rename duplicated EDT to your EDT ( now tables with fields extended by your EDT lost all EDT property) - Import project  without old EDT  ( auto fill property for all extend field) The filed with EDT have relation aut o add 'View Details function on form ( Right-click a field in a form, and then click  View details) ***1 more way to add 'View Details' with field not extend from EDT Open the form in the AOT, expa...

MDX previous and current day/month

Current day/month 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 WITH   MEMBER  [Measures].[ Day Revenue] AS AGGREGATE(   PERIODSTODATE([Calendar].[ Day ],[Calendar].CurrentMember), [Measures].[Sales Revenue EUR] )   MEMBER  [Measures].[ Month Revenue] AS AGGREGATE(   PERIODSTODATE([Calendar].[ Month ],  [Calendar].CurrentMember), [Measures].[Sales Revenue EUR] ) Previous day/month 1 2 3 4 5 6 7 8 9 MEMBER  [Measures].[Yesterday Revenue] AS   PARALLELPERIOD([Calendar].[ Day ],1,[Calendar].CurrentMember), [Measures].[ Day Revenue] ) MEMBER [Measures].[ Last   Month Revenue] AS PARALLELPERIOD([Calendar].[ Month ],1,[Calendar].CurrentMember), [Measures].[ Month Revenue] ) This is just to make my select statement compact 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 MEMBER  [Measu...