Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Overview of this book

Table of Contents (17 chapters)
Microsoft Dynamics AX 2012 R3 Reporting Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating auto designs from datasets


There are two ways to design an SSRS report in Visual Studio:

  • Precision design: This is for advanced structured design

  • Auto design: This is for general tabular design

In this recipe, we will create a simple auto design report by using the dataset added in the previous recipe, which will fetch the data and show it in the report.

In auto design, there are layouts that are already built in, and we can choose one in which we want to show the data, based on our preferences.

Getting ready

To develop reports in Dynamics AX 2012 R3, you need Visual Studio, through which you can design, develop, and deploy the reports. SQL Reporting Services must be properly installed and configured. You must also have access to the reporting manager to manage and see the reports present in AX 2012 R3.

How to do it...

In this recipe, we will add an auto design under the Design node of the report. We will then assign its layout properties to ReportLayoutStyleTemplate and print the report.

Note

There are some standard report templates in AX. You can choose any of them for pre-designed layouts.

  1. Right-click on the Designs node, select Add, and then select Auto Design. This will create a new auto design under the Design node. Rename it as VendorMaster.

  2. In the VendorMaster properties, set the LayoutTemplate property to ReportLayoutStyleTemplate and set the Name property to VendorMaster.

  3. Under the new auto design node, right-click on VendorMaster and select Add | Table. Set the properties for this table as shown in the following screenshot:

  4. Notice that the fields are added to the table design automatically.

  5. Right-click on Auto design (VendorMaster) and select Preview. This will show a preview of the report.

  6. To rearrange the fields as per the user requirement, go to the Data node under the Table node. You can move fields in two ways, by:

    • Using the right-click menu options, such as Move to Top, Move Up, Move Down, Move to Bottom

    • Using shortcuts, like Alt + Up/Down arrow

The new format will look like the following screenshot:

How it works…

Auto design is much easier to design and develop when compared to precision design. The default type (table/chart) for auto design is defined in the properties of the dataset. The default type determines what kind of control is added when the dataset is dragged and dropped into the auto design node.

Templates: Templates are responsible for printing the header, footer, and company name on a report. They also manage the font and colors. Currently, AX does not support printing the company image in the header through auto design.

Report preview: This accesses the default company in AX to show a report preview. So, ensure that the default company in AX has data, otherwise you may not find data in the preview.

Note

Standard SSRS reporting doesn't have the concept of auto design. This is only available in the AX SSRS implementation.