How to create A1PE SQLPlus Report that has links to launch tags
Download as pdf :
Products:
Aspen InfoPlus.21
Last Updated:
02-May-2023
Last Updated:
02-May-2023
Versions:
Article ID:
000100995
Article ID:
000100995
Primary Subject:
Problem Statement
This KB explains how to create AspenOne Process Explorer SQLPlus report that has links to launch tags on the list.
Solution
Step1:
Create a procedure def record that contains the information for the table.
Here is an small example with tagname and description, where the tag name is built to be a link.
Done in a procedure so that we can build a temp table and then select the results from the temp table.
Procedure name and arguments can be whatever you want.
The purpose of the procedure is to show how a link can be created for a SQLplus report where the result is HTML.
PROCEDURE GetReportFormat( hostName char(30), dataSource char(30), queryString char(30))
LOCAL tempName;
SET LOG_ROWS = 0;
DECLARE LOCAL TEMPORARY TABLE MODULE.TEMP(Name CHAR(256), Description CHAR(32));
FOR (SELECT name AS Name, IP_DESCRIPTION AS Description FROM IP_AnalogDef WHERE name LIKE queryString ) DO
tempName = '<a target=_blank href=
http://' || hostName || '/ProcessExplorer/aspenONE.html?ProcessExplorer?nav=true&&src=' || dataSource || '&&tag=' || name || '
/>' || name;
INSERT INTO MODULE.TEMP values (tempName, description );
END;
SELECT * FROM MODULE.TEMP;
END;
Step 2:
Create a SQLplus report that queries the Procedure record.
Add a "SQLlus Script Section" to a report.
Add the query.
select * from GetReportFormat('Host Name','ADSA Data Source','ATC%')
Set "Returns" to HTML
Step 3:
Generate the report
As you can see the link shows up when you hover over one of the tags.
Keywords
SQLPlus report
Links