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
721 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

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

726 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