Topic
10 replies Latest Post - ‏2013-05-15T18:06:01Z by lscott41
SystemAdmin
SystemAdmin
15496 Posts
ACCEPTED ANSWER

Pinned topic Report Output format in Prompt Page

‏2009-01-07T21:07:23Z |
Shekhar Pokhrel said:

Hello,

Is it possible to put report output format in Prompt Page in 8.3...If so, how?

I tried this previously posted Java Script but its not working. It gives me an options however when I run the report it stills runs on HTML format.

<input type="hidden" name="run.outputFormat" value="HTMLFragment">

<script type="text/javascript" ></p><p>function chgOutput(selFormat)<br/>{<br/>//User has selected new value...retrieve value and set hidden input<br/>document.getElementById("run.outputFormat").value = selFormat.optionshttp://selFormat.selectedIndex.value;<br/>}</p><p>function dfltOutput()<br/>{<br/>//set the format dropdown to the default correctly<br/>si="HTML"<br/>selFormat = document.getElementById("changeOutput");<br/>txt = document.getElementById("run.outputFormat").value; <br/>for(i=0; i<selFormat.length; i++)<br/>{ <br/> if(selFormat.options[i].value == txt)<br/><span><span> {si = i;}</span></span><br/>}<br/>selFormat.selectedIndex = si;<br/>}</p><p><br/></script>
Format:&nbsp
<SELECT NAME="changeOutput" onBlur="chgOutput(this)">
<option value="HTML" selected>HTML</option>
<option value="PDF">PDF</option>
<option value="singleXLS">Excel 2000 Single Sheet</option>
<option value="XLWA">Excel 2002</option>
<option value="XLS">Excel 2000</option>
<option value="CSV">Delimited text (CSV)</option>
<option value="XML">XML</option>
</SELECT>

Thank You

Shekhar

Updated on 2010-10-14T01:39:12Z at 2010-10-14T01:39:12Z by Krishna_gupta
  • SystemAdmin
    SystemAdmin
    15496 Posts
    ACCEPTED ANSWER

    Re: Report Output format in Prompt Page

    ‏2009-01-07T21:07:23Z  in response to SystemAdmin
    Suraj Neupane said:

    So far we have not been able to make this work in 8.3.

    If something comes up, I'll post.

  • SystemAdmin
    SystemAdmin
    15496 Posts
    ACCEPTED ANSWER

    Re: Report Output format in Prompt Page

    ‏2009-01-07T21:07:23Z  in response to SystemAdmin
    Suraj Neupane said:

    Also, check this discussion on the same issue:

    http://communities.cognos.com/home/message/12677

  • SystemAdmin
    SystemAdmin
    15496 Posts
    ACCEPTED ANSWER

    Re: Report Output format in Prompt Page

    ‏2009-07-01T15:49:09Z  in response to SystemAdmin
    Here's the script for 8.3. Good luck.

    <html>
    <head>
    <script language="javascript">
    function gotoUrl() 
    {
    var obj=document.all['OutputFormat'];
    window.onload(gCognosViewer.getRV().viewReport(obj.options[obj.selectedIndex].value));
    }
     
    </script>
    </head>
    <body>
     
    <select name="OutputFormat" OnBlur="javascript:gotoUrl()">
    <option value="HTML">HTML</option>
    <option value="PDF">PDF</option>
    <option value="singleXLS">Excel 2000 Single Sheet</option>
    <option value="XLWA">Excel 2002</option>
    <option value="XLS">Excel 2000</option>
    <option value="CSV">Delimited text (CSV)</option>
    <option value="XML">XML</option>
    </select>
     
    </body>
    </html>
    
    Updated on 2014-03-25T08:42:21Z at 2014-03-25T08:42:21Z by iron-man
    • Neerukanti.kumar
      Neerukanti.kumar
      7 Posts
      ACCEPTED ANSWER

      Re: Report Output format in Prompt Page

      ‏2009-07-02T07:06:03Z  in response to SystemAdmin
      Hi,
      we have the same requiement in Cognos8.1 Version.
      i have tried the following code,but i am not able to it.can u send me the code for cognos 8.1 vs

      Thanks & Regards,
      Neerukanti.
      • Neerukanti.kumar
        Neerukanti.kumar
        7 Posts
        ACCEPTED ANSWER

        Re: Report Output format in Prompt Page

        ‏2009-07-02T09:19:49Z  in response to Neerukanti.kumar
        i have used the the code which is posted in this thread for 8.3 vs,only.
        • shivaraja
          shivaraja
          1 Post
          ACCEPTED ANSWER

          Re: Report Output format in Prompt Page

          ‏2010-02-26T06:12:07Z  in response to Neerukanti.kumar
          I am looking for the way that i can fetch the list of Report format values from the content store.
          can any one please tell me is it possible to get the values from the content store or those are constant values?
          Please help me in this regard.
          • ckeaton
            ckeaton
            1 Post
            ACCEPTED ANSWER

            Re: Report Output format in Prompt Page

            ‏2010-03-01T14:59:10Z  in response to shivaraja
            This code cause other prompts on the prompt page to reset, even though values have already been selected. Do you have any suggestions?
            Thanks!
            • Krishna_gupta
              Krishna_gupta
              3 Posts
              ACCEPTED ANSWER

              Re: Report Output format in Prompt Page

              ‏2010-10-13T05:29:50Z  in response to ckeaton
              This code works fine for PDF and HTML but when I select any Excel Formats The report executes in a new Window and the Prompt page stays on.
              Is there any way to avoid this and the report to execute on the same page rather than loading a new page.
              Thanks in Advance....
              Krish
            • Krishna_gupta
              Krishna_gupta
              3 Posts
              ACCEPTED ANSWER

              Re: Report Output format in Prompt Page

              ‏2010-10-14T01:39:12Z  in response to ckeaton
              hi Ckeaton did u found any solution for this problem.
              If Yes could u please provide me the solution.

              Thanks in advance.......
            • lscott41
              lscott41
              1 Post
              ACCEPTED ANSWER

              Re: Report Output format in Prompt Page

              ‏2013-05-15T18:06:01Z  in response to ckeaton

              I am having this same issue of previously-assigned prompts resetting, does anyone know the workaround for this?  Also in my instance, the report will start running in the same window without the Submit button being clicked, after I have selected a report format setting and then click on one of the other dropdowns on the prompt page.  Thanks for any help!

              Updated on 2013-05-15T18:10:04Z at 2013-05-15T18:10:04Z by lscott41