ssrsReportStr Function [AX 2012]

Updated: June 7, 2013

Applies To: ssrsReportStr FunctionAX6.3System_Default_Catalog1System_Default_Content_SetUserDocumentationyesAX6DevFunctionXppAX060AX/libraryMsdnDynamicsAX6.0.0.0Retrieves a string that represents the name of the specified report. Used when specifying the report to be run by a report controller class.str ssrsReportStr(str report, str design)ParameterDescriptionreportThe report for which to return the name.designThe name of the design associated with the report.The name of the report.The ssrsReportStr Function parses the two values passed to it, to validate whether they belong to a valid report or not. The report name needs to be set when a menu item points to a controller (T:SrsReportRunController) so that the controller knows which report-design combination must be invoked. Using the ssrsReportStr Function provides the benefit of compile-time validation for the report and design name.This function is a compile-time function, which is a metadata assertion function. Compile-time functions take arguments that represent entities in the Application Object Tree (AOT) and validate these arguments at compile time. They have no effect at run time.The following example initializes a report controller object, including using the ssrsReportStr Function to validate the report name passed to the report controller. public static void main(Args _args) { // Initializing the object for a controller class, in this case, the class named AssetListingController. SrsReportRunController controller = new AssetListingController(); // Getting the properties of the called object (in this case AssetListing MenuItem) controller.parmArgs(_args); // Setting the Report name for the controller. controller.parmReportName(ssrsReportStr(AssetListing, Report)); // Initiate the report execution. controller.startOperation(); }T:SrsReportRunControllerIntrinsic Functionsformstr Functionquerystr Functionidentifierstr FunctionCoding Guidelines for Reporting

Retrieves a string that represents the name of the specified report. Used when specifying the report to be run by a report controller class.

str ssrsReportStr(str report, str design)

Parameter

Description

report

The report for which to return the name.

design

The name of the design associated with the report.

The name of the report.

The ssrsReportStr Function parses the two values passed to it, to validate whether they belong to a valid report or not. The report name needs to be set when a menu item points to a controller (SrsReportRunController) so that the controller knows which report-design combination must be invoked. Using the ssrsReportStr Function provides the benefit of compile-time validation for the report and design name.

This function is a compile-time function, which is a metadata assertion function. Compile-time functions take arguments that represent entities in the Application Object Tree (AOT) and validate these arguments at compile time. They have no effect at run time.

The following example initializes a report controller object, including using the ssrsReportStr Function to validate the report name passed to the report controller.

public static void main(Args _args)
{
    // Initializing the object for a controller class, in this case, the class named AssetListingController.
    SrsReportRunController controller = new AssetListingController();

    // Getting the properties of the called object (in this case AssetListing MenuItem)
    controller.parmArgs(_args);
    // Setting the Report name for the controller.
    controller.parmReportName(ssrsReportStr(AssetListing, Report));

    // Initiate the report execution.
    controller.startOperation();
}

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: