report.xts 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" includeConfig="true" requiredCapability="canUseCognosViewerRunWithOptions">
  13. <!-- ======================================================== -->
  14. <!-- Session Management -->
  15. <!-- ======================================================== -->
  16. <!-- Reads session-sensitive info from CM -->
  17. <xts:block processor="XSLT" type="exec" mandatory="false"
  18. id="refreshSession"
  19. path="portal/cc/read_session.xml"
  20. condition=".[
  21. string(/root/cookies/cookie[@name = 'cc_session']) = ''
  22. or /root/env/param[@name='m_reload']
  23. or /root/env/param[@name='m_root'] ]">
  24. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  25. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  26. </xts:block>
  27. <!-- Update the <session> element for this request. -->
  28. <xts:block id="buildSession" path="portal/session.xml" dependency="refreshSession" processor="XSLT" type="exec"
  29. condition=".[
  30. /root/newSession
  31. or /root/env/param[@name='ui']
  32. or /root/env/param[@name='d']
  33. or /root/env/param[starts-with(@name,'m_s_')]
  34. or /root/env/param[@name = 'resetSort'] ]"
  35. mandatory="false"/>
  36. <!-- Save changes to the state info in a cookie -->
  37. <xts:block mode="interpret" processor="XSLT" type="exec"
  38. id="setSession"
  39. path="portal/set_session.xml"
  40. dependency="buildSession getContent"
  41. condition=".[/root/updateSession]"
  42. mandatory="false"/>
  43. <!--
  44. ===============================================================================================
  45. formlogic_init - standard form logic initialization
  46. ===============================================================================================
  47. -->
  48. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  49. <!--
  50. ===============================================================================================
  51. checkParam - change m_name, m_class, m_obj when dealing with shortcut.
  52. ===============================================================================================
  53. -->
  54. <xts:block id="checkParam" path="/portal/ref2target.xml" dependency="formlogic_init buildSession" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[starts-with(@name,'sc_target')]!='']" mandatory="false"/>
  55. <!--
  56. ===============================================================================================
  57. getContent - Main content request
  58. ===============================================================================================
  59. -->
  60. <xts:block id="getContent" processor="XSLT" type="exec" dependency="checkParam">
  61. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  62. <xts:logicsheet path="portal/runWithOptions/logicsheets/request.xslt"/>
  63. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  64. <xsl:stylesheet version="1.0"
  65. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  66. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  67. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  68. xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
  69. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  70. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  71. exclude-result-prefixes="xsl rdr send xtsext cm dt">
  72. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  73. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  74. <xsl:template match="/">
  75. <xts:sequence>
  76. <rdr:Requests>
  77. <rdr:Request type="runnable" mode="report">
  78. <rdr:searchPath>
  79. <xsl:value-of select="key('env-param', 'm_obj')"/>
  80. </rdr:searchPath>
  81. </rdr:Request>
  82. <rdr:Request type="credential"/>
  83. <rdr:Request type="accountOptions" mode="report"/>
  84. </rdr:Requests>
  85. <!-- if we don't have a parameterDescription, then separate the connection/signon prompts
  86. from other prompts. -->
  87. <xsl:if test="not(/root/env/param[@name='parameterDescription'])">
  88. <dt:splitParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*"/>
  89. </xsl:if>
  90. <!-- get a list of installed components and service defaults -->
  91. <xts:append>
  92. <installedComponents>
  93. <xts:function name="getConfiguration">
  94. <xts:param name="installedComponents"/>
  95. </xts:function>
  96. </installedComponents>
  97. <xts:function name="getConfiguration">
  98. <xts:param name="serviceDefaultOptions"/>
  99. <xts:param name="overrideOptions"/>
  100. </xts:function>
  101. </xts:append>
  102. </xts:sequence>
  103. </xsl:template>
  104. </xsl:stylesheet>
  105. </xts:block>
  106. <!--
  107. ===============================================================================================
  108. queryDataSourcePrompts - Get the parameter data source connection/signon information from CM
  109. ===============================================================================================
  110. -->
  111. <xts:block id="queryDataSourcePrompts"
  112. nodeList="/root/credentialParameters"
  113. path="/portal/iPrompting/logicsheets/query-datasource.xslt"
  114. processor="XSLT"
  115. type="exec"
  116. dependency="getContent"
  117. condition=".[/root/credentialParameters]" mandatory="false">
  118. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  119. </xts:block>
  120. <!--
  121. ===============================================================================================
  122. generateDefaults
  123. ===============================================================================================
  124. -->
  125. <xts:block id="generateDefaults" dependency="queryDataSourcePrompts getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='visited_run_with_options'])]" mandatory="false">
  126. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  127. <xts:logicsheet path="logicsheets/portal.xsl"/>
  128. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  129. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  130. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  131. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  132. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  133. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  134. <pf:variables/>
  135. <xsl:template match="/">
  136. <xts:sequence>
  137. <!-- generate the default report options -->
  138. <xts:append select="/root/env">
  139. <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
  140. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  141. <root>
  142. <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
  143. <root>
  144. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*"/>
  145. </root>
  146. </xts:transform>
  147. <defaultOptions>
  148. <xsl:choose>
  149. <xsl:when test="/root/env/param[starts-with(@name,'visited_run_with_options')]">false</xsl:when>
  150. <xsl:otherwise>true</xsl:otherwise>
  151. </xsl:choose>
  152. </defaultOptions>
  153. <preferences>
  154. <xsl:copy-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*"/>
  155. </preferences>
  156. <serviceDefaults>
  157. <xsl:copy-of select="/root/configuration/property[@name='serviceDefaultOptions']/*/value"/>
  158. </serviceDefaults>
  159. <obj>
  160. <xsl:copy-of select="/root/cm:queryResponse/cm:queryReply[1]/*"/>
  161. </obj>
  162. <deliverySection>false</deliverySection>
  163. <basicOptions>true</basicOptions>
  164. <!-- this list of options needs to match the list in the report_advanced.xts morphlet -->
  165. <optionList include="true">
  166. <item>outputFormat</item>
  167. <item>outputLocale</item>
  168. <item>prompt</item>
  169. <item>http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures</item>
  170. </optionList>
  171. </root>
  172. </xts:transform>
  173. </xts:append>
  174. <xts:append select="/root/env">
  175. <!-- encode the parameters -->
  176. <xsl:if test="/root/cm:queryResponse/cm:queryReply[1]/*/cm:parameters/*">
  177. <xsl:variable name="parameters-markup">
  178. <xsl:call-template name="serialize-xml">
  179. <xsl:with-param name="node-set" select="/root/cm:queryResponse/cm:queryReply[1]/*/cm:parameters"/>
  180. </xsl:call-template>
  181. </xsl:variable>
  182. <xts:append select="/root/env">
  183. <param name="m_rp_parameters">
  184. <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
  185. </param>
  186. </xts:append>
  187. </xsl:if>
  188. <!-- do we show the summary page? -->
  189. <param name="showSummary">
  190. <xsl:choose>
  191. <xsl:when test="/root/cm:queryResponse/cm:queryReply[3]/*/options/value/item[name='showOptionSummary']/value">
  192. <xsl:choose>
  193. <xsl:when test="/root/cm:queryResponse/cm:queryReply[3]/*/options/value/item[name='showOptionSummary']/value='true'">
  194. <xsl:value-of select="'y'"/>
  195. </xsl:when>
  196. <xsl:otherwise><xsl:value-of select="'n'"/></xsl:otherwise>
  197. </xsl:choose>
  198. </xsl:when>
  199. <xsl:when test="key('user-param','showOptionSummary')='true'">
  200. <xsl:value-of select="'y'"/>
  201. </xsl:when>
  202. <xsl:when test="key('user-param','showOptionSummary')='false'">
  203. <xsl:value-of select="'n'"/>
  204. </xsl:when>
  205. <xsl:otherwise>
  206. <xsl:value-of select="/root/system/param[@name = 'defaultPortalPreferences']/pref[@name='runoptions']"/>
  207. </xsl:otherwise>
  208. </xsl:choose>
  209. </param>
  210. <xsl:variable name="s" select="concat(' ', key('system-param', 'ui_hide')/CC_RUN_OPTIONS_email_attachment/@show, ' ')"/>
  211. <param name="run_with_options_allowEmailAsAttachment">
  212. <xsl:choose>
  213. <xsl:when test="
  214. not(key('system-param', 'ui_hide')/CC_RUN_OPTIONS_email_attachment)
  215. or
  216. (
  217. key('system-param', 'ui_hide')/CC_RUN_OPTIONS_email_attachment
  218. and
  219. (
  220. (contains($s, 'Administrators') and $hasAdminCapability) or
  221. (contains($s, 'QSUsers') and $hasFullQSCapability) or
  222. (contains($s, 'RSUsers') and $hasFullRSCapability) or
  223. (contains($s, 'Consumers') and $is-named='1') or
  224. (contains($s, 'Anonymous') and $is-named='0') or
  225. (key('system-param', 'ui_groups')/group[contains($s, concat(' ', @id, ' ')) and contains( key('session-param', 'uig'), concat(' ', @id, ' '))])
  226. )
  227. )">
  228. <xsl:text>true</xsl:text>
  229. </xsl:when>
  230. <xsl:otherwise>
  231. <xsl:text>false</xsl:text>
  232. </xsl:otherwise>
  233. </xsl:choose>
  234. </param>
  235. </xts:append>
  236. </xts:sequence>
  237. <!-- generate the prompt description -->
  238. <dt:promptDescription/>
  239. </xsl:template>
  240. <dt:hierarchicalParmValueItem/>
  241. <pf:serialize-xml/>
  242. </xsl:stylesheet>
  243. </xts:block>
  244. <!--
  245. ===============================================================================================
  246. generateDefaultEmailOptions - If no delivery options where save on the object and it's the
  247. first time we hit this page then generate defaults
  248. ===============================================================================================
  249. -->
  250. <xts:block id="generateDefaultEmailOptions" path="/portal/emailOptions/logicsheets/generate_defaults.xslt" processor="XSLT" dependency="generateDefaults" type="exec" condition=".[not(/root/env/param[@name='visited_run_with_options'])]" mandatory="false">
  251. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  252. </xts:block>
  253. <!--
  254. ===============================================================================================
  255. processDefaultEmailOptions - If no delivery options where save on the object and it's the
  256. first time we hit then process the default delivery options.
  257. ===============================================================================================
  258. -->
  259. <xts:block id="processDefaultEmailOptions" path="/portal/emailOptions/logicsheets/process_email_options.xslt" processor="XSLT" dependency="generateDefaultEmailOptions" type="exec" condition=".[not(/root/env/param[@name='visited_run_with_options'])]" mandatory="false">
  260. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  261. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  262. <xts:logicsheet path="logicsheets/portal.xsl"/>
  263. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  264. </xts:block>
  265. <!--
  266. ===============================================================================================
  267. generateDefaultMobileOptions - First time we hit this page, add account information for the user to be used
  268. with the "Send the report to my mobile device" option.
  269. ===============================================================================================
  270. -->
  271. <xts:block id="generateDefaultMobileOptions" path="/portal/mobileOptions/logicsheets/generate_default_mobile_options.xslt" processor="XSLT" dependency="generateDefaults" type="exec" nodelist="queryResponse" condition=".[not(/root/env/param[@name='visited_run_with_options'])]" mandatory="false">
  272. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  273. </xts:block>
  274. <!--
  275. ===============================================================================================
  276. processDefaultMobileOptions - create the mobile options
  277. ===============================================================================================
  278. -->
  279. <xts:block id="processMobileEntries" path="/portal/mobileOptions/logicsheets/process_mobile_entries.xslt" processor="XSLT" dependency="generateDefaultMobileOptions" type="exec" nodelist="morphletResponse,env,selectedEntries,credential" condition=".[not(/root/env/param[@name='visited_run_with_options'])]" mandatory="false">
  280. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  281. </xts:block>
  282. <xts:block id="missingObject" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="format"
  283. condition=".[not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*)]" mandatory="false" path="/portal/missing_object.xml">
  284. <xts:logicsheet path="logicsheets/portal.xsl"/>
  285. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  286. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  287. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  288. </xts:block>
  289. <!--
  290. ===============================================================================================
  291. HTML output
  292. ===============================================================================================
  293. -->
  294. <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency="processDefaultEmailOptions processMobileEntries generateDefaults formlogic_init getContent" mimeType="text/html"
  295. condition=".[/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*]" mandatory="false">
  296. <!-- logicsheets -->
  297. <xts:logicsheet path="portal/runWithOptions/logicsheets/response.xslt"/>
  298. <!-- portal specific information -->
  299. <xts:logicsheet path="logicsheets/portal.xsl"/>
  300. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  301. <!-- Dialog specific logicsheets -->
  302. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  303. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  304. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  305. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  306. <!-- Generic logicsheets -->
  307. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  308. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  309. <!-- apply the form logic -->
  310. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  311. <xts:logicsheet path="logicsheets/validation.xslt"/>
  312. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  313. <xsl:stylesheet version="1.0" exclude-result-prefixes="xts xsl cm pf xtsext lyt dp df cf cp rdb"
  314. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  315. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  316. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb/"
  317. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  318. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  319. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  320. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  321. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  322. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  323. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  324. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  325. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  326. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  327. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/">
  328. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  329. <!-- Global template variables -->
  330. <pf:variables/>
  331. <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[1]/*"/>
  332. <!-- time varibales needed for the calendar control -->
  333. <xsl:variable name="mname" select="'runWithOptions/report.xts'"/>
  334. <xsl:variable name="the-credential" select="/root/cm:queryResponse/cm:queryReply[2]/cm:credential"/>
  335. <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, ' '), ' execute ')"/>
  336. <xsl:variable name="mobileSupported" select="/root/installedComponents/configuration/*/component[.='mobileService'] and not(contains(' powerPlay8Report powerPlay8ReportView ', concat(' ', /root/cm:queryResponse/cm:queryReply[1]/*/cm:objectClass,' ')))"/>
  337. <xsl:variable name="the-objectClass" select="/root/cm:queryResponse/cm:queryReply[1]/*/cm:objectClass"/>
  338. <xsl:variable name="isInteractiveReportObject" select="$the-objectClass = 'interactiveReport' or ($the-objectClass = 'reportView' and /root/cm:queryResponse/cm:queryReply[1]/*/cm:base/*/cm:objectClass = 'interactiveReport')"/>
  339. <!-- start the output -->
  340. <xsl:template match="/root">
  341. <xsl:variable name="browserTitle">
  342. <rdb:pageTitle/>
  343. </xsl:variable>
  344. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  345. <dp:meta>
  346. <pf:meta/> <!-- Standard meta tags -->
  347. </dp:meta>
  348. <dp:script>
  349. <pf:help context="HID_RUN_OPTIONS"/> <!-- Help system -->
  350. <script language="javascript" src="{$webcontent}/{$app}/js/runOptions.js"/>
  351. <script language="javascript" src="{$webcontent}/{$app}/js/runWithOptions.js"/>
  352. <script language="javascript" src="{$webcontent}/../cognoslaunch.js"/>
  353. <script language="javascript">
  354. <!-- include the javascript need to run the report -->
  355. <rdb:interactiveJavaScript/>
  356. function validate() {
  357. var frm = document.pform;
  358. <!-- if print is selected but no printer is chosen -->
  359. if ( ((frm.delivery[1] &amp;&amp; frm.delivery[1].value == 'print' &amp;&amp; frm.delivery[1].checked) || (frm.delivery[2] &amp;&amp; frm.delivery[2].value == 'print' &amp;&amp; frm.delivery[2].checked)) &amp;&amp; frm.select_printerAddress.value == '') {
  360. alert("<xts:string id="IDS_OTHERRUN_ERR_NO_PRINTER" encode="javascript"/>");
  361. g_okCounter = 0;
  362. return false;
  363. }
  364. <!-- make sure the user doesn't send two run requests -->
  365. if (!onClickOK('<xts:string id="IDS_OTHERRUN_REQUEST_SUBMITTED" encode="javascript"><xts:param name="objName"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'm_name')))"/></xts:param></xts:string>')) {
  366. return false;
  367. }
  368. return true;
  369. }
  370. </script>
  371. </dp:script>
  372. <!-- main form. Used when going to the advanced run with options dialog -->
  373. <utml:form name="pform" method="post" action="{$gateway}">
  374. <utml:exclusion-list><xsl:value-of select="' m_ro_saveOutput m_ro_print m_ro_email m_ro_mobile '"/></utml:exclusion-list>
  375. <utml:read-only>false</utml:read-only>
  376. <utml:input type="hidden" name="ifrmcmd" value='execute' utml:update="false"/>
  377. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  378. <utml:input type="hidden" name="visited_run_with_options" value="true" utml:update="false"/>
  379. <!-- if the user doesn't have a credentail then add the h_CAM_action to create one -->
  380. <rdb:checkCredential/>
  381. <!-- header -->
  382. <dp:header>
  383. <dp:title>
  384. <xsl:copy-of select="$browserTitle"/>
  385. </dp:title>
  386. <dp:description>
  387. <xts:string id="IDS_OTHERRUN_BASIC_INTRO"/>
  388. </dp:description>
  389. </dp:header>
  390. <!-- body -->
  391. <lyt:layout style="2">
  392. <!-- format -->
  393. <lyt:section>
  394. <ut:formatSelectList/>
  395. </lyt:section>
  396. <lyt:section>
  397. <dp:choice>
  398. <dp:section1 wrap="wrap">
  399. <img height="30" width="30">
  400. <xsl:attribute name="alt"><xts:string id="IDS_ICON_TIP"/></xsl:attribute>
  401. <xsl:attribute name="src"><xsl:value-of select="$skin_images"/>tip_template.gif</xsl:attribute>
  402. </img>
  403. </dp:section1>
  404. <dp:section2 wrap="wrap">
  405. <xsl:variable name="link">
  406. <a href="javascript:advancedOptions()">
  407. <xsl:text><xts:string id="IDS_OTHERRUN_ADVANCED_OPTIONS"/></xsl:text>
  408. </a>
  409. </xsl:variable>
  410. <xts:string id="IDS_OTHERRUN_ADVANCED_OPTIONS_TEXT">
  411. <xts:param name="link"><xsl:copy-of select="$link"/></xts:param>
  412. </xts:string>
  413. </dp:section2>
  414. </dp:choice>
  415. </lyt:section>
  416. </lyt:layout>
  417. <!-- a11y -->
  418. <lyt:layout style="1">
  419. <lyt:section>
  420. <ut:a11yOption/>
  421. </lyt:section>
  422. </lyt:layout>
  423. <!-- language -->
  424. <lyt:layout style="1">
  425. <lyt:section>
  426. <ut:localeSelectList/>
  427. </lyt:section>
  428. </lyt:layout>
  429. <lyt:layout style="1">
  430. <lyt:section>
  431. <xsl:call-template name="delivery">
  432. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  433. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  434. </xsl:call-template>
  435. </lyt:section>
  436. </lyt:layout>
  437. <!-- prompts -->
  438. <lyt:layout style="1">
  439. <lyt:section>
  440. <ut:prompt/>
  441. </lyt:section>
  442. </lyt:layout>
  443. <!-- footer -->
  444. <dp:footer>
  445. <df:button df:id="IDS_OTHERRUN_RUN" df:style="href" df:href="javascript:runReport();"/>
  446. <xsl:choose>
  447. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  448. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  449. </xsl:when>
  450. <xsl:otherwise>
  451. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  452. </xsl:otherwise>
  453. </xsl:choose>
  454. </dp:footer>
  455. </utml:form>
  456. </dp:page>
  457. </xsl:template>
  458. <ut:promptTemplate showLinks="false"/>
  459. <xsl:template name="delivery">
  460. <xsl:param name="form-read-only"/>
  461. <xsl:param name="utml-form-name"/>
  462. <dp:choice title="IDS_OTHERRUN_DELIVERY" id="delivery_radioGroup">
  463. <utml:radio-group name="delivery">
  464. <utml:default-value>view</utml:default-value>
  465. <!-- view the report -->
  466. <dp:section1>
  467. <utml:input type="radio" value="view" onclick="clearPrinterField()" id="ctrl_delivery_view"/>
  468. </dp:section1>
  469. <dp:section2 for="ctrl_delivery_view"><xts:string id="IDS_OTHERRUN_BASIC_DELIVERY_VIEW"/></dp:section2>
  470. <!-- save the report -->
  471. <xsl:if test="contains(concat(' ', /root/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, ' '), ' write ') and contains(concat(' ', /root/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, ' '), ' traverse ')">
  472. <dp:section1>
  473. <utml:input type="radio" value="save" onclick="clearPrinterField()" id="ctrl_delivery_save"/>
  474. </dp:section1>
  475. <dp:section2 for="ctrl_delivery_save"><xts:string id="IDS_OTHERRUN_BASIC_DELIVERY_SAVE"/></dp:section2>
  476. </xsl:if>
  477. <xsl:if test="not($isInteractiveReportObject)">
  478. <!-- print the report -->
  479. <dp:section1>
  480. <utml:input type="radio" value="print" id="ctrl_delivery_print"/>
  481. </dp:section1>
  482. <dp:section2 for="ctrl_delivery_print"><xts:string id="IDS_OTHERRUN_BASIC_PRINT_REPORT"/></dp:section2>
  483. <dp:section3>
  484. <!-- variable needed by ut:printer -->
  485. <xsl:variable name="print_checked" select="true()"/>
  486. <ut:printer/>
  487. </dp:section3>
  488. </xsl:if>
  489. <!-- email -->
  490. <xsl:variable name="userHasEmailAddress" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][3]/*/*[local-name()='email']!=''"/>
  491. <xsl:variable name="userIsAnonymousUser" select="key('session-param','e_hp')!='' and key('session-param','e_hp')='CAMID(&quot;::Anonymous&quot;)'"/>
  492. <xsl:if test="$userHasEmailAddress and not($userIsAnonymousUser) and key('env-param','run_with_options_allowEmailAsAttachment')='true'">
  493. <dp:section1>
  494. <utml:input type="radio" value="email" onclick="clearPrinterField()" id="ctrl_delivery_email"/>
  495. </dp:section1>
  496. <dp:section2 for="ctrl_delivery_email"><xts:string id="IDS_OTHERRUN_BASIC_DELIVERY_EMAIL"/></dp:section2>
  497. </xsl:if>
  498. <!-- only display if mobile services are installed and a user has the mobile capability-->
  499. <xsl:if test="$mobileSupported and $userCanUseMobileService">
  500. <!-- mobile -->
  501. <dp:section1>
  502. <utml:input type="radio" value="mobile" onclick="clearPrinterField()" id="ctrl_delivery_mobile"/>
  503. </dp:section1>
  504. <dp:section2 for="ctrl_delivery_mobile"><xts:string id="IDS_OTHERRUN_BASIC_DELIVERY_MOBILE"/></dp:section2>
  505. </xsl:if>
  506. </utml:radio-group>
  507. </dp:choice>
  508. </xsl:template>
  509. </xsl:stylesheet>
  510. </xts:block>
  511. <!--
  512. ===============================================================================================
  513. debug - display debug information
  514. ===============================================================================================
  515. -->
  516. <xts:block id="debug" dependency="format missingObject" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  517. <!-- get the debug logic sheet -->
  518. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  519. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  520. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  521. <xsl:template match="/">
  522. <dbg:dumpxml select="/root"/>
  523. </xsl:template>
  524. </xsl:stylesheet>
  525. </xts:block>
  526. </xts:morphlet>