report_advanced.xts 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194
  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" resolverBase="prompting" includeConfig="true" requiredCapability="canUseCognosViewerRunWithOptions">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init - standard form logic initialization
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <!--
  20. ===============================================================================================
  21. checkParam - change m_name, m_class, m_obj when dealing with shortcut.
  22. ===============================================================================================
  23. -->
  24. <xts:block id="checkParam" path="/portal/ref2target.xml" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[starts-with(@name,'sc_target')]!='']" mandatory="false"/>
  25. <!--
  26. ===============================================================================================
  27. cleanEnv - if it's the first time we hit the page then remove all the empty runOptions from the previous page
  28. ===============================================================================================
  29. -->
  30. <xts:block id="cleanEnv" processor="XSLT" type="exec" dependency="processMobileEntries processResponse checkParam callMorphlet" condition=".[not(/root/env/param[@name = 'visited_run_with_options_advanced'])]" mandatory="false">
  31. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  32. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  33. <xsl:template match="/">
  34. <xts:sequence>
  35. <!-- remove all the empty env params -->
  36. <xts:delete select="/root/env/*[.='']"/>
  37. <!-- append the mobileDescription the first time we hit the page -->
  38. <xts:delete select="/root/env/param[@name='mobileDescription']"/>
  39. <xts:append select="/root/env">
  40. <param name="mobileDescription"><xts:string id="IDS_OTHERRUN_MOBILE_NO_RECIPIENTS"/></param>
  41. </xts:append>
  42. </xts:sequence>
  43. </xsl:template>
  44. </xsl:stylesheet>
  45. </xts:block>
  46. <!--
  47. ===============================================================================================
  48. callMorphlet - Calls the appropriate morphlet using the passed in params which will return
  49. markup to be displayed or the expected results
  50. ===============================================================================================
  51. -->
  52. <xts:block id="callMorphlet" processor="XSLT" dependency="formlogic_init" type="exec" condition=".[ /root/env/param[@name='controller_state'] != '' ]" mandatory="false">
  53. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  54. <xts:logicsheet path="logicsheets/portal.xsl"/>
  55. <xsl:stylesheet version="1.0"
  56. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  57. xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
  58. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  59. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  60. xmlns:req-params="http://developer.cognos.com/schemas/request/params"
  61. exclude-result-prefixes="xsl dlgctrl xtsext req-params">
  62. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  63. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  64. <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
  65. <pf:variables/>
  66. <xsl:template match="/">
  67. <xts:sequence>
  68. <xsl:choose>
  69. <!-- call email options morphlet for email options -->
  70. <xsl:when test="starts-with(/root/env/param[@name='controller_state'],'email')">
  71. <dlgctrl:XTS2Request>
  72. <dlgctrl:target>/portal/emailOptions/email_options.xts</dlgctrl:target>
  73. <dlgctrl:stackName>other_run_options_advanced</dlgctrl:stackName>
  74. <req-params:param name="options"><xsl:value-of select="key('env-param','deliveryOptions')"/></req-params:param>
  75. <req-params:param name="titlePrefix"><xts:string id="IDS_EMAIL_OPTIONS_TITLE_PREFIX"/></req-params:param>
  76. <req-params:param name="titlePostfix">
  77. <xsl:value-of select="xtsext:enforceBTD(key('env-param','m_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  78. </req-params:param>
  79. <req-params:param name="defaultTarget"><xsl:value-of select="key('env-param','m')"/></req-params:param>
  80. <req-params:param name="burst"><xsl:value-of select="key('env-param','m_ro_burst')"/></req-params:param>
  81. <req-params:param name="usePowerPlay8Options"><xsl:value-of select="contains(' powerPlay8Report powerPlay8ReportView ', concat(' ', key('env-param', 'm_class'),' '))"/></req-params:param>
  82. </dlgctrl:XTS2Request>1
  83. </xsl:when>
  84. <!-- call add entries morphlet for mobile recipients -->
  85. <xsl:otherwise>
  86. <dlgctrl:XTS2Request>
  87. <dlgctrl:target>/portal/addEntries/add_entries.xts</dlgctrl:target>
  88. <dlgctrl:stackName>other_run_options_advanced</dlgctrl:stackName>
  89. <req-params:param name="defaultTarget"><xsl:value-of select="key('env-param','m')"/></req-params:param>
  90. <req-params:param name="titlePostfix"><xsl:value-of select="key('env-param','m_name')"/></req-params:param>
  91. <req-params:param name="defaultSearchPath">/directory</req-params:param>
  92. <req-params:param name="showUsers">true</req-params:param>
  93. <req-params:param name="withCC">false</req-params:param>
  94. <req-params:param name="addEntriesUI"><xsl:value-of select="'recipients'"/></req-params:param>
  95. <req-params:param name="returnProperties">
  96. <req-params:property name="userName"/>
  97. </req-params:param>
  98. </dlgctrl:XTS2Request>
  99. </xsl:otherwise>
  100. </xsl:choose>
  101. </xts:sequence>
  102. </xsl:template>
  103. </xsl:stylesheet>
  104. </xts:block>
  105. <!--
  106. ===============================================================================================
  107. processReponse - Process the response from the callMorphlet block and either displays
  108. the markup or processes the results
  109. ===============================================================================================
  110. -->
  111. <xts:block id="processResponse" path="/portal/emailOptions/logicsheets/process_email_options.xslt" processor="XSLT" dependency="callMorphlet" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'email')]" mandatory="false">
  112. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  113. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  114. <xts:logicsheet path="logicsheets/portal.xsl"/>
  115. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  116. </xts:block>
  117. <!--
  118. ===============================================================================================
  119. getAddEntriesReponse - Get the response from the addEntries callMorphlet block
  120. ===============================================================================================
  121. -->
  122. <xts:block id="getAddEntriesResponse" path="/portal/mobileOptions/logicsheets/get_add_entries_response.xslt" processor="XSLT" dependency="callMorphlet" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'mobile')]" mandatory="false">
  123. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  124. <xts:logicsheet path="logicsheets/portal.xsl"/>
  125. </xts:block>
  126. <!--
  127. ===============================================================================================
  128. processMobileEntries - Process the response from the addEntries callMorphlet block and processes the results
  129. ===============================================================================================
  130. -->
  131. <xts:block id="processMobileEntries" path="/portal/mobileOptions/logicsheets/process_mobile_entries.xslt" processor="XSLT" dependency="getAddEntriesResponse" type="exec" mandatory="false">
  132. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  133. <xts:logicsheet path="logicsheets/portal.xsl"/>
  134. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  135. </xts:block>
  136. <!--
  137. ===============================================================================================
  138. Main content request
  139. ===============================================================================================
  140. -->
  141. <xts:block id="getContent" processor="XSLT" type="exec" dependency="cleanEnv processResponse processMobileEntries" condition=".[ not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='' ]" mandatory="false">
  142. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  143. <xts:logicsheet path="portal/runWithOptions/logicsheets/request.xslt"/>
  144. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  145. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  146. <xsl:stylesheet version="1.0"
  147. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  148. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  149. xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
  150. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  151. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  152. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  153. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  154. exclude-result-prefixes="xsl rdr send xtsext cm cml dt">
  155. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  156. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  157. <cml:object-predicates/>
  158. <xsl:template match="/">
  159. <xsl:variable name="runOnce" select="not(key('env-param','visited_run_with_options_advanced')) and not(key('env-param','visited_run_with_options'))"/>
  160. <xts:sequence>
  161. <rdr:Requests>
  162. <rdr:Request type="pageDefinition"/>
  163. <rdr:Request type="runnable" mode="reportAdvanced">
  164. <rdr:searchPath>
  165. <xsl:value-of select="key('env-param', 'm_obj')"/>
  166. </rdr:searchPath>
  167. </rdr:Request>
  168. <rdr:Request type="credential"/>
  169. <rdr:Request type="burstCapability"/>
  170. <xsl:if test="key('env-param','m_ro_saveAsPath')!='' and (key('env-param','visited_save_as')='true' or not(/root/env/param[@name='visited_run_with_options_advanced']))">
  171. <cm:query>
  172. <cm:search><xsl:value-of select="key('env-param','m_ro_saveAsPath')"/></cm:search>
  173. <cm:properties>
  174. <cm:property name="ancestors"/>
  175. <cm:property name="defaultName"/>
  176. </cm:properties>
  177. </cm:query>
  178. </xsl:if>
  179. <!-- only query for the schedule if we're doing a run once. If we didn't visit the basic run with options dialog then we must have come from the tool -->
  180. <xsl:if test="$runOnce">
  181. <rdr:Request type="accountOptions"/>
  182. <rdr:Request type="schedule" mode="reportAdvanced">
  183. <rdr:searchPath>
  184. <xsl:value-of select="concat(key('env-param','m_obj'),'/schedule[permission(&quot;read&quot;)]')"/>
  185. </rdr:searchPath>
  186. </rdr:Request>
  187. </xsl:if>
  188. <!-- need to get all the archiveLocations -->
  189. <cm:query>
  190. <cm:search>
  191. <xsl:text>/configuration/archiveLocation[permission(&quot;execute&quot;)]</xsl:text>
  192. </cm:search>
  193. <cm:properties>
  194. <cm:property name="searchPath"/>
  195. <cm:property name="defaultName"/>
  196. </cm:properties>
  197. <cm:sortBy>
  198. <cm:sort name="defaultName" order="ascending"/>
  199. </cm:sortBy>
  200. </cm:query>
  201. </rdr:Requests>
  202. <!-- if we're doing a run once and it's the first time we hit the page, then prepare cm queries to get the delivery options information -->
  203. <xsl:if test="$runOnce">
  204. <xts:append>
  205. <deliveryOptionsQueries>
  206. <xts:transform src="transforms/portal/options/generateCMQueriesForDeliveryInfo.xslt" processor="XSLT">
  207. <root>
  208. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply' and position()='6']"/>
  209. </root>
  210. </xts:transform>
  211. </deliveryOptionsQueries>
  212. </xts:append>
  213. <!-- if we don't have a parameterDescription, then separate the connection/signon prompts from other prompts. -->
  214. <xsl:if test="not(/root/env/param[@name='parameterDescription'])">
  215. <dt:splitParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']"/>
  216. <!-- prepare the parameters off the runnable in case there aren't any on the schedule -->
  217. <dt:splitRunnableParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
  218. </xsl:if>
  219. </xsl:if>
  220. </xts:sequence>
  221. <!-- get a list of installed components -->
  222. <xts:sequence>
  223. <xts:append>
  224. <installedComponents>
  225. <xts:function name="getConfiguration">
  226. <xts:param name="installedComponents"/>
  227. </xts:function>
  228. </installedComponents>
  229. <xts:function name="getConfiguration">
  230. <xts:param name="serviceDefaultOptions"/>
  231. <xts:param name="overrideOptions"/>
  232. </xts:function>
  233. </xts:append>
  234. </xts:sequence>
  235. <!-- if we have a language blob, then unpack it -->
  236. <xsl:if test="key('env-param','selected_languages')">
  237. <xts:sequence>
  238. <xts:append>
  239. <xsl:value-of select="xtsext:xmldecode( string( /root/env/param[@name = 'selected_languages'] ) )" disable-output-escaping="yes"/>
  240. </xts:append>
  241. </xts:sequence>
  242. </xsl:if>
  243. </xsl:template>
  244. </xsl:stylesheet>
  245. </xts:block>
  246. <!--
  247. ===============================================================================================
  248. queryDataSourcePrompts - Get the parameter data source connection/signon information from CM
  249. ===============================================================================================
  250. -->
  251. <xts:block id="queryDataSourcePrompts"
  252. nodeList="credentialParameters,runnableParameters"
  253. path="/portal/iPrompting/logicsheets/query-datasource.xslt"
  254. processor="XSLT"
  255. type="exec"
  256. dependency="getContent"
  257. condition=".[/root/credentialParameters or /root/runnableParameters/credentialParameters]"
  258. mandatory="false">
  259. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  260. </xts:block>
  261. <!--
  262. ===============================================================================================
  263. queryReportBaseMetadata:
  264. Query CM the metadataModelPackage information for the base report. This block only runs for reportViews.
  265. ===============================================================================================
  266. -->
  267. <xts:block id="queryReportBaseMetadata" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[ (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and contains(' reportView powerPlay8ReportView ', concat(' ', /root/env/param[@name='m_class'], ' '))]" mandatory="false">
  268. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  269. <xsl:stylesheet version="1.0"
  270. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  271. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  272. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  273. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  274. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  275. <xsl:template match="/">
  276. <xts:sequence>
  277. <xts:append>
  278. <reportBaseMetadata>
  279. <xsl:variable name="packageSearchPath" select="/root/cm:queryResponse/cm:queryReply[2]/*/cm:base/*/cm:metadataModelPackage/cm:package/cm:searchPath"/>
  280. <xsl:if test="$packageSearchPath != ''">
  281. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  282. <send:request provider="cm">
  283. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  284. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  285. <cm:requests>
  286. <cm:query>
  287. <cm:search>
  288. <!-- metadataModelPackage for the base report -->
  289. <xsl:value-of select="$packageSearchPath"/>
  290. </cm:search>
  291. <cm:properties>
  292. <cm:property name="effectiveUserCapabilities"/>
  293. </cm:properties>
  294. </cm:query>
  295. </cm:requests>
  296. </cm:query>
  297. </xts:transform>
  298. </send:request>
  299. </xts:transform>
  300. </xsl:if>
  301. </reportBaseMetadata>
  302. </xts:append>
  303. </xts:sequence>
  304. </xsl:template>
  305. </xsl:stylesheet>
  306. </xts:block>
  307. <!--
  308. ===============================================================================================
  309. queryDeliveryOptionsInfo:
  310. Query CM for the necessary information to build the delivery options summaries
  311. ===============================================================================================
  312. -->
  313. <xts:block id="queryDeliveryOptionsInfo" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='visited_run_with_options']) and not(/root/env/param[@name='visited_run_with_options_advanced']) and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
  314. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  315. <xsl:stylesheet version="1.0"
  316. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  317. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  318. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  319. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  320. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  321. <xsl:template match="/">
  322. <xts:sequence>
  323. <xts:append>
  324. <deliveryOptionsInfo>
  325. <xsl:if test="/root/deliveryOptionsQueries/*[local-name()='query']">
  326. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  327. <send:request provider="cm">
  328. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  329. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  330. <cm:requests>
  331. <xsl:copy-of select="/root/deliveryOptionsQueries/*[local-name()='query']"/>
  332. </cm:requests>
  333. </cm:query>
  334. </xts:transform>
  335. </send:request>
  336. </xts:transform>
  337. </xsl:if>
  338. </deliveryOptionsInfo>
  339. </xts:append>
  340. </xts:sequence>
  341. </xsl:template>
  342. </xsl:stylesheet>
  343. </xts:block>
  344. <!--
  345. ===============================================================================================
  346. generateDefaults
  347. ===============================================================================================
  348. -->
  349. <xts:block id="generateDefaults" dependency="queryDataSourcePrompts queryDeliveryOptionsInfo queryReportBaseMetadata getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='p_runTime']) and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
  350. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  351. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  352. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  353. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  354. <xts:logicsheet path="logicsheets/portal.xsl"/>
  355. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  356. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  357. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  358. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  359. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  360. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  361. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  362. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  363. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  364. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  365. xmlns:set="http://exslt.org/sets"
  366. exclude-result-prefixes="cf xtsext xts cm cp pf dt send xsi set">
  367. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  368. <pf:variables/>
  369. <xsl:template match="/">
  370. <xts:sequence>
  371. <!-- doing a run once -->
  372. <xsl:choose>
  373. <xsl:when test="not(/root/env/param[@name='visited_run_with_options'])">
  374. <xsl:if test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']">
  375. <xts:append>
  376. <extractedOptions>
  377. <xts:transform src="transforms/portal/options/extractEmailOptions.xslt" processor="XSLT">
  378. <xsl:copy-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']"/>
  379. </xts:transform>
  380. </extractedOptions>
  381. </xts:append>
  382. <!-- Delete the old emailAsAttachment and emailAsURL to avoid duplicates in /root/env.-->
  383. <xts:delete select="/root/env/param[@name='emailAsAttachment' or @name='emailAsURL']"/>
  384. <!-- we need these values later -->
  385. <xts:append select="/root/env">
  386. <param name="m_ro_emailAsAttachment">
  387. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item'][name='emailAsAttachment']/*[local-name()='value']"/>
  388. </param>
  389. <param name="m_ro_emailAsURL">
  390. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item'][name='emailAsURL']/*[local-name()='value']"/>
  391. </param>
  392. </xts:append>
  393. <!-- Delete the old mobileDescription and mobileSummary to avoid duplicates in /root/env. generateUIHelpersFromOptions will always generate the correct entries -->
  394. <xts:delete select="/root/env/param[@name='mobileDescription' or @name='mobileSummary']"/>
  395. <xts:append select="/root/env">
  396. <!-- web64encode the email options so they can be passed to the email options dialog -->
  397. <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
  398. <param name="deliveryOptions">
  399. <passport><xsl:value-of select="$passport"/></passport>
  400. <markup>
  401. <xts:transform name="XMLEncode">
  402. <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
  403. <root>
  404. <xts:queryNode select="/root/extractedOptions/emailOptions/*"/>
  405. </root>
  406. </xts:transform>
  407. </xts:transform>
  408. </markup>
  409. </param>
  410. </xts:transform>
  411. <!-- mobile options -->
  412. <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
  413. <param name="mobileOptions">
  414. <passport><xsl:value-of select="$passport"/></passport>
  415. <markup>
  416. <xts:transform name="XMLEncode">
  417. <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
  418. <root>
  419. <xts:queryNode select="/root/extractedOptions/mobileOptions/*"/>
  420. </root>
  421. </xts:transform>
  422. </xts:transform>
  423. </markup>
  424. </param>
  425. </xts:transform>
  426. <!-- generate the report options params -->
  427. <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
  428. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  429. <root>
  430. <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
  431. <root>
  432. <xts:queryNode select="/root/extractedOptions/notEmailOptions/*"/>
  433. </root>
  434. </xts:transform>
  435. <reportOptions>
  436. <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
  437. <root>
  438. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
  439. </root>
  440. </xts:transform>
  441. </reportOptions>
  442. <deliverySection>true</deliverySection>
  443. <defaultOptions>true</defaultOptions>
  444. <obj>
  445. <xsl:copy-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
  446. </obj>
  447. <preferences>
  448. <xsl:copy-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*"/>
  449. </preferences>
  450. <serviceDefaults>
  451. <xsl:copy-of select="/root/configuration/property[@name='serviceDefaultOptions']/*/value"/>
  452. </serviceDefaults>
  453. <xsl:if test="not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' write '))">
  454. <save_how>new_entry</save_how>
  455. </xsl:if>
  456. <defaultArchiveLocation>
  457. <!-- the first archive in the cm response is the default -->
  458. <xsl:copy-of select="/root/cm:queryResponse/cm:queryReply/cm:archiveLocation[1]"/>
  459. </defaultArchiveLocation>
  460. </root>
  461. </xts:transform>
  462. <xsl:call-template name="dt:generateUIHelpersFromOptions">
  463. <xsl:with-param name="queryReplyPath" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][6]/*"/>
  464. <xsl:with-param name="saveAsPath" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
  465. <xsl:with-param name="deliveryInfo" select="/root/deliveryOptionsInfo/*[local-name()='queryResponse']"/>
  466. <xsl:with-param name="appendPath" select="'/root/env'"/>
  467. <xsl:with-param name="genParams" select="true()"/>
  468. </xsl:call-template>
  469. </xts:append>
  470. <!-- this sequence converts the list of mobile recipients from the schedule options found in the bus:mobileOptionSearchPathMultipleObjectArray
  471. into a format that the add_entries morphlet requires - a <selectedEntries> node. CM is queried to get the required information such as
  472. userName, class etc...
  473. -->
  474. <xts:delete select="/root/selectedEntries"/>
  475. <xts:append select="/root">
  476. <xsl:variable name="unique-search-paths" select="set:distinct(/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item'][@xsi:type='bus:mobileOptionSearchPathMultipleObjectArray']/*[local-name()='value']/*[local-name()='item'])"/>
  477. <selectedEntries>
  478. <!-- transform the CM result into the same structure that the add entries returns. -->
  479. <xsl:if test="count($unique-search-paths) &gt; 0">
  480. <xts:transform src="portal/mobileOptions/transforms/gen-standard-list.xslt" processor="XSLT">
  481. <root>
  482. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  483. <send:request provider="cm">
  484. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  485. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  486. <cm:requests>
  487. <xsl:for-each select="$unique-search-paths">
  488. <xsl:if test=". != ''">
  489. <cm:query>
  490. <cm:search>
  491. <xsl:value-of select="."/>
  492. </cm:search>
  493. <cm:properties>
  494. <cm:property name="defaultName"/>
  495. <cm:property name="searchPath"/>
  496. <cm:property name="userName"/>
  497. <cm:property name="objectClass"/>
  498. <cm:property name="ancestors"/>
  499. <cm:property name="hidden"/>
  500. </cm:properties>
  501. </cm:query>
  502. </xsl:if>
  503. </xsl:for-each>
  504. </cm:requests>
  505. </cm:query>
  506. </xts:transform>
  507. </send:request>
  508. </xts:transform>
  509. <action>recipients</action>
  510. </root>
  511. </xts:transform>
  512. </xsl:if>
  513. </selectedEntries>
  514. </xts:append>
  515. </xsl:if>
  516. <dt:generateScheduleParams schedule="/root/cm:queryResponse/cm:queryReply/cm:schedule"/>
  517. <!-- generate the prompt description -->
  518. <xsl:choose>
  519. <!-- If there are parameters on the runnable (doing a run with options) or on the schedule
  520. (doing a run once) -->
  521. <xsl:when test="/root/parameters/* or /root/credentialParameters/*">
  522. <dt:promptDescription/>
  523. </xsl:when>
  524. <!-- if we're doing a run once and there are parameters on the runnable -->
  525. <xsl:otherwise>
  526. <dt:promptDescription checkRunnableParameters="true"/>
  527. </xsl:otherwise>
  528. </xsl:choose>
  529. <xts:append select="/root/env">
  530. <xsl:choose>
  531. <!-- if we're doing a run once and there are parameters on the schedule, then those parameters
  532. need to be passed in the execute request -->
  533. <xsl:when test="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:parameters/*">
  534. <!-- encode the parameters -->
  535. <xsl:variable name="parameters-markup">
  536. <xsl:call-template name="serialize-xml">
  537. <xsl:with-param name="node-set" select="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:parameters"/>
  538. </xsl:call-template>
  539. </xsl:variable>
  540. <param name="m_rp_parameters">
  541. <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
  542. </param>
  543. </xsl:when>
  544. <!-- if we're doing a run once and there are parameters on the report -->
  545. <xsl:when test="not(key('env-param','visited_run_with_options')) and /root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/cm:parameters">
  546. <!-- encode the parameters -->
  547. <xsl:variable name="parameters-markup">
  548. <xsl:call-template name="serialize-xml">
  549. <xsl:with-param name="node-set" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/cm:parameters"/>
  550. </xsl:call-template>
  551. </xsl:variable>
  552. <param name="m_rp_parameters">
  553. <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
  554. </param>
  555. </xsl:when>
  556. </xsl:choose>
  557. <!-- do we show the summary page? -->
  558. <param name="showSummary">
  559. <xsl:choose>
  560. <xsl:when test="/root/cm:queryResponse/cm:queryReply[5]/*/options/value/item[name='showOptionSummary']/value">
  561. <xsl:choose>
  562. <xsl:when test="/root/cm:queryResponse/cm:queryReply[5]/*/options/value/item[name='showOptionSummary']/value='true'">
  563. <xsl:value-of select="'y'"/>
  564. </xsl:when>
  565. <xsl:otherwise><xsl:value-of select="'n'"/></xsl:otherwise>
  566. </xsl:choose>
  567. </xsl:when>
  568. <xsl:otherwise>
  569. <xsl:value-of select="/root/system/param[@name = 'defaultPortalPreferences']/pref[@name='runoptions']"/>
  570. </xsl:otherwise>
  571. </xsl:choose>
  572. </param>
  573. </xts:append>
  574. </xsl:when>
  575. <!-- just came from the basic run with options dialog, so add all the 'advanced' run options -->
  576. <xsl:otherwise>
  577. <xts:append select="/root/env">
  578. <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
  579. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  580. <root>
  581. <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
  582. <root>
  583. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
  584. </root>
  585. </xts:transform>
  586. <defaultOptions>false</defaultOptions>
  587. <preferences>
  588. <xsl:copy-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*"/>
  589. </preferences>
  590. <serviceDefaults>
  591. <xsl:copy-of select="/root/configuration/property[@name='serviceDefaultOptions']/*/value"/>
  592. </serviceDefaults>
  593. <!-- if the user doesn't have write to the parent, then default the save as path to the users my folders -->
  594. <xsl:if test="not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:parent/*/cm:permissions, ' '), ' write '))">
  595. <saveAsPath>
  596. <xsl:value-of select="concat(/root/session/param[@name='e_hp'], '/folder')"/>
  597. </saveAsPath>
  598. </xsl:if>
  599. <xsl:if test="not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' write ')) or not(contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:parent/*/cm:permissions, ' '), ' traverse '))">
  600. <save_how>new_entry</save_how>
  601. </xsl:if>
  602. <obj>
  603. <xsl:copy-of select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
  604. </obj>
  605. <deliverySection>true</deliverySection>
  606. <basicOptions>false</basicOptions>
  607. <!-- this list of options needs to match the list in the report.xts morphlet -->
  608. <optionList include="false">
  609. <item>outputFormat</item>
  610. <item>outputLocale</item>
  611. <item>prompt</item>
  612. <item>http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures</item>
  613. </optionList>
  614. <defaultArchiveLocation>
  615. <!-- the first archive in the cm response is the default -->
  616. <xsl:copy-of select="/root/cm:queryResponse/cm:queryReply/cm:archiveLocation[1]"/>
  617. </defaultArchiveLocation>
  618. </root>
  619. </xts:transform>
  620. </xts:append>
  621. </xsl:otherwise>
  622. </xsl:choose>
  623. <xts:append select="/root/env">
  624. <!-- append the default start time and date -->
  625. <xsl:variable name="xsl_UTC_timeformat" select="'yyyy-MM-dd HH:mm:00'"/>
  626. <xsl:variable name="xsl_start_date" select="xtsext:getCurrentDateTime(string($timeZone))"/>
  627. <xsl:variable name="fromDate">
  628. <xsl:choose>
  629. <xsl:when test="key('env-param','p_runDate') and key('env-param','p_runDate') != ''">
  630. <xsl:value-of select="key('env-param','p_runDate')"/>
  631. </xsl:when>
  632. <xsl:otherwise>
  633. <xsl:value-of select="substring(string($xsl_start_date), 1, 10)"/>
  634. </xsl:otherwise>
  635. </xsl:choose>
  636. </xsl:variable>
  637. <xsl:variable name="fromTime">
  638. <xsl:choose>
  639. <xsl:when test="key('env-param','p_runTime') and key('env-param','p_runTime') != ''">
  640. <xsl:value-of select="key('env-param','p_runTime')"/>
  641. </xsl:when>
  642. <xsl:otherwise>
  643. <xsl:value-of select="concat(substring(string($xsl_start_date), 12, 19), '.000')"/>
  644. </xsl:otherwise>
  645. </xsl:choose>
  646. </xsl:variable>
  647. <param name="p_runTime">
  648. <xsl:value-of select="$fromTime"/>
  649. </param>
  650. <param name="p_runDate">
  651. <xsl:value-of select="$fromDate"/>
  652. </param>
  653. <xsl:if test="not(key('env-param','runType'))">
  654. <param name="runType">
  655. <xsl:choose>
  656. <xsl:when test="key('env-param','delivery') = 'view'">view</xsl:when>
  657. <xsl:otherwise>background</xsl:otherwise>
  658. </xsl:choose>
  659. </param>
  660. </xsl:if>
  661. </xts:append>
  662. </xts:sequence>
  663. </xsl:template>
  664. <dt:hierarchicalParmValueItem/>
  665. <dt:generateUIHelpersFromOptions/>
  666. <pf:serialize-xml/>
  667. </xsl:stylesheet>
  668. </xts:block>
  669. <!--
  670. ===============================================================================================
  671. encodeSelectedEntries - web64encode the <selectedEntries> node
  672. ===============================================================================================
  673. -->
  674. <xts:block id="encodeSelectedEntries" path="/portal/mobileOptions/logicsheets/encode_selected_entries.xslt" processor="XSLT" dependency="generateDefaults" type="exec" condition=".[(not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and /root/selectedEntries/*]" mandatory="false">
  675. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  676. <xts:logicsheet path="logicsheets/portal.xsl"/>
  677. </xts:block>
  678. <!--
  679. ===============================================================================================
  680. updateSaveAsText
  681. if we've visited the save as dialog or this is the first time we hit the page and we've come
  682. from the basic run with options, then we have to update the summary text
  683. ===============================================================================================
  684. -->
  685. <xts:block id="updateSaveAsText" processor="XSLT" type="exec" dependency="generateDefaults" condition=".[(/root/env/param[@name='visited_save_as']='true' or (/root/env/param[@name = 'visited_run_with_options']='true' and not(/root/env/param[@name = 'visited_run_with_options_advanced']))) and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
  686. <xts:logicsheet path="logicsheets/portal.xsl"/>
  687. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  688. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  689. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  690. <xsl:stylesheet version="1.0"
  691. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  692. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  693. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  694. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  695. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  696. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  697. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  698. exclude-result-prefixes="dt cf cp xsl cm xtsext pf">
  699. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  700. <pf:variables/>
  701. <xsl:template match="/">
  702. <dt:updateSaveAsPathText defaultName="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='defaultName']" ancestors="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='ancestors']"/>
  703. </xsl:template>
  704. </xsl:stylesheet>
  705. </xts:block>
  706. <!--
  707. ===============================================================================================
  708. generateDefaultEmailOptions - If no delivery options where save on the object and it's the
  709. first time we hit this page then generate defaults
  710. ===============================================================================================
  711. -->
  712. <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']) and not(/root/env/param[@name='visited_run_with_options_advanced']) and not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and *[local-name()='name']='email']/*[local-name()='value']='true') and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
  713. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  714. </xts:block>
  715. <!--
  716. ===============================================================================================
  717. processDefaultEmailOptions - If no delivery options where save on the object and it's the
  718. first time we hit then process the default delivery options.
  719. ===============================================================================================
  720. -->
  721. <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']) and not(/root/env/param[@name='visited_run_with_options_advanced']) and not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and *[local-name()='name']='email']/*[local-name()='value']='true') and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false">
  722. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  723. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  724. <xts:logicsheet path="logicsheets/portal.xsl"/>
  725. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  726. </xts:block>
  727. <!--
  728. ================================================================================
  729. Performs option actions (i.e. clear PDF options)
  730. ================================================================================
  731. -->
  732. <xts:block id="perform_action" nodelist="env" path="/transforms/portal/options/perform_action.xslt" processor="XSLT" type="exec" dependency="" condition=".[/root/env/param[@name='option_op'] != '']" mandatory="false"/>
  733. <!--
  734. ===============================================================================================
  735. HTML output
  736. ===============================================================================================
  737. -->
  738. <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency=" perform_action updateSaveAsText processDefaultEmailOptions generateDefaults encodeSelectedEntries formlogic_init getContent" condition=".[not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='']" mandatory="false" mimeType="text/html">
  739. <!-- logicsheets -->
  740. <xts:logicsheet path="logicsheets/presentation/dialog/recurrenceUI.xslt"/>
  741. <xts:logicsheet path="portal/runWithOptions/logicsheets/response.xslt"/>
  742. <!-- portal specific information -->
  743. <xts:logicsheet path="logicsheets/portal.xsl"/>
  744. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  745. <!-- Dialog specific logicsheets -->
  746. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  747. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  748. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  749. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  750. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  751. <xts:logicsheet path="portal/schedule/logicsheets/scheduleVars.xsl"/>
  752. <!-- Generic logicsheets -->
  753. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  754. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  755. <!-- apply the form logic -->
  756. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  757. <xts:logicsheet path="logicsheets/validation.xslt"/>
  758. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  759. <xsl:stylesheet version="1.0" exclude-result-prefixes="rui xts xsl cm pf xtsext lyt dp df cf cp rdb"
  760. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb/"
  761. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  762. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  763. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  764. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  765. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  766. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  767. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  768. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  769. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  770. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  771. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  772. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  773. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  774. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  775. xmlns:rui="http://developer.cognos.com/schemas/xts/logicsheet/xslt/presentation/dialog/recurrenceUI/">
  776. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  777. <!-- Global template variables -->
  778. <pf:variables/>
  779. <rui:variables/>
  780. <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
  781. <xsl:variable name="the-credential" select="/root/cm:queryResponse/cm:queryReply[3]/cm:credential"/>
  782. <xsl:variable name="isBurstReport" select="
  783. (/root/cm:queryResponse/cm:queryReply[2]/*/cm:canBurst = 'true') or
  784. (/root/cm:queryResponse/cm:queryReply[2]/*/cm:base/*/cm:canBurst = 'true')
  785. "/>
  786. <xsl:variable name="canBurst" select="
  787. $isBurstReport and
  788. (/root/cm:queryResponse/cm:queryReply[2]/*/cm:metadataModelPackage/*/cm:effectiveUserCapabilities/cm:canUseBursting or
  789. /root/reportBaseMetadata/cm:queryResponse/cm:queryReply/*/cm:effectiveUserCapabilities/cm:canUseBursting or
  790. /root/cm:queryResponse/cm:queryReply[2]/*/cm:runAsOwner = 'true' or
  791. /root/cm:queryResponse/cm:queryReply[2]/*/cm:runWithOwnerCapabilities = 'true')
  792. "/>
  793. <xsl:variable name="defaultFormat">
  794. <xsl:choose>
  795. <!-- check the old execution format -->
  796. <xsl:when test="/root/cm:queryResponse/cm:queryReply[2]/*/cm:executionFormat!=''">
  797. <xsl:value-of select="/root/cm:queryResponse/cm:queryReply[2]/*/cm:executionFormat"/>
  798. </xsl:when>
  799. <!-- check the options property -->
  800. <xsl:when test="/root/*[local-name() = 'queryResponse']/*[local-name() = 'queryReply'][2]/*/*[local-name() = 'options']/*[local-name() = 'value']/*[local-name() = 'item' and ./*[local-name() = 'name' and . = 'outputFormat']]/*[local-name() = 'value']/*[local-name() = 'item'][1] != ''">
  801. <xsl:value-of select="/root/*[local-name() = 'queryResponse']/*[local-name() = 'queryReply'][2]/*/*[local-name() = 'options']/*[local-name() = 'value']/*[local-name() = 'item' and ./*[local-name() = 'name' and . = 'outputFormat']]/*[local-name() = 'value']/*[local-name() = 'item'][1]"/>
  802. </xsl:when>
  803. <xsl:when test="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*[local-name()='item']/*[local-name()='name' and .='format']/../*[local-name()='value'] != ''">
  804. <xsl:value-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*[local-name()='item']/*[local-name()='name' and .='format']/../*[local-name()='value']"/>
  805. </xsl:when>
  806. </xsl:choose>
  807. </xsl:variable>
  808. <!-- include date control stylesheet and declare any vairables needed -->
  809. <rui:promptControls form="pform"/>
  810. <!-- time varibales needed for the calendar control -->
  811. <xsl:variable name="mname" select="'runWithOptions/report_advanced.xts'"/>
  812. <!-- references to the various objects queried from CM -->
  813. <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' execute ')"/>
  814. <!-- start the output -->
  815. <xsl:template match="/root">
  816. <xsl:variable name="browserTitle">
  817. <rdb:pageTitle mode="advanced"/>
  818. </xsl:variable>
  819. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  820. <dp:meta>
  821. <pf:meta/> <!-- Standard meta tags -->
  822. </dp:meta>
  823. <!-- get the JavaScript needed for the prompt controls -->
  824. <rui:promptControlsScript/>
  825. <dp:script>
  826. <pf:help context="HID_ADVANCED_RUNOPTIONS"/> <!-- Help system -->
  827. <script language="javascript" src="{$webcontent}/{$app}/js/runOptions.js"/>
  828. <script language="javascript" src="{$webcontent}/{$app}/js/runWithOptions.js"/>
  829. <script language="javascript" src="{$webcontent}/../cognoslaunch.js"/>
  830. <script language="javascript">
  831. <!-- include the javascript need to run the report -->
  832. <rdb:interactiveJavaScript advanced="true"/>
  833. <!-- include the javascript needed to validate the runOptions -->
  834. <dt:runOptionValidation/>
  835. <!-- some behavior for when the page loads -->
  836. function init()
  837. {
  838. var frm = document.pform;
  839. <!-- make sure the run type controls are initialized -->
  840. updateRunType();
  841. <!-- make sure the selection based features checkbox is defaulted -->
  842. if (document.getElementById('view_selectionBasedFeatures') &amp;&amp; document.getElementById('background_selectionBasedFeatures')) {
  843. document.getElementById('view_selectionBasedFeatures').checked = document.getElementById('background_selectionBasedFeatures').checked;
  844. }
  845. <!-- if run and view is selected -->
  846. if (frm.runType &amp;&amp; frm.runType[0].checked) {
  847. updateSubOptions();
  848. }
  849. else {
  850. <!-- update the selection based checkbox (enable/disable, checked/unchecked) -->
  851. updateInteractiveCheckbox();
  852. <!-- update the verticalElements select -->
  853. updateVerticalElementsSelect();
  854. <!-- special handling if we've just come from the basic run with options dialog -->
  855. <xsl:if test="not(key('env-param','visited_run_with_options_advanced')) and key('env-param','visited_run_with_options')">
  856. <!-- HTML probably got checked by default, uncheck it -->
  857. if (document.pform.m_ro_outputF_HTML_Type) {
  858. document.pform.m_ro_outputF_HTML_Type.checked = false;
  859. }
  860. switchToBackgroundOptions();
  861. </xsl:if>
  862. <!--
  863. need to make sure the output locale drop down in the run and view is disabled.
  864. It's the only control that has the same name as hidden inputs used in the run and save dialog
  865. -->
  866. if (document.getElementById('outputLocaleDropDown')) {
  867. document.getElementById('outputLocaleDropDown').disabled = true;
  868. }
  869. }
  870. initRunOptions();
  871. if (frm.controller_state) {
  872. frm.controller_state.value = '';
  873. }
  874. }
  875. function validate()
  876. {
  877. var frm = document.pform;
  878. if ((!frm.runType || (frm.runType &amp;&amp; frm.runType[1].checked))) {
  879. if (!validateRunOptions()) {
  880. return false;
  881. }
  882. }
  883. <!-- make sure the user doesn't send two run requests -->
  884. 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>')) {
  885. return false;
  886. }
  887. return true;
  888. }
  889. </script>
  890. </dp:script>
  891. <utml:form name="pform" method="post" action="{$gateway}">
  892. <utml:exclusion-list><xsl:value-of select="' m_ro_outputFormat m_ro_outputLocale delivery hourstimeFrom minutestimeFrom txtDatedateFrom p_runDate p_runTime AMPMtimeFrom select_languages_visited selected_languages m_pdf_userPassword_runOption_Encrypted confirm_m_pdf_userPassword_runOption m_pdf_ownerPassword_runOption_Encrypted confirm_m_pdf_ownerPassword_runOption '"/></utml:exclusion-list>
  893. <utml:read-only>false</utml:read-only>
  894. <utml:input type="hidden" name="ifrmcmd" value='execute' utml:update="false"/>
  895. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  896. <utml:input name="visited_run_with_options_advanced" type="hidden" value="true"/>
  897. <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
  898. <utml:input type="hidden" name="so.searchPath" value=""/>
  899. <utml:input type="hidden" name="preserve_pdf_userPwd">
  900. <xsl:attribute name="value">
  901. <xsl:choose>
  902. <xsl:when test="key('env-param','preserve_pdf_userPwd') !=''"><xsl:value-of select="key('env-param','preserve_pdf_userPwd')"/></xsl:when>
  903. <xsl:when test="key('env-param','m_pdf_userPassword_runOption_Encrypted')!=''">true</xsl:when>
  904. <xsl:otherwise>false</xsl:otherwise>
  905. </xsl:choose>
  906. </xsl:attribute>
  907. </utml:input>
  908. <utml:input type="hidden" name="preserve_pdf_ownerPwd">
  909. <xsl:attribute name="value">
  910. <xsl:choose>
  911. <xsl:when test="key('env-param','preserve_pdf_ownerPwd') !=''"><xsl:value-of select="key('env-param','preserve_pdf_ownerPwd')"/></xsl:when>
  912. <xsl:when test="key('env-param','m_pdf_ownerPassword_runOption_Encrypted')!=''">true</xsl:when>
  913. <xsl:otherwise>false</xsl:otherwise>
  914. </xsl:choose>
  915. </xsl:attribute>
  916. </utml:input>
  917. <!-- if the user doesn't have a credentail then add the h_CAM_action to create one -->
  918. <rdb:checkCredential/>
  919. <!-- header -->
  920. <dp:header>
  921. <dp:title>
  922. <xsl:copy-of select="$browserTitle"/>
  923. </dp:title>
  924. <dp:description>
  925. <xsl:choose>
  926. <xsl:when test="not(/root/env/param[@name='visited_run_with_options'])">
  927. <xts:string id="IDS_OTHERRUN_ONCE_INTRO"><xts:param name="objectName"><xsl:value-of select="key('env-param', 'm_name')"/></xts:param></xts:string>
  928. </xsl:when>
  929. <xsl:otherwise>
  930. <xsl:choose>
  931. <xsl:when test="/root/env/param[@name='m_class']='powerPlay8Report'">
  932. <xts:string id="IDS_OTHERRUN_ADVANCE_POWERPLAY8_INTRO"><xts:param name="objectName"><xsl:value-of select="key('env-param', 'm_name')"/></xts:param></xts:string>
  933. </xsl:when>
  934. <xsl:otherwise>
  935. <xts:string id="IDS_OTHERRUN_ADVANCE_INTRO"><xts:param name="objectName"><xsl:value-of select="key('env-param', 'm_name')"/></xts:param></xts:string>
  936. </xsl:otherwise>
  937. </xsl:choose>
  938. </xsl:otherwise>
  939. </xsl:choose>
  940. </dp:description>
  941. </dp:header>
  942. <!-- body -->
  943. <lyt:layout style="1">
  944. <lyt:section>
  945. <label for="txtDatedateFrom" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PERIOD_FROM" encode="html" /></label>
  946. <label for="timeFrom_prmtTime_HOURS" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_HOURS" encode="html"/></label>
  947. <label for="timeFrom_prmtTime_MINUTES" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_MINUTES" encode="html"/></label>
  948. <label for="timeFrom_prmtTime_AMPM" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_AMPM" encode="html"/></label>
  949. <label for="myYeardateFrom" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_PROP_SCHED_FREQ_RELATIVE_INTERVAL_START_DATE_YEAR" encode="html"/></label>
  950. <xsl:choose>
  951. <!-- for a run once, we don't give the user the option to view the report -->
  952. <xsl:when test="not(/root/env/param[@name='visited_run_with_options'])">
  953. <rdb:nowOrLater/>
  954. </xsl:when>
  955. <xsl:otherwise>
  956. <rdb:viewOrBackground/>
  957. </xsl:otherwise>
  958. </xsl:choose>
  959. </lyt:section>
  960. </lyt:layout>
  961. <!-- background run options -->
  962. <cf:dynamicDiv name="backgroundRunOption" runTimeVisibleCheck="not(key('env-param','runType')) or key('env-param','runType') = 'background'">
  963. <lyt:layout style="2" title="IDS_PROP_SCHED_OPTIONS" border="yes">
  964. <!-- 1st column-->
  965. <lyt:section>
  966. <!-- format -->
  967. <ut:format/>
  968. <br/>
  969. <!-- language -->
  970. <ut:language/>
  971. <!-- burst -->
  972. <xsl:if test="$canBurst = 'true'">
  973. <br/>
  974. <ut:burst/>
  975. </xsl:if>
  976. </lyt:section>
  977. <!-- 2nd column-->
  978. <lyt:section>
  979. <!-- delivery -->
  980. <dp:list title="IDS_OTHERRUN_DELIVERY" title-id="lbl_deliveryGroup">
  981. <dp:section>
  982. <dp:hint wrap="wrap">
  983. <xts:string id="IDS_OTHERRUN_DELIVERY_DESCRIPTION_REPORT"/>
  984. </dp:hint>
  985. </dp:section>
  986. <dp:section>
  987. <ut:delivery/>
  988. </dp:section>
  989. </dp:list>
  990. <xsl:choose>
  991. <xsl:when test="/root/system/param[@name = 'enable-report-execution-recording'] = 'true'">
  992. <div id="recordingEnabledRunOption">
  993. <table border="0" cellspacing="0" cellpadding="1">
  994. <tr>
  995. <td nowrap="nowrap" colspan="2" class="formLabel"><xts:string id="IDS_OTHERRUN_REPORT_EXECUTION"/></td>
  996. </tr>
  997. </table>
  998. </div>
  999. <table border="0" cellspacing="0" cellpadding="1">
  1000. <tr>
  1001. <td nowrap="nowrap" class="formText">
  1002. <tr>
  1003. <td nowrap="nowrap" class="formText">
  1004. <utml:input type="checkbox" name="m_ro_recordingEnabled" value="true"/>
  1005. </td>
  1006. <td nowrap="nowrap" class="formText" colspan="3"><xts:string id="IDS_OTHERRUN_RECORD_REPORT_EXECUTION"/></td>
  1007. </tr>
  1008. </td>
  1009. </tr>
  1010. <tr>
  1011. <td nowrap="nowrap">
  1012. <img height="5" width="1" src="{$webcontent}/images/space.gif"/>
  1013. </td>
  1014. </tr>
  1015. </table>
  1016. </xsl:when>
  1017. <xsl:otherwise>
  1018. <utml:input type="hidden" name="m_ro_recordingEnabled" value="false"/>
  1019. </xsl:otherwise>
  1020. </xsl:choose>
  1021. </lyt:section>
  1022. </lyt:layout>
  1023. </cf:dynamicDiv>
  1024. <!-- run and view run options -->
  1025. <cf:dynamicDiv name="viewReportOptions" runTimeVisibleCheck="key('env-param','runType') != 'background'">
  1026. <lyt:layout style="1" title="IDS_PROP_REPORT_OPTIONS" border="yes">
  1027. <!-- 1st column-->
  1028. <lyt:section>
  1029. <!-- format -->
  1030. <ut:formatSelectList addFormatSubOptions="true"/>
  1031. <br/>
  1032. <!-- language -->
  1033. <ut:localeSelectList/>
  1034. <br/>
  1035. </lyt:section>
  1036. </lyt:layout>
  1037. </cf:dynamicDiv>
  1038. <lyt:layout style="1">
  1039. <lyt:section>
  1040. <!-- a11y -->
  1041. <ut:a11yOption/>
  1042. </lyt:section>
  1043. </lyt:layout>
  1044. <lyt:layout style="1" title="IDS_PROP_SCHED_PROMPT_VALUES" border="yes">
  1045. <lyt:section>
  1046. <!-- prompts -->
  1047. <ut:prompt/>
  1048. </lyt:section>
  1049. </lyt:layout>
  1050. <!-- footer -->
  1051. <dp:footer>
  1052. <df:button df:id="IDS_OTHERRUN_RUN" df:style="href" df:href="javascript:runReport();"/>
  1053. <xsl:choose>
  1054. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  1055. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  1056. </xsl:when>
  1057. <xsl:otherwise>
  1058. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  1059. </xsl:otherwise>
  1060. </xsl:choose>
  1061. </dp:footer>
  1062. </utml:form>
  1063. </dp:page>
  1064. </xsl:template>
  1065. <ut:formatRunOptions/>
  1066. <ut:formatLanguage/>
  1067. <ut:promptTemplate showLinks="false" showTitle="false"/>
  1068. <ut:burstTemplate addBehavior="true" showCheckbox="false"/>
  1069. <ut:deliveryRunOptions newEmailOptions="true" border="false" showTitle="false" addBehavior="true" isReportView="contains(' reportView powerPlay8ReportView powerPlay8Report ', concat(' ', /root/env/param[@name='m_class'],' '))" canSave="contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' write ') and contains(concat(' ', /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, ' '), ' traverse ')" noGroup="true"/>
  1070. <cp:tabControl/>
  1071. </xsl:stylesheet>
  1072. </xts:block>
  1073. <!--
  1074. ===============================================================================================
  1075. debug - display debug information
  1076. ===============================================================================================
  1077. -->
  1078. <xts:block id="debug" dependency="format processResponse processMobileEntries" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  1079. <!-- get the debug logic sheet -->
  1080. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  1081. <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">
  1082. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  1083. <xsl:template match="/">
  1084. <dbg:dumpxml select="/root"/>
  1085. </xsl:template>
  1086. </xsl:stylesheet>
  1087. </xts:block>
  1088. </xts:morphlet>