Skip to main content

Posts

SSRS - D365 FO SAT-box annoyance

WHY oh WHY, does the developer-box not tell you, that you can not use custom code in an SSRS-report ? Working with a SSRS-report on Dynamics 365 FO, I came across the following annoyance, with Microsofts setup virtual boxes in Azure. I was working with getting the report to present the filters and chosen parameters from the report dialog that the user is running the report with. At some stage, I thought making a function with custom code in the report properties, was the way to go, but I abandoned that approach in favour of another - AND forgot all about the code. This meant that the custom coded was checked into dev.azure.com, and included in the build on the build box. So I got the deployable package and uploaded it into asset library in LCS, and applied to the SAT-environment. No worries. Right until the users started tested the report in the SAT-environment, because they got: So this meant going back to the dev-box, cleaning out the custom code, doing the building and appl
Recent posts

Dynamics ax 2012 SSRS reports RDP Changing Query

I have used a bit of time this morning trying to figure out how to change the query in an RDP based SSRS report. I needed to change the report from using a query JmgPaySpecification to using the query JmgPaySpecificationExt instead. I started out by changing the     SRSReportQueryAttribute(queryStr(JmgPaySpecificationExt)) attribute in the classdeclaration of the RDP class and compiling it. Then I went to Visual Studio, opened the report and doing a rebuild on it to get it refreshed in the AOT. However that didn't seem to change anything, and doing a find on the SSRS-report searching all nodes and searching for JmgPaySpecification revealed: So doing the above changed nothing. The solution is, to go into Visual Studio opening the report: 1. Go to Datasets and highlight the Dataset 2. Change the Data Source Type from Report Data Provider type to Query.     This clears the Query setup. 3. Change the Data source Type back to Report Data Provider.

Quickly setting up what the status bar will show for your user.

When documenting test or setup it is advantageous to show as many values in the status bar as possible (especially the AOS name and company accounts id and maybe date and time), to be able to show in screen dumps what environment you are using. Here is a quick little job for setting up ALL fields to be shown in the status bar. Dynamics AX 2009: static void Job130(Args _args) {     #LOCALMACRO.FLAG_StatusLineHelpText             (1 << 0) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineDatabase             (1 << 1) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineWatch                (1 << 2) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineNumLock              (1 << 3) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineCapsLock             (1 << 4) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineActivity             (1 << 5) #ENDMACRO     #LOCALMACRO.FLAG_StatuslineSystemDate           (1 << 6) #ENDMACRO     #LOCALMACRO.FLAG_StatusLineShowUtilLayer        (1 << 7)

Dynamics AX 2009 Ressources graphics

Here's how to get graphics stored in AOT as a ressource onto a report in Dynamics AX 2009. Do a display method with: display Bitmap  companyLogo() {     return SysResource::getResourceNodeData(SysResource::getResourceNode(identifierstr('zabel_JPG'))); } where zabel_jpg is the graphics file stored in ressources in the AOT. Drag the method onto the design.

Toggling visibility of fields in a Grid in then preview Pane of a ListPage form using code

Tasked with hiding a specific field on the salesLine table in the sales order forms depending on the value of a field on SalesTable I searched for methods and came across: https://community.dynamics.com/ax/f/33/t/168729 I agree with the method of finding the field on the datasource of the formpart however a better method of making the field invisible is to reference formDataSource.object(fieldnum( , )).visible(true/false); instead of actually having to reference the form control. This will make the field visible/invisble anywhere in the form that the field of the datasource is used. In my case it was done like this: private void toggleintraCodeReturn() {     PartList    pl;     int pCount,partdsCount;     FormRun part;     boolean shown;     FormDataSource pfds;     FormDataSource  fds,partfds;     shown = this.currentSalesTable().CustMaterial == NoYes::Yes;     if (this.currentSalesTable().isFormDataSource())     {         fds = this.currentSalesTable().dataSour

Dynamics AX and project quotations in in .docx format

Just finished an assignment making a tool for Dynamics AX 2012R2 for creating project quotations in word, using AX data. The customer is an ETO company manufacturing production lines for slaugtherhouses. The tool should create a quotation file word document (.docx) using a word template (.dotx) prepared in a certain language. This would allow the customer to design the layout of the document in a easy and familiar way. The spec required the quotation to include Budgets with detailed information for each sub project of a main project. Budgets summarized for each sub project of a main project. Scope of supply, which contains short technical descriptions of the included units on the production lines (sub projects) Technical descriptions - a section of the document containing listing (only once for each unit/sub project) complete descriptions with pictures of each included unit The algorithm in short is this: Now the challenge was that for most itemids in the item forecast

Dynamics AX 2012 AOT add-in copying field list to clip board

Before Dynamics AX 2012 and the new editor which makes things a bit more Visual Studio like, we had some features in the AOT, that are gone now but I miss. I *might* have rambled and raved about this before ( http://gotdax.blogspot.dk/2012/03/dynamics-ax-2012-annoyances-for-old.html ) ;-). E.g. I miss the ability to mark all fields on a table in the AOT and simply copy them to code. In the olds days this could be done by simply marking the fields in AOT and dragging them to the editor window. I needed this and got fed up with having to type the field names my self so I made a little class with the main method: public static void main(Args _args) {     #AOT     DictTable   dt;     DictField   df;     int f,start,end;     Set s;     SetEnumerator se;     int tableno;     TextBuffer txtb = new TextBuffer();     str fieldNameList;     str tableName;     TreeNode treeNode;     str searchFor = 'Path: '+#TablesPath+#AOTDelimiter;     #define.FIELDS('\\Fields')     i