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
601 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 12

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

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

762 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now