Tuesday, August 30, 2011

iOS: Army of Darkness Defense on the iPad

This blog post provides a quick and easy solution for this game that will allow you to get through the 50 levels in a few hours with minimal risk.

I really enjoyed this game, I guess it's an appreciation of the film as well as my general like of the Tower Defence - style games.

One line summary; Use the Peasants!
Level 50: Charge of the Peasants!
Just pump out Peasants. Don't worry about anything bigger and "better". Just upgrade the smithy and keep pumping out Peasants as quickly as you can get the resources.

There. That was quick and easy wasn't it?

Now here's why;
Peasants cost 5 so you can pump them out pretty fast (especially when you can get the smithy up to level 3) and they do a fair amount of damage if you keep upgrading them. At level 11 (yes, they go to 11) they do 301 damage and have a 1337 health.

Compare this to, for example, the Spearman who costs 15 and at MAX level does 459 damage and has 945 health. Ok, that's more damage but you can have THREE Peasants for the cost of one Spearman so technically they are about to do 903 damage with 4011 total health. They will also attack more rapidly (having in effect 3 attacks to the Spearmans 1) so they do the damage more quickly and therefore reduce the chances of being damaged back.

This comparrison becomes even more pronounced when you are looking at the higher level Troops like Arthur (cost 55), Horseman (cost 45), and Henry (cost 65). That's 11, 9 and 13 Peasants respectively (or 3311/ 2709/ 3913 damage) - how can even a fully upgraded Arthur compare with that?!

And let's not forget the "Sword Boy" upgrade to the Peasants replaces their pitchforks with swords and so upgrades their damage still further!

With an Army of Peasants behind you you are much more likely to die because of your own risk-taking (aka. "Coin grabbing") than due to the Deadites getting to the book.

Level 50 Solution: Now this is really hard, it's unlikely you will manage to do it on your first try and end-of-game baddie is really tough. The key though is to get rid of his army and leave just him. I used the Deathcoaster in combination with Peasants and Archers to wipe out his supporting army and then, because of his slow attack speed, you can just pump out peasants and he is only able to kill one a hit and as you can pump them out faster than he can kill them it's just a matter of time until he dies (slamming him with a few additional Deathcoasters helps though!).

And here are the risks;
Occasionally you get enough Peasants together to allow the Deadites to gather into a large group (much more likely on the later levels) I tend to use the Deathcoaster to break these up wherever I can as well as some intervention with Ash and his Boomstick can also help. As the Peasants arrive one at a time to the large group of Deadites it can be very difficult to stop them but they key is just to keep pumping out Peasants

On Endless mode you get swamped so quickly that it's not really possible to just use Peasants - if you are looking to play the Endless mode you might want to make sure, despite using Peasants to complete the 50 levels, you keep your higher ups upgraded!

Friday, August 26, 2011

Opening Ports On Your Virgin Media Super-Hub

This blog post provides a simple walk-through that will allow you to open up ports on your Virgin Media Super-Hub. One reason why you might want to do this is to enable your iTunes/ AppleTV to talk to the internet time servers so you can play rented content.

NOTE: If, after you have followed these steps, the port is still not accessible then you need to do a full reset of your Super-Hub and then try again. Very annoying but unfortunately this is what Virgin Media themselves recommend.

