>

Tag Archives: SSRS

How to pass parameter to SSRS report from Dynamics AX

The below code for Passing parameters to SSRS using X++ code.

 

    MenuFunction SSRS_MyReport;

    Args Args;

    str parmId ="";

    ;

   // create reference to menu item “OverTime” which is in AOT
    SSRS_MyReport = new MenuFunction(menuItemOutputStr(OverTime),MenuItemType::Output);

    Args = new Args();

    // Set parameters and parameter value
    // I have 3 Parameters Nationality, EmplGroup, PeriodID

    parmId = "Nationality=KSA&EmplGroup=HERD&PeriodID=2014_05";

    // Assign parameters to report
    Args.parm(parmId);

    // Run the report
    SSRS_MyReport.run(Args);

 

 

Notes:

1- Parameters name is case sensitive, so it should set name as predefined in report.

2- You can pass more than one parameters by add “&”   between each parameter.

3- Not add space between parameters, it cause an error

How to: Grant User Access to a Report Server (Report Manager)

Reporting Services uses role-based security to grant user access to a report server. On a new report server installation, only users who are members of the local Administrators group have permissions to report server content and operations. To make the report server available to other users, you must create role assignments that map  user or group accounts to a predefined role that specifies a collection of tasks.

For a report server that is configured for native mode, use Report Manager to assign users to a role. There are two types of roles:

  • Item-level roles are used to view, add, and manage report server content, subscriptions, report processing, and report history. Item-level role assignments are defined on the root node (the Home folder) or on specific folders or items farther down the hierarchy.
  • System-level roles grant access to site-wide operations that are not bound to any specific item. Examples include using Report Builder and using shared schedules.

    The two types of roles complement each other and should be used together. For this reason, adding a user to a report server is a two-part operation. If you assign a user to an item-level role, you should also assign them to a system-level role. When assigning a user to a role, you must select a role that is already defined. To create, modify, or delete roles, use SQL Server Management Studio.

For a report server that is configured for SharePoint integrated mode, you configure access from a SharePoint site using SharePoint permissions. Permission levels on the SharePoint site determine access to report server content and operations. You must be a site administrator to grant permissions on a SharePoint site.

Before you start

 

Review the following list before adding users to a native mode report server.

  • You must be a member of the local Administrators group on the report server computer. If you are deploying Reporting Services on Windows Vista or Windows Server 2008, additional configuration is required before you can administer a report server locally.
  • To delegate this task to other users, create role assignments that map user accounts to Content Manager and System Administrator roles. Users who have Content Manager and System Administrator permissions can add users to a report server.
  • In SQL Server Management Studio, view the predefined roles for System Roles and User Roles so that you are familiar with the kinds of tasks in each role. Task descriptions are not visible in Report Manager, so you will want to be familiar with the roles before you begin adding users.
  • Optionally, customize the roles or define additional roles to include the collection of tasks that you require. For example, if you plan to use custom security settings for individual items, you might want to create a new role definition that grants view-access to folders.
To add a user or group to a system role
  1. Start Report Manager.
  2. Click Site Settings.
  3. Click Security.
  4. Click New Role Assignment.
  5. In Group or user name, enter a Windows domain user or group account in this format: <domain>\<account>. If you are using forms authentication or custom security, specify the user or group account in the format that is correct for your deployment.
  6. Select a system role, and then click OK.

    Roles are cumulative, so if you select both System Administrator and System User, a user or group will be able to perform the tasks in both roles.

  7. Repeat to create assignments for additional users or groups.
To add a user or group to an item role
  1. Start Report Manager and locate the report item for which you want to add a user or group.
  2. Hover over the item, and click the drop-down arrow.
  3. In the drop-down menu, click Security.
  4. Click New Role Assignment.

    Note: If an item currently inherits security from a parent item, click Edit Item Security in the toolbar to change the security settings. Then click New Role Assignment.

  5. In Group or user name, enter a Windows domain user or group account in this format: <domain>\<account>. If you are using forms authentication or custom security, specify the user or group account in the format that is correct for your deployment.
  6. Select one or more role definitions that describe how the user or group should access the item, and then click OK.
  7. Repeat to create assignments for additional users or groups.

Procedure: Grant Users Access to Reports in AX 2012

Configure security settings in Microsoft Dynamics AX
Complete the following tasks in Microsoft Dynamics AX:
• Determine which reports each Microsoft Dynamics AX role should have access to.
• Verify that each Microsoft Dynamics AX role has the correct duties and privileges assigned to it in order to access the reports.
• Assign users to Microsoft Dynamics AX roles.
• Secure the data shown in reports.

Configure security settings in Reporting Services Complete the following tasks in Reporting Services:
• Assign users to the DynamicsAXBrowser role in Reporting Services.
For detailed instructions about how to assign users to Reporting Services roles, refer to my post (How to: Grant User Access to a Report Server).
• Identify the account that is used to run the Application Object Server (AOS) service and the account that is used as the Business Connector proxy. Assign those accounts to the DynamicsAXBrowser role in Reporting Services.
• Restrict access to report folders and reports. Reporting Services includes security features and tools that you should use to help control access to report folders and published reports. Refer to the SQL Server documentation on MSDN for detailed conceptual information and step-by-step tutorials that will help you administer
security in Reporting Services.

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers:

error: Content is protected !!