Академический Документы
Профессиональный Документы
Культура Документы
03/12/2014
7 minutes to read
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack,
Microsoft Dynamics AX 2012
This section explains how to create reports using the Microsoft Visual Studio tools
for Microsoft Dynamics AX.
How to: Change the Default Number of Records that Display in the Report Preview
Using the Microsoft Visual Studio tools provided by Microsoft Dynamics AX has the
following benefits:
You can create reports quickly using the auto design reporting feature. This
feature automatically creates a report design based on the report data.
You can use SQL Report Designer for reports that require a very precise design. SQL
Report Designer can be started directly from your reporting project.
You can create a consistent appearance and behavior for your reports using style
templates. One style template can be applied to many reports. Style templates let
you separate the style settings from the actual report definition.
You can preview reports at design time from the Microsoft Visual Studio development
environment.
Reports created by using the Microsoft Visual Studio tools for Microsoft Dynamics
AX can be integrated into Microsoft Dynamics AX. They can be displayed as menu
items on menus and forms in the Microsoft Dynamics AX client and in Enterprise
Portal Web parts. For more information, see Report Integration and Customization
Overview.
Creating Reports
The first step in creating your reports is to create a reporting project in
Microsoft Visual Studio by selecting the Report Model project template. After you
have created a reporting project, you can define a report in the model that is
provided. You can add, remove, and modify report items using the context menus that
appear when you right-click the nodes in the model. For example, you can right-
click the Images node for a report, and then click Add Image to add an embedded
image to a report. You can also move or create new elements in a model by using
drag-and-drop functionality. For example, when you drag a report dataset onto the
Designs node, an auto design is created for the report. For more information about
the elements in a model, see Model Editor Overview. The following illustration
shows an example of a report in a model.
Model file
Microsoft Dynamics AX provides two tools, Model Editor and Application Explorer, to
edit and view models. If you double-click a report in Solution Explorer, the report
opens in Model Editor. For more information about the modeling tools, see Model
Editor Overview and Application Explorer.
After you define data sources, you must define one or more datasets. A dataset
identifies data that is displayed in a report. When you define a dataset, you must
specify the data source and the means used to retrieve the data, such as a query,
data method, or stored procedure. Data sources and datasets are defined in the
model alongside your reports. For more information about data sources and datasets,
see Report Data Overview.
Type
Description
Auto design
Precision design
A precision design is a report design that is created by using SQL Report Designer.
Precision designs are typically used when a report requires a very precise layout,
such as invoices or bank checks. SQL Report Designer lets you manually drag-and-
drop fields onto a report and put them exactly where they should be.
Auto Design Layout
An auto design follows a particular layout. It has a header, a body that contains
one or more data regions, and a footer, as shown in the following illustration.
You control the content that is displayed in each area in an auto design. For
example, you can include a report title and the date in the header and display the
page number in the footer. Or, you may not want to display anything in the header
and footer.
The data regions that display in an auto design depend on the datasets that you
created when you defined the data for the report. When you define a dataset, you
can specify the type of data region that will be used to render the data whenever
the dataset is used in an auto design. Data can be displayed in table, list,
matrix, or chart formats. For more information about data regions, see Report Data
Region Overview. One way to create an auto design is to drag a dataset onto the
node for the auto design in the model.
Localizing Reports
Use AX labels in your reports that can be dynamically resolved at runtime. Only one
report definition per report is needed. For more information, see Localizing
Reports.
You can display images in reports. Images can be embedded directly in a report, or
they can be referenced from a database table. Embedded images are typically used
when the set of images to display is constant, as in key performance indicator
(KPI) reports. Images from a database table are typically used when you want to
provide images for a set of items listed in a report, which is common in product
listings. For more information, see Report Images Overview.