![]() |
#1 |
Участник
|
sumitsaxfactor: Reports and Data Methods
Источник: http://sumitsaxfactor.wordpress.com/...-data-methods/
============== In this post, I will explain how to use data methods in Reports. We will use the same Report model and report that we created in Building a Simple Report–Precision Design. In AX 2009, AX SSRS had good use of these data methods. But with much better integration, and Reporting framework in AX improving, Data Methods in AX SSRS are reduced to minimal use. Also the reason is that MS is soon going to do away with .Net Business Connector from next version hence the usage of data methods for many things will be redundant. What I have also noticed is the data methods have return type only as System.String and you will not be able to change this return type. This means, data methods can only return strings. What I will try and demonstrate here is how to add links in AX reports (to open the corresponding forms). To achieve this first we will add the reference to SRSDrillThroughCommon project. Do the following:
![]()
![]()
![]()
![]()
using System.Collections.Generic; using System.Security.Permissions; using System.Data; using Microsoft.Dynamics.Framework.Reports; using Microsoft.Dynamics.AX.Application.Reports; publicpartialclassSKL_SampleReportPrecision { [DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")] publicstaticstring CustDrillDown(string reportContext, string custAccount) { returnDrillThroughCommonHelper.ToCustomerForm(reportContext, custAccount); } }
![]()
![]()
![]()
![]() ![]() Источник: http://sumitsaxfactor.wordpress.com/...-data-methods/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|