Friday, April 29, 2016

How To Insert a TAB Character in OneNote

As you might know, clicking the TAB button on your keyboard results in a table in OneNote. What if you really want to insert a TAB character? Well, you need a trick for this.

  • Create an Auto-correct rule that turns your chosen character sequence (e.g. "\t") into a regular TAB.
  • Open Notepad++ (or the text editor of your choice) and type one TAB. Select it and copy it.
  • Go to OneNote and click File | Options | Proofing | AutoCorrect Options.
  • In the dialog, put your desired sequence of characters (e.g. \t into the "Replace:" field.
  • Paste the TAB that you copied from Notepad++ into the "With:" field and click Add.
  • Click OK 2 times to close the dialogs and you're done!

Now, any \t followed by a SPACE will be replaced by a regular TAB.


I found this answer on the MSFT community site.

Friday, March 18, 2016

The Best of PASS Summit 2015

If you haven’t been to the PASS Summit in Seattle last year (like me :(), you might want to check out the recordings of Summit 2015, as they are now available on PASStv.

Furthermore, PASS has selected the top 10 recordings (I believe based on reviews of the sessions) for you to look at over at Youtube. The links to the video’s can be found at the PASS website, go check them out!

My personal favourite is from Itzik Ben-Gan:

Have fun!

Monday, February 22, 2016

SSRS: Go Back Button in an Expression

ProblemLast week I was making a drillthrough report in SSRS for one of my clients and I had the need to make a (browser-like) Back button, to go back to the parent report for example. I know I did this before and it had something to do with history and (-1) but I couldn’t recall the syntax. So I thought I’d finally capture the solution in a blog post!

The key to the solution is the <Action> property of the <Text Box Properties>, which you’ll have to set to <Go to URL> and edit the expression with the following code:

=”javascript: history.go(-1)”

Do mind the casing here, because it’s case sensitive!


Thursday, January 21, 2016

SSIS: An Item With The Same Key Has Already Been Added

Recently I was working on a new project and was trying to deploy my SSIS project with several packages to the catalog for the first time. I received the error when trying to build the project:

This occurs when e.g. you copied a (package) connection manager to another package and later promoted one of the 2 to a project connection.
Let’s say you have package A and B, both with the same package connection manager ConMgr. When you promote ConMgrof package A it will become (project)ConMgr, but in package B it will still be ConMgr, the package connection, and the new project connection will not be shown.

(I found my solution @ SO.) By deleting the package connection ConMgr (in package B) the project connection will become visible in the package and (in my project) succesfully replaced the connections in all data flows. It could be that you have to go through all components that referenced the old package connection to redirect them to the (project)ConMgr instead.

Hope that helps!

Monday, January 18, 2016

SSRS: Sorting in Particular Order in a Report

This week I had the need to order values in a matrix in SSRS in a particular order. The names need to be ordered in alphabetical order, except for one name that always needs to come first. I’ll show you how I did it with a sorting expression in the Group.
I’ve taken a (light-weight) version of AdventureWorks for the examples.

Let’s take the Sales.ProductCategory and Sales.Product tables as an example. I’ve counted the number of Products of the 4 main (parentless) ProductCategories:

The sorting in the Row Group Name is automatically done from A-Z. If you want it in any other order you’ll have to set it explicitly. You can either pick a(ny) column and set it to sort A-Z/Z-A or you can enter an expression. We’re now going to implement the latter.
When you click on the arrow of the Row Group Name in Row Groups box at the bottom of the screen and click on Group Properties… you’ll end up with the following screen:

We want to leave the existing sorting expression as it is, because we can use it later. Add another row and click on the fx button of the new row to open up the expression dialog box:

By entering the formula you see in the picture above, you’re saying to the sorting engine: Whenever the value of the field Name is equal to “Clothing”, give it a sort order of 0, otherwise give it a sort order of 1. When ordering from A-Z 0 comes before 1 so “Clothing” always comes before the rest. You can adjust this to your needs ofcourse to make a specific item come last, or sort all the items in particular order by nesting IIF statements.
When you click OK and click on the up arrow to sort on this expression first you end up with the following sorting options:


Sorting on the Group is first done on the expression, so “Clothing” comes before anything else, second alpabetically on the Name, so the rest of the values are placed after ”Clothing” from A-Z. This gives me the same values as before, but now sorted differently: