Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Add Individual BAM Report to aspx Page

  • Last UpdatedJun 10, 2024
  • 3 minute read

In some scenarios there may be a requirement to render an individual report in an aspx page, and also to control some of the characteristics of the report just by specifying the properties of the BAM control.

Features

  • Support for rendering an individual report in an aspx page.

  • Characteristics of the report can be controlled just by specifying the report properties.

  • Security enabled report rendering.
    To enable rendering of individual report in an aspx page, BAM report has been enhanced with some more properties to it. Below are the properties that can be used to render an individual report in an aspx page.

    • IsAnIndividualReport: If this property is set as true, it enables the individual report rendering. Else default configurations will be considered for rendering the report.

    • ReportName: This is the hierarchy of the report in the BAM Control. For example, to render all the executing instances in an aspx page, ReportName property can be set with 'Analyze/Execution/Executing'.

    • ReportID: This is a unique Id for any report. This information will be taken from the database where the report information is stored.
      'ID' column of 'SKBAMMenu' table, this information will be unique.

      Note: If both the properties 'ReportID' and 'ReportName' are set then, 'ReportName' will be considered for rendering the report.

    • Width: Width of the control can be set using this property.

    • Height: Height of the control can be set using this property.

    • Web Part Border: If this property is set as true, it will render the individual reports with border else it will render them without border.

With Border:

Without Border:


  • ReportTitle: Title of the report which will be displayed on the top left corner of the report.

  • ReportDescription: Description for the report which will be displayed next to the report title.


    Scenario
    'XYZ' organization is one of the leading supply chain management companies. 'XYZ' has a web site in which home page needs to be displayed with one of the customized BAM reports.
    The above scenario can be achieved by using Business Activity Monitoring control. By specifying the properties of the BAM control, it is possible to render an individual report in an aspx page.

    Design of the above scenario involves the following steps:
    Step 1: Drag and drop the BAM control to any aspx page
    Step 2: Set the BAM properties
    The following code sample shows how to set the properties of the BAM control to render the report individually.
    Sample ASPX page:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="IndividualBam.aspx.cs" Inherits="IndividualBam" %>

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

    <title></title>

    <style type="text/css">

    html,body,form

    {

    height:100%;

    }

    </style>

    </head>

    <body>

    <form id="form1" runat="server">

    <div style="height:100%;">

    <asp:Panel ID="Panel1" runat="server" Height="100%" Width="100%"></asp:Panel>

    </div>

    </form>

    </body>

    </html>

Sample Code file:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class IndividualBam : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

//Instance of BAM Control

Skelta.Core.ApplicationObject application = new Skelta.Core.ApplicationObject("Telematics Repository");//Repository name

object loggedinUserId = "81734457-B3DB-4BC9-894A-C3149828C65C";

Skelta.Entity.UserContext userContext = new Skelta.Entity.UserContext(loggedinUserId, application, "skeltalist");

Skelta.BAM.UserControls.BAMControl bamControl = new Skelta.BAM.UserControls.BAMControl();

//Application Name

bamControl.ApplicationName = "Telematics Repository";

//UserID

bamControl.UserIdString = userContext.LoggedInUserId;

//BAM ControlId

bamControl.ID = "myBAM1";

//ReportName

bamControl.ReportName = "Workflow Instances";

//ReportId [If ReportName is set, this property will be ignored.]

bamControl.ReportId = "DF2878B5-A97B-478F-BD14-89E591D46BB9";

//To Show as an Individual Report

bamControl.IsAnIndividualReport = true;

//Report Title

bamControl.ReportTitle = "Bar Chart";

//Report Description

bamControl.ReportDescription = "Report to show the information";

//Height

bamControl.Height = Unit.Percentage(100);

//Width

bamControl.Width = Unit.Percentage(100);

//Add the Control to Panel

Panel1.Controls.Add(bamControl);

}

}

Related Links
TitleResults for “How to create a CRG?”Also Available in