Thursday, January 19, 2017

[SSRS] Replacing an image embedded in the report with a new one via RDL manipulation.

Quick and Dirty:

I had a report, and had to change the logo to the new&improved version.  Didn't want to actually TOUCH anything within the report, lest I break it. The person who designed it had the image embedded within the report - please don't do that, but instead reference a file or fileshare or something. (makes replacing it much easier, but then you have to make sure where the images are is "safe" and Highly Available)

Step 1: download the RDL

Step 2: open in Notepad.

Looking near the top...

Okay, this is somewhat human-readable. Figure out which image it is.  Mine was simple - only one image, 2 inches wide by 1 inch tall.  Now let's find the actual image.

Okay, that's cool.  It's a PNG file, via MIME (base64) encoding.  Let's see what it looks like.
Take everything within ImageData, copy it, and go to:

Paste, and convert.  Verify it's the right image. Yup!

Now what? Get a new image about the same size (so it'll fit when scaled - let's not touch things if we can avoid it).  Save as PNG, even.  Now go back to that askapache, and upload it.  Copy the RAW out, and refresh the page.  Paste it back in and make sure it's showing what you expect (aka the new image). 

Finally, take this new string, replace ImageData with it, save the new version, then upload->replace the RDL. Test and done!

Saturday, December 31, 2016

[presenting] SQL Saturday Nashville, just two weeks away! Jan 14th, 2017

SQLSat Nashville 2017

Thrilled to be presenting again, and starting off 2017 with a bang! 

I'll be talking about my fave topic, Event Notifications, ad how to use them across your environment.  It's my standard talk, to be honest, but I'm really happy to present to a new crowd!  

There's a great list of speakers - just off the top, Kevin Kline, Louis Davidson, Geoff Hiten, Andy Yun, Argenis Fernandez... I am so psyched for this!

Wednesday, December 21, 2016

[Event Notifications] Changing the owner of the endpoint

So the guy who set up Event Notifications, which you now love and adore, left.  And it turns out he set it up as his user on all the boxes, so it stopped working and now you need to change the owner of the Endpoints.  How?  Simple:


USE master;
 SUSER_NAME(principal_id) AS endpoint_owner
,name AS endpoint_name
FROM sys.endpoints;

USE master;