Go to the Virgin Media Super-Hubs administration website;
Super-Hub: Main Administration Portal Logon Screen
The username and password are on a sticker attached to your super-hub. Enter the details and click on "Continue" to log-in;
Super-Hub: Standard Configuration Page
This is the standard configuration screen, at the middle in the bottom there is an "Advanced Settings" link. Click on this;
Super-Hub: Advanced Configuration (Main Page)
This is quite a complicated screen with lots of links down the side. The one you're interested in is "Port Triggering", it's in the "Advanced" group;
Super-Hub: Port Triggering Window
In order to open a port you now need to enter the port address and select the protocol (or just leave it as "Both" if you're not sure).

Click "Apply" (making sure you've checked the "Enable" checkbox!) and then the port will be open.

Identifying The IP Address Of Your Router

Go to the Windows start menu and into the search box type "cmd.exe" - this will bring up Windows command-line interface;
Windows 7 command-line interface (cmd.exe)
Your view will be slightly different depending on whether or not you're running Windows 7. It doesn't really matter through as the functionality is only slightly different.

Type in the following;

ipconfig

There will be a large amount of text flashing past on the screen;
Windows 7 ipconfig output
You need to go back through it and look for key items. Depending on whether or not you have a Wireless or a Wired (Ethernet) Connection you need to find the value for "Default Gateway". In the screen output above the IP address you would need is 192.168.0.1.

In the diagram 1 is the wired connection, 2 is the wireless connection - often they've the same (as in this case). If you have both and they're different then you should pick the Wired connection as your first try.

Type this IP address into a web browser (i.e. http://192.168.0.1) to get to your router.

NOTE: If you are connecting to your Router Wirelessly then some routers can be configured to only allow wired connections to access the admin website. If the above address does not work and you are trying to connect wirelessly then you need to switch to a wired connection and try again.

Friday, August 19, 2011

SSRS: Migrating Reports from One SharePoint Server To Another

Sounds easy? Problem free? Think again ...

This blog post is a step-by-step guide to copying a Report (consisting of a Report, one (or more) Shared Datasets, and a Data Source) from an existing Microsoft SharePoint 2007 document library into another document library on a different server (such as you might want to do when taking a production report into development for enhancement).

You can probably thing of at least three ways to do it off the top of your head;

1. Save each item into a file on your local disk and then upload them to the new server using the standard "Upload" button on the document library
2. Highlight each item in turn and under the menu choose "Send to" and then "Other Location" and specify the location of the document library on the new server
3. As 1, except "hack" the report file so that it works.

Way 3 works so you might want to jump straight to that bit if you're in a rush. I'll go through 1) and 2) and let you know why they don't work and explain some of the errors you'll encountered if you try them (and what probably got you to google for a solution anyway!)

0. Just Create the Data Source
It's much easier than trying to copy it - just create a new one.

1. Save and Upload
Locate your dataset on the existing server;

The dataset I'm going to be working with is called "Parameter Default Values" and is highlighted in the image above.

Bring up the menu for the affected dataset and then choose "Send To" and then "Download a Copy". Then you should be prompted to save the downloaded file to local storage.

Next locate the dataset library on your new server;

Choose the "Upload" button (as highlighted above) and then "Upload Document";

Select the file you just saved the data set to and click "OK".

Click "OK".

The report file has now loaded, apparently correctly, into the Document Library. Unfortunately it's not actually worked and is in an unusable state. To show this highlight the new data set and choose "Manage Datasource" from the popup menu;


The text of the error is;

The item XXX cannot be found ---> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The Item XXX cannot be found

You'll notice that the URL's for the error message feature the OLD server. The file has been migrated with hard-coded links and unfortunately the new server does not allow you to update these links so what you're left with is a problem that you can't fix (well, within SharePoint anyway).

You have to question whether the "Upload" button should actually be enabled for importing SSRS items as it doesn't work.

2. Send To > Other Location
Locate the dataset on the original server;

Hover over the data set and choose "Send To" and then "Other Location";

Enter the URL for the new document library (click to test).

Click "OK"

And this is as far as it gets ...

And now you need to try and stop it "copying". The only way I've found to do this is to kill the process in Task Manager. 

It's possible that there could be some strange permissions problem but, to be frank, I've clicked "Test" and that worked so why wouldn't the copy??!! Very poor process design Microsoft ...

3. Export/ Edit/ Upload
And here is the "working" method for migrating items between two servers.

Migrating Data Sets
Locate the data set on the original server;

Bring up the menu for the affected dataset and then choose "Send To" and then "Download a Copy". Then you should be prompted to save the downloaded file to local storage.

Open the locally downloaded file using a text editor (I prefer Notepad++ but practically anything will do);

There are TWO places in the downloaded data set where the URL of the Datasource and the Reporting Server are stored. Thankfully they are located at the top and bottom of the file so don't require much searching!

Locate the two entries (search for DataSourceReference, and ReportServerUrl) and update the URL's to point to the new server. Save the edited file.

Next locate the dataset library on your new server;

Choose the "Upload" button (as highlighted above) and then "Upload Document";

Select the file you just edited and saved and click "OK".

Click "OK" (we don't want to change anything).



The report file has now loaded, apparently correctly, into the Document Library. To verify this select the data set and choose "Manage Data Sources";

Seems to be working (well if it's not you can at least change it!).

Migrating Reports
Ironically this works in exactly the same way as migrating a report from a non-SharePoint server (that I have documented here).

Thursday, August 11, 2011

SSRS: Migrating Reports to SharePoint Integrated Mode

This blog post covers the process of migrating a report from Microsoft SQL Server Reporting Services 2008R2 running in non-integrated (i.e. non-SharePoint) mode to a different server also running 2008R2 but running in SharePoint integrated mode.


A Little Background
This is important as it will affect the steps you need to take!

In our environment we split the various parts of the report (Data Source, Data Set, and Report) into separate files. This allows multiple datasets to share a data source, and multiple reports to share a data set. It's a fairly useful design.

If you don't do this and just bundle everything into the Report - your maintenance must be a nightmare if you have a large number of reports! - then all you need to do is the single "Migrating the Main Report File" step below.

I suspect (hope!) that most large companies will do it our way.

Finding Items To Migrate
There are three parts to a report; Data Source, Dataset, and Report.

Steps to identify the bits to move are given below.

Identifying The Report
Find the existing report you wish to migrate on the non-integrated server. In this example I'll be migrating the "AP Separation Monitor" report;



Identifying Any Datasets
Hover over the report name until it's menu appears and then select "Manage";


Click on "Shared Datasets" in the list on the left side;

Make a note of these "Datasets".

Identifying Required Data Sources
Find each of the datasets identified above and "Manage" them;

Click on "Data Source" in the panel on the left;

Make a note of this data source.

Migrating The Main Report File
Hover over the report name until it's menu pops up and then select "Edit in Report Builder";

Choose "Save as" from the Ribbon menu;

Click on "Recent Sites and Servers" at the top left on the pane on the right;

This displays a list of all the recent sites and servers you have used. If your new SharePoint server is not in the list then you'll need to create a new instance of Report Builder and create a new report on your new server (which you can then delete) in order to get the Site/Server to appear in this list.

Select the new (Integrated mode) server you wish to use.

You are now presented with a list of all the document libraries in SharePoint and you need to pick the one in which you want to save the report. I'm going to use "Reports LIVE".

This is a list of existing reports in the document library. I'm not planning on changing the name so just click "Save" (you will get an error);

The key part of the error is "The report definition was saved ...". The errors are due to the data sources not being exactly identical on the new server with what they were on the old server. Clicking on "Details" for my report I can see the error text is;

The report 'http://xxx/Reports LIVE/AP Separation Monitor.rdl' contains a reference to a dataset that is not valid. Verify that the shared datasets that are required for this report are deployed to the report server.

As we haven't moved across the datasets yet this problem is expected.

Close down report builder.

Migrating a Dataset
The process for migrating a dataset is almost identical to the process for migrating a report (so I'm not going to reproduce the image).

Hover over the data set until it's menu appears and choose "Edit in Report Builder", use "Recent Sites and Servers" to point to the new server, select the document library in which you want to save the dataset (I'd recommend a different one to the report!) and click "Save". You get an error, but it's different;

Note the key difference that you're not seeing a "The report definition was saved ...". It has been saved, but the message is much more worrying - still just as irrelevant - but it looks more worrying.

If you click on "Details" then the message gets truly bizarre;

"The path of the item '/Data Sources/NOETIX_R12TEST' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: The path of the item '/Data Sources/NOETIX_R12TEST' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash."

This is a rubbish error message (Microsoft take note) but it doesn't matter as the dataset has been saved;

Close down Report Builder (you will be prompted to save again, just ignore that and click "No").

Migrating The Data Source
Don't. Just create a new one. It's genuinely not worth the hassle of migrating an existing data source - all your passwords will be cleared anyway so why bother?

On our new folder Data Sources live in the Data Sources document library;

You'll only need to do this once for each Data Source.

Connecting It all Together
Looking at the Report/ Dataset/ and Data Source information we have from the old server the structure we need to configure on the new server is;

Joining Dataset to Data Source
Go to each of the datasets on the new server hover over them until the menu appears and choose "Manage Data Sources";
This shows you (via the yellow triangle) that there is a problem with the Data Source. Click on the link (called DataSetDataSource) to get the properties;

As you can see from the error message (The linked data source could not be found) you need to specify the Data Source Link. Click on the elipse to locate it or just type the full name into the box. In the case of this example the Data Source we are after is;

http://xxx/Data Sources/NOETIX_R12TEST.rsds

(If I'm going to convert a lot of reports I tend to have strings like this in Notepad somewhere as, if you try the ellipse, you'll see that it's not exactly quick identifying the data source that way). Once you've found/ entered the Data Source click "OK and it will be verified.

Click on "Close"

Joining Report to Dataset(s)
Find the report, hover over it, and select "Managed Shared Datasets";

In this specific report we have two datasets that aren't configured correctly. Click on the link (we'll start with APSeparation Monitor);

Click on the ellipse;

As I have separated the datasets from the reports there are no datasets in the default directory (the reports directory) so click on "Up" and navigate into the datasets document library;

Select the "AP Separation Monitor" dataset (the one we recorded earlier);

The link is actually the URL of the Dataset;

http://xxx/Data Sets/AP Separation Monitor.rsd

Click on "OK" and the link will be verified.

The first dataset has now been fixed, repeat the process to fix the second dataset. You'll notice that the dataset links aren't obviously named so it's worth writing down the names from the old server (which you did earlier ... right?) rather than hoping to remember it when you get to this stage.

Click "Close" when you've completed the fix.

Test the report and you're done.

Tidying Up
Ah yes, now you've moved the report across you really should be getting rid of the old one. If it's a big migration job it really helps to not complicate things further by leaving items you've already migrated on the existing server. Equally though you don't want to break anything.

The easiest item to remove is the report - these can be deleted straight way as nothing can really be dependant on them (if you've separated everything correctly!). Find the report, hover over it, and select "Delete" from the menu.

As there is a possibility of a dataset being used in a different report you need to check. "Manage" the dataset;

Click on "Dependent Items" on the left;

As you can see the message;

"There are no items that use the "/R12/Finance/Shared Datasets/AP Separation Monitor" dataset."

Is being displayed meaning that there is nothing (now we've deleted the report) that used the dataset so we can safely delete it (go back to "Properties" on the left and click "Delete").

Now looking at the other dataset and doing the same check;

This shows that there are a large number of other reports that are using this dataset so it should be left alone rather than being deleted (why Microsoft doesn't do this check and give you a warning when you do a delete is beyond me!).

And that's it. We now have a report running on a different server. There is slightly more tidying up to do to ensure that the SharePoint details for the Report and Dataset are up to date (for example the Dataset description will not have been copied across).