Solved

Is it possible to run a macro on an excel report automatically after being rentered by the SSRS Report Manager

Posted on 2014-11-03
3
651 Views
Last Modified: 2014-11-23
Hi I need to run a Marco on a report which gets around another bug in SSRS.
Just wondering how I would do this? Is there someway that if the user selects the report to be rendered in excel the macro gets applied to the report somehow?
I just need to first know if this is possible and then how I would go about it. Also if not is there other ways this might be possible?
Many thanks,
C
0
Comment
Question by:Papa1NZ
3 Comments
 
LVL 13

Accepted Solution

by:
Koen Van Wielink earned 250 total points
ID: 40418961
Seems highly unlikely to me that this can be done, as upon exporting the report to Excel a new file is created each time. So saving the macro would be hard.
What's the bug you're encountering that requires you to do this? Perhaps there's a way to handle it in SSRS?
0
 
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 250 total points
ID: 40419402
Not familiar with how to do this in SSRS, or any process that creates a new Excel file.

Many times I've pulled off creating a 'template' Excel file with all the cosmetics I want, and an Auto_Open macro that fires immediately after a user opens it, where I write Excel VBA code to do even more cosmetics, such as format columns as dates, numbers, etc.    

Then in an SSIS process copy the 'template' file into a location, execute a data flow task that inserts data from a source into that location, then when the user opens it the data looks nice and pretty, instead of a looking like a Picasso.
0
 

Author Closing Comment

by:Papa1NZ
ID: 40461148
Thank you for your answers. We had to use a third party tool in the end to run a macro on the SSRS. It comes up as another rendering option in SSRS to select. And runs a excel template. Both answers above helped me to decide how to do this.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question