Cognos Direct URL Usage - Northwestern University
Download
Report
Transcript Cognos Direct URL Usage - Northwestern University
Cognos Direct URL Usage
Business Intelligence
Using URLs
Cognos 8 can be utilized directly with
parameterized URLs.
These URLs can send users directly to an object.
– View an archived report
– Run a report
Passing prompts
Specifying output
– View a specific page in the Cognos portal
– Open a studio
Users must still authenticate or already be
authenticated
View an Archived Report
The first use of a parameterized URL is to view a
previously run report archive.
This is useful for example if you have financial
reports that explain details behind a line in a
statement.
Embed the URL in the number and have it send the
user directly to the detail report that was run
previously.
The user never has to wait for a report, but can
have an explanation show up immediately to
describe what they are seeing.
Archive Report Search Path
To view a save report,
find the report object
with an archive.
Open the properties for the object, then click on View the search path, ID and URL
Copy the Search path and append it to the URL fragment:
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&ui.tool=
CognosViewer&ui.action=view&ui.object=defaultOutput(enter
search path)
Archive Report URL
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&ui.tool=CognosViewer&ui.action=view&ui.object=d
efaultOutput(CAMID("CognosLDAP:u:authid=3179095188")/folder[@name='My
Folders']/report[@name='Logon operations by time stamp'])
Run a Report
This technique allows a user to execute a report
from a URL link.
This can be useful if a user is in another portal and
wants to view a report that may describe some
information in this 3rd party portal.
This URL can specify what report to execute, any
prompts to pass through, and what format to return
the report.
Report Search Path
Just as in the
Archive, the search
path needs to be
obtained. This is the
same report, so the
path is the same.
Open the properties
for the object, then
click on View the
search path, ID and
URL
Copy the Search path and append it to the URL fragment:
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&&ui.tool
=CognosViewer&ui.object=enter search path &ui.action=run
Report URL
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&&ui.tool=CognosViewer&ui.object=CAMID("Cogno
sLDAP:u:authid=3179095188")/folder[@name='My Folders']/report[@name='Logon operations by time
stamp']&ui.action=run
This is the result after running the report URL above. It did run the report, but this is a prompted report.
Next, let’s add the prompts so that the user goes directly to the report.
Add Prompt Parameter to URL
The report URL does run the report, but returns the
prompt page.
Add &p_prompt name=prompt value
Multiple prompts can be added using the above
format
Finally, append &run.prompt=false to the end of the
URL to keep the prompt page from displaying.
Report URL with Prompt
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&&ui.tool=CognosViewer&ui.object=CAMID("Cogno
sLDAP:u:authid=3179095188")/folder[@name='My Folders']/report[@name='Logon operations by time
stamp']&ui.action=run&p_Logon Time=2009-04-21T00:00:00&p_End Date=2009-0421T23:59:59&run.prompt=false
&p_Logon Time=2009-04-21T00:00:00
&p_End Date=2009-04-21T23:59:59
These two items are the two prompts that the
report uses.
&run.prompt=false
This command suppresses the prompt page from
generating.
Finally, this run defaults the report output to HTML, let’s now
generate the PDF output of this report.
Report Output Format
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&&ui.tool=CognosViewer&ui.object=CAMID("Cogno
sLDAP:u:authid=3179095188")/folder[@name='My Folders']/report[@name='Logon operations by time
stamp']&ui.action=run&p_Logon Time=2009-04-21T00:00:00&p_End Date=2009-0421T23:59:59&run.prompt=false &run.outputFormat=PDF
&run.outputFormat=PDF &run.outputFormat=PDF
This command specifies the
output type, in this case PDF.
Outputs can be:
CVS
PDF
MHT
singleXLS
XLS
HTML
View a Specific Page
As well as showing reports and report outputs, the
URL can directly send a user to a specific page.
This would be useful if there is a specific portal
page designed for an application.
This is also useful for sending a manager directly to
a dashboard page, or embedding the dashboard in
a 3rd party portal.
Portal Page URL
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_page=iF96291F35CF9474EB0E12BD60937DC9F
This URL sends the user directly to a
page, in this case an audit dashboard.
This could be embedded in another
portal to show the basic gauges to a
user without going to Cognos directly.
This URL needs the ID of the page
object to display. The ID can either be
copied from the URL when going to
the page, or again by going to the
properties of the page and getting the
ID there.
Analysis Studio URL
A URL can also be used to directly send a user to a
studio.
This would be a good way to send a user directly
into analysis studio to look at the data for their
department.
A user can be sent directly to query studio for ad
hoc capabilities. The URL can point to either a
package or a query studio report to use.
Analysis Studio URLs
Open Analysis Studio - https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&ui.gateway=/cgibin/cognosisapi.dll&ui.tool=AnalysisStudio&ui.object=/content&ui.action=new
– Add the &ui.action command and set it to New to specify a new analysis. If you don’t use New it
will return an error.
Open Analysis Studio to a package - https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&ui.gateway=/cgibin/cognosisapi.dll&ui.tool=AnalysisStudio&ui.object=/content/package[@name='Granite
Cube']&ui.action=new
– Add the search path for the package object to open.
– Make sure the ui.action command is set to New to specify a new analysis . If you don’t use New it
will return an error.
Open Analysis Studio to an analysis report - https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&ui.gateway=/cgibin/cognosisapi.dll&ui.tool=AnalysisStudio&ui.object=/content/folder[@name='CCM Cost Accounting
Drill Through']/analysis[@name='Cost Tracking Drill Through for Expense Class by Location
Analysis']&ui.action=edit
– Add the search path for the analysis object to open.
– Make sure the ui.action command is set to Edit to specify editing the current analysis. If you use
New, it will proceed just like opening a new analysis object.
Hiding Headers and Toolbars
There may be times when calling a Cognos URL,
the user does not need to see the headers and
toolbars.
With specific calls in the URL, the headers and
toolbars can be removed.
This can be especially useful when displaying a
Cognos portlet in another portal.
Hiding Objects
The list of headers
that can be
hidden: h1, h2, h3,
h4
The list of menus
that can be
hidden: m1, m2,
m3, m4
The list of titles that can be hidden: t1, t2, t3, t4
Append the &ui=List of objects to hide, to the end of a Cognos Connection or Cognos Viewer URL.
When hiding objects, h1 is the same as m1 and
t1, so &ui=h1 would result in the same as
&u1=tim1.
The URL to show the dashboard portal page without any headers would be:
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_page=iF96291F35CF9474EB0E12BD60937DC
9F&ui=h1h2h3h4
Hiding Objects Examples
This page has had h1h2h3h4 removed.
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&
m_page=iF96291F35CF9474EB0E12BD60937DC9F&
ui=h1h2h3h4
This page has had t3m4 removed.
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&
m_page=iF96291F35CF9474EB0E12BD60937DC9F&
ui=t3m4
Dissect URL
https://reportingdev.northwestern.edu/cgibin/cognosisapi.dll?b_action=xts.run&m=portal/launch.xts&&ui.tool=CognosViewer
– This section of the URL request a call to the Cognos Dev portal and to launch the Cognos Viewer
tool that is used to view reports, either saved outputs or active report runs.
&ui.object=CAMID("CognosLDAP:u:authid=3179095188")/folder[@name='My
Folders']/report[@name='Logon operations by time stamp']
– This command in the URL tells Cognos what object to run, this is obtained from the search path of
the object.
&ui.action=run
– This command tells Cognos what action to do on the object with the Cognos Viewer tool.
&p_Logon Time=2009-04-21T00:00:00
– This passes the value to the prompt “Logon Time” in the report.
&p_End Date=2009-04-21T23:59:59
– This passed the value to the prompt “End Date” in the report.
&run.prompt=false
– This command tells Cognos Viewer to not render the prompt page to the user. For this to work, the
required prompts must be answered in the URL.
&run.outputFormat=PDF
– This command tells Cognos Viewer to render the output in PDF.
&ui=h1h2h3h4
– This command removes all the headers from the Cognos Viewer