Friday, July 8, 2016

Mac Notes - Moving the Dock

I purchased my first ever computer (actually MacBook) with OS X under the advisement of a student counselor of an online school I'm attending now. I still love my PC laptops and desktops and will continue using them. I'm only using this laptop so that I can get used to the OS X environment in the event I go to work for someone that only has that platform.

The only thing I've done on it so far is go through my online course and install VPN software in case I ever need to remote into work.

Anyway, just going to start a list of notes mostly for my personal use. If it ends up helping someone else out, then great.

First topic, moving the dock from the bottom to the left side.

Launch System Preferences --> Dock

Then choose the radio button that suits your preference in the Position on Screen area.

Friday, March 18, 2016

Obtaining 3 month character representation of the month in Excel

Posting this for others and for myself in case I forget the next time I need to use it.

I'm trying to take a date in Excel and turn it into a 3 character representation.  I know how to do that using TSQL but others I work with that don't have access to TSQL tools and don't know how to script can also do some data formatting on their own.

I inserted the date...

3/18/2016

...in cell A1. In B1, I inserted what I thought the function would be but it didn't work...

=MONTH(A1)

This formula gave me a 3 in return instead of Mar. I was 99% sure that Excel had to have a function for this so after doing a Google search, I found what I was after and more.

 There was a post that stated to use this formula...

=TEXT(MONTH(A1),"MMM")

...but that gave me Jan in return which is not good because the date I keyed in was March. I found an explanation of what that combination of functions did. 

Using MONTH() only returns a number 1 through 12 depending on what date is in the cell. If you type in 1 in cell A1, 2 in A2 and all the way down to 12 in A12, convert that column to a date and you'll see that those are the first 12 dates in January of the year 1900.

If you have a number that includes or is between 1 through 12 in this formula...

=TEXT(6,"MMM")

...it's always going to return Jan as the month.  The fastest way to get the 3 character representation of month is just to use the TEXT() function and not the MONTH() function.

=TEXT(A1,"MMM")

Typing that function into cell A2 when the date (3/18/2016 for example) is in A1 will give...

Mar

After doing my Google search, it came to me that if I right clicked on a column that has dates, click on Format Cells... click on Custom, and then in the Type: field type MMM, that would give you the same result.

Thursday, February 25, 2016

Java Error 1603

I was getting the error 1603 for a few months when trying to update Java.  Then I decided it was time to dig into the problem.

My google searches weren't helping. To me, spending more than 15-20 minutes is a long time to search because normally the search results I get back explain how to fix issues usually within a few minutes.  I had spent 40-45 minutes trying to fix my issue.

I'm using Windows 7 (it's a work machine). Normally when I try and pass the buck by asking our (outsourced) help desk for help on issues I have with my machine, they go down the wrong path and sometimes they cause more issues.

I tried many different suggestions but none seemed to work. I had high hopes for these suggestions but they didn't work either...

http://java.com/en/download/help/error_1603.xml

I ended up taking suggestions from different forum posts and performing them in a different order to solve my issue with updating Java.

I uninstalled Java and couldn't reinstall. Forum posts kept telling me to reboot and reinstall Java but that 1603 error kept coming up.  I tried the 32-bit and the 64-bit offline installers as well.  Because I had uninstalled Java and the error kept coming up during the install, in my mind, I didn't have any Java files on my machine at all.

I came across a forum post that suggested to do a Start-->javacpl.exe     That's when it clicked that maybe some files were either left behind or some files made it back onto my computer during my repeated reinstall attempts. The suggestion was to start the Java control panel, click on the Security tab and deselect "Enable Java content in the browser" option.

After I did that, I close the control panel and searched to see if I had left over files from the 64-bit version reinstall attempts I performed.  I didn't see any so I then tried to install the offline Java installer and it finally worked.  After the install completed, I went back into the Java control panel and re-enabled "Enable Java content in the browser" option.

Thursday, February 18, 2016

SSRS adding extra page or white space when exporting to PDF

My employer has software that runs Crystal Reports (ver 9) out to PDF files every night to a shared network drive.  I've been tasked with converting all of those reports over to SSRS and by using the subscriptions to generate these reports. When I started with my first report and did an export out to a PDF file, it kept adding extra blank pages at the end.

Here are the specs of my environment...
1. SSRS 2008 (installed directly on the db server)
2. Report Builder 3.0
3. Windows 7 workstation

From previous experience I knew that I couldn't expand the body of the report out past a certain point but I couldn't remember what that was.  I expanded the width out to 8.5 and I didn't touch the margins.  After playing around with the margins and the body width, I found out that I had to take the body width and subtract that by both the left and right margins and if it was greater than 8.5, it was going to push white space onto a page that should show up to the side of it but it looked like the next page.

So, in short, to keep extra white space from showing up at the bottom of an SSRS report, take the body width subtract left margin subtract right margin which should be less than or equal to whatever you would be printing to...in my case to a PDF.