Dev Tip: Activating document handling for inquiry(read only) forms – Dynamics Ax 2012

September 20, 2013 Leave a comment

This post will explain how document handling can be activated only for specific tables or for all tables.

Activate document handling for selective tables.

To activate document handling for selective tables.

Go to Organization administration -> Setup -> Document management -> Document management parameters

Check the flag “Use active document tables

selective_active_document

Once specified here then document handling is active only for selective list of tables. To specify the active list of tables  go to Organization administration -> Setup -> Document management -> Active document tables. Document handling is now only enabled for the selected tables in a controlled mode.

active_doc_table

Activate document handling for all tables.

Simply unchecking the  “Use active document tables” in Document management parameters makes it activate for all tables. There is a limitation here, in the case where document handling is enabled for all tables the system verifies if the table has edit/delete permission. Only if it is the case document handling is activated otherwise it is disabled. E.g This means tables like Salestable/Salesline will have permission to add/edit documents while forms that uses tables like custInvoiceJour, vendinvoice jour will have document handling disabled.

User’s may ask for document handling to be activated on these read only  forms. In these case there is a way out.

Go to Organization administration -> Setup -> Document management -> Active document tables and enter the table name, say “VendInvoiceJour” also make sure to check the “Always enabled” flag. This is very important since this means the document handling is enabled irrespective of the table permission. So this way you can activate document handling for read only tables

alwayenabled

\Forms\DocuView\Methods\doReSearch – Go to this method

on line Number: 130 – add the following line,

allowEditBasedOnActualForm = true

codeimage

Setting this will enable you to use the full document handling feature even for read only forms.

Advertisements

SSRS Tip: Using invisible parameters in contracts – Dynamics AX 2012

September 18, 2013 3 comments

There can be cases where you wanted a contract in the attribute but do not want the UI builder to expose it to the user. The reporting framework in AX provides a very easy way to incorporate this.

Open the parm method in the contract that you don’t want to expose. Add the attribute shown here along with other attributes. This attribute when found in the parm method will automatically prevent the UI builder from adding this to the dialog.

[DataMemberAttribute, SysOperationControlVisibilityAttribute(false)]
public LogisticsAddressing parmAddress(LogisticsAddressing _address = companyAddress)
{
companyAddress = _address;
return companyAddress;
}

This feature comes as a part of the BOF, see here http://j.mp/185ufd2

Update: Apologize for the wrong statement here. The only way to make a parameter visible when using the contract with reporting framework is to specify it in the design. This is because the contract class \Classes\SrsReportRdpDataContractInfo\buildMemberAndNestedObjectMap – 29 ignores this attribute and reads the design RDL (created using your VS) to decide if a parameter must be visible in the contract. So to hide your parameter open the parameters node in Visual studio and then set the visibility property to hidden.Also a point to understand is that the VS design overrides any specifications at the contract level for properties like  LableHelp, Visibility, grouping, HelpText, value type (multivalue) etc. (Ref: \Classes\SrsReportRdpDataContractInfo\fillReportDesignProperties). Thanks to a AXForum member who pointed this out.

2013-09-30_1910

For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.

7720EN_MockupCover_Cookbook

SSRS Tip: Using labels for dynamic texts in SSRS reports – Dynamics Ax 2012

September 16, 2013 9 comments

Dynamic text in the reports makes them more readable and meaningful. In this article we will see how we can use labels from  AX to construct your dynamic text. The string format option comes handy to help us do this.

Here is how you must specify a string text with labels in it.

Open the report control properties and on the property “Value”, select the expression option and place your text in the format seen here.

=System.String.Format(“This is a label id converted at run time {0}”, Lables!@SYS1560);

You can also use report or data base fields like Fields!CustTable.Value to construct your Dynamic text.

For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.

7720EN_MockupCover_Cookbook

SSRS Tip: Speed up RDP based SSRS reports testing in Dynamics Ax 2012

September 11, 2013 15 comments

When working on precision designs a lot of time is spent on waiting for the preview to run. If your precision design uses an RDP dataset here is a simple and fantastic tip to speed up.

1. Convert your temporary table to persistent by modifying the TableType property to Regular

2. Now run the report once. Either from Visual studio or inside Ax. This fills the data in the temporary table.

3. Comment the code inside processreport method or simply write a “return” statement on the first line of the method.

That’s it. you are now geared for a faster execution of the reports. Remember to revert back once you are done or wait for the testers to find it 🙂 but don’t let it go to the production.

For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.

7720EN_MockupCover_Cookbook

SSRS tip: No row message in Dynamics Ax SSRS 2012

September 9, 2013 13 comments

Some sections in your report may not have data but the header sections  might print. In these cases to make it informative for the user a “No data available” message might be helpful since the user is then assured that there is no data for that particular data section. This tip will guide you on how to setup “No data available”.

Select the Tablix/List/Matrix control where you want the message to be available and open the properties window, Find the property “NoRowsMessage”. This property can be filled in with text or for dynamic text using expressions. Type in something like “No data available”

2013-08-30_1553

When there is no data for that particular section SSRS automatically prints the text under “NoRowsMessage”

2013-08-30_1550
For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.

7720EN_MockupCover_Cookbook

SSRS tip: Take care that VS and AX client are in the same layer for SSRS – Dynamics AX 2012

September 5, 2013 14 comments

Some times when you use configuration files to start your AX client like this in the image and also work on visual studio, make sure your default client configuration is pointing to the same layer as in the configuration file.

2013-08-30_1528

This is because the Visual studio opens in the layer that is specified in the default settings in AX Client Configuration window. Though your AX client is on VAR layer if your default client configuration setting is pointing to the USR layer then the visual studio reporting project gets saved to the USR layer. You end up in deleting and reimporting the entire project. So make sure to verify the layer setup before you start working on reporting projects.

To setup the default layer configuration, 

Open the run window and type axclicfg

In the window that opens create a new configuration or on the existing configuration go to the Developer tab and verify the layer information including the license

2013-08-30_1535

For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.

7720EN_MockupCover_Cookbook

Book review: Extending Microsoft Dynamics AX 2012 Cookbook

September 3, 2013 2 comments

Packt recently has come up with good titles related to Dynamics and specifically AX. So here is the new addition to the list Extending Microsoft Dynamics AX 2012 Cookbook by Murray Fife. Murray Fife is quite popular in the community through his slideshare presentations that are detailed, ready to implement and interesting articles that would benefit you immediately. This book again is a fantastic addition from Murray. You can read the interview with Murray where he discuss his experience writing this book and future plans here. 8331EN_cover The book is simple, crispier and has a good flow overall. It is non theoretical get in to action type meaning right from the first chapter and the first page you have something that can be accomplished out of it be it adding a role center page or publishing your reports to the role center. As you run through the chapters you would be surprised to see how much can be accomplished without getting your hands dirty with programming. The book covers recipes related to SharePoint, Power view, Performance point, Lync, Workflow, Office, Infopath, OData in relation to Dynamics AX. The author has broken down the chapters in to smaller recipes in a manner that at the end of the chapter the recipes together create a meaningful addition to Dynamics AX. My personal favorites have been chapter-3 related to Dashboards, Charts and scorecards and the chapter – 10 related to web service and forms. Find what looks interesting for you here…

 

What the author promises to reveal through the book,

  • Easily create attractive dashboards and reports using Performance Point, PowerView and Excel
  • Improve and maximize the potential of user communication and collaboration with Outlook and Lync
  • Create and configure roles centers for your users
  • Build personal portals and document libraries within SharePoint
  • Create a streamlined organization through workflows
  • Build new help files specific to your business
  • Develop personalized and customized screens

I would recommend this book for lead functional consultants who do implementations, pre-sales consultants, IT administrators and developers who are engaged with end user systems and implementations. The book is definitely worth a buy and is a interesting read. Order it here today. Please read the authors interview about the book here.