Topic
  • 4 replies
  • Latest Post - ‏2013-06-25T18:18:48Z by DanielWagemann
TheBrenda
TheBrenda
64 Posts

Pinned topic Run Report to Excel - how to set Fit Sheet to One Page

‏2013-06-25T13:32:52Z |

Run Report to Excel - how to set Fit Sheet to One Page.

I have an Report Studio report that I want to Run and open in Excel and allow the client to Print without having to manipulate. On some reports I may want to Fit Sheet to one Page, others I might want to Fit all Columns on One page, etc. I want to be able to control the print settings of the worksheet. BTW - There might be multiple worksheets in each workbook (that is my next question). How can I control the Excel print settings?

Thanks

 

  • OpherB
    OpherB
    696 Posts

    Re: Run Report to Excel - how to set Fit Sheet to One Page

    ‏2013-06-25T17:35:11Z  

    You're asking "How can IBM Cognos BI Report Studio control what Microsoft Excel does?"

    I think it's pretty obvious that it cannot.

    Regards,
    Opher

     

  • TheBrenda
    TheBrenda
    64 Posts

    Re: Run Report to Excel - how to set Fit Sheet to One Page

    ‏2013-06-25T17:39:57Z  
    • OpherB
    • ‏2013-06-25T17:35:11Z

    You're asking "How can IBM Cognos BI Report Studio control what Microsoft Excel does?"

    I think it's pretty obvious that it cannot.

    Regards,
    Opher

     

    I am asking if anyone has any experience doing this. It might be in Cognos, it might be some other way. I cannot be the only person that has needed to get this done. Looking for ideas.

  • OpherB
    OpherB
    696 Posts

    Re: Run Report to Excel - how to set Fit Sheet to One Page

    ‏2013-06-25T17:54:45Z  
    • TheBrenda
    • ‏2013-06-25T17:39:57Z

    I am asking if anyone has any experience doing this. It might be in Cognos, it might be some other way. I cannot be the only person that has needed to get this done. Looking for ideas.

    You might be able to set some kind of Excel trigger to run a macro. If  you use the SDK you might be able to capture the output and run an Excel macro against it. I have heard of many people wanting to do this, but never a satisfactory result.

    Good luck,
    Opher

     

  • DanielWagemann
    DanielWagemann
    850 Posts

    Re: Run Report to Excel - how to set Fit Sheet to One Page

    ‏2013-06-25T18:18:48Z  
    • TheBrenda
    • ‏2013-06-25T17:39:57Z

    I am asking if anyone has any experience doing this. It might be in Cognos, it might be some other way. I cannot be the only person that has needed to get this done. Looking for ideas.

    The following is in theory as I have not tested it.  Provided that an excel macro can be run for each format option you want to perform. (Adjust Columns, Fit to Page) and the macro can be executed within excel on open.

    You could try something like:  Create a prompt that populates a certain cell in the spreadsheet with a value the represents the action.

    On excel open the macro checks this cell and then fires the correct function to do the desired task.