FREE EPRINT: Summary of activities 2020, Journal of Maps

Tuesday, 2 March, 2021

Mike J. Smith (2021)
Journal of Maps


If there is a zeitgeist that is defining academic publishing at the moment, then it would be open access (OA). I wouldn’t go as far as to say that it is sweeping all before it, but it has far outgrown the idealism evident at its inception. That idealism has long been ingrained in scholarly communication: the notion that knowledge should be widely shared for the benefit of all.

FREE EPRINT: Summary of activities 2019, Journal of Maps

Tuesday, 2 March, 2021

Mike J. Smith (2020)
Journal of Maps


If I was to try to define what a university is for – in the briefest of statements – then it would be the pursuit of knowledge. This easily covers research (the pursuit of new knowledge) and education (instructing others in the pursuit of knowledge). Therein lies the altruism within the university system where, as academics, we are interested in curiosity driven understanding in its purest form: because it is simply unknown to us.

Cycling Winnets Pass

Monday, 2 November, 2020

The ride over Winnets Pass, was from Hathersage and went along the busy Hope Valley road. I had a light lunch, filled the water bottle, did about ten minutes of stretching and then set off. The first few kilometres were a gentle warm up keeping the pace steady and easing the muscles in to a fluid rhythm. I ate a Mars Bar and began drinking fluid, keen to prepare my hydration and boost my energy so that it was on tap when I hit the hill.

There was a slight headwind, but the road was fast and only about 10km to Castleton, the start of the climb. I raced in to the village swung through the right angle bends, dropped down over a mini roundabout and then started a gentle climb up to the left turn on to the hill proper. The gradient was shallow and I stuck in the middle ring. Steepening slightly, my pace slowed a little before rattling over the cattle grid and past the car park. I dropped to the bottom chain ring but stayed in the saddle.

It was now a “proper” gradient; not steep but enough to pump the legs and strain the lungs. I kept the pace steady and continued in to the deep gouge that is Winnets Pass. The route became more ravine like, casting a deep shadow over the road, the steep sides rock strewn, clinging on almost ready to implode in. I was entering the guts of the ride and with it came at gnawing, cloying, feeling. I clung on, keeping a steady rhythm going. Ahead I could see the road bend sharply to the right, steepening yet more. As I reached the turn I stood on the pedals for the first time, giving a little boost as the slope steepened. The view ahead was an implausibly steep section of tarmac that passed from view around a distant bend. I knew I had to grind it out so kept pushing, turning the cranks. The change in gradient rapidly began taking its toll and I realised that the road was too steep and the gearing too high (30-23), to stay in the saddle. I’d need to stand on the pedals and power through the section; I shifted my weight forward, leaning in to the climb and stood up. This increased the force on to the pedal on the downstroke which enabled me to slow the cadence. More strain was transferred to the arms as I ground my way up, one pedal stroke at a time. After a few metres the pain in the calves and strain on the forearms became too much and I shifted to sitting in the saddle to relax and recover a little.

My pulse had rocketed, my heart pumping and throbbing riotously in my chest. The cranks slowed and I had to switch back to standing on the pedals. I slowly tracked my way up the slope, alternating between standing and sitting, with each change my calves and arms becoming more and more painful. My chest was now heaving, my breathing rapid and deep. I slowed again. The pain in the arms was becoming unbearable; I couldn’t stand on the pedals, yet I couldn’t sit in the saddle and maintain the climb. I looked ahead and the bend seemed painfully close yet unattainably distant at the same time. Could I make it? How much further was the climb beyond the bend? My chest heaved, my arms and shoulders screamed in agony, the calves throbbed in pain. I unclipped my left foot and stopped, slumped over the handlebars, gasping for breath. I couldn’t move, frozen in the moment, with my muscles in painful constriction and unable to think or see straight.

I focused on deep, rapid, lungfulls and after about a minute my pulse came down. I looked up, readied myself, then pushed forward. The bike briefly teetered before I clipped in and started pedaling. The arms were tired but partially recovered. I alternated between standing and sitting; it was bearably painful as I continued up to the bend and around. Up ahead was another cattle grid after which the gradient significantly eased and about a hundred metres further on the climb ended. I was exhausted but set myself on auto-pilot and continued grinding the legs around and around before reaching the top. I ‘d done it. With one stop. Next time…

Importing and Editing Routes in MapMyRun

Sunday, 27 September, 2020

The free version of MapMyRun has a great route planner built in that I’ve found to be based upon some of the most reliable base mapping and can auto-follow roads very well. The elevation estimates also seem to be fairly reliable. Once you’ve finished your route you can download it in KML or GPX format for your device which is all great.

MapMyRun won’t let you import route files (i.e. tracks without timing info) so if you are given a new route to follow and want to edit it first, there is no easy way to go about doing this. After a little convoluted searching I’ve found a way around this limitation.

  1. MapMyRun expects timestamps in the tracklog, so the trick is to spoof this information to allow you to import it. GOTOES has some really useful Strava Tools, one of which is the “Add or Adjust Timestamps” which does exactly this
  2. Login in to MapMyRun and upload your new Workout
  3. View the Workout and at that point MapMyRun will automatically create the Route. Just go to “My Routes” to see it and edit it!

All in all a very useful way to work with route data

Bryton Rider 450: Tracklogs, Following Routes and a Hanging/Frozen GPS

Thursday, 10 September, 2020

I’ve just started doing some audaxes and whilst GPX routes are often supplied, you can often start at any point. This made me wonder whether you could follow a route on the Bryton Rider 450 from any point along it. The good news is that - yes - you can, however that comes with one major problem. When you get to the end of the route the map screen goes blank and tells you you’ve “Arrived”. What I want it to do is just carry on from the beginning again which the Rider 450 won’t do. This is perhaps unfair behaviour to expect of it and maybe an “edge” case, which means the route would have to be digitised again for your starting point.

The tracklog does carry on recording and this goes to show that the tracklog and map routing are completely separate activities running in parallel on the device. Precedence is giving to tracking as this is highly time dependent. It explains why the maps take time to refresh and the longer the routes get, the longer they take to load. This can at times can give the impression that the unit has frozen, when in fact it’s reading the whole route back in to memory, taking the current GPS coordinate, loading the correct map tile, then plotting the breadcrumb trail over the top. On one ride, I had started following a route, but for the first 20km rode using the data screen as I knew the roads to follow, I then switched to map view and the Rider 450 took more than 5 minutes to refresh the map. This would suggest to the rider that it was frozen, but the distance and cadence fields were live, so it was clearly working. My guess is that it records the last map shown on the route and then iterates through every position along the route until the it matches the coordinates from the GPS, then refreshes the tile. This is hugely inefficient, particularly for long routes but simple and probably computationally easier to accomplish at the expense of significant time.

It also further highlights that the map screen doesn’t refresh until new information is ready to display, again behaviour that might suggest it’s frozen (and indeed it may lockout other actions until this is complete). Crucial to this series of events is being able to get a GPS coordinate: if it can’t do that, the map won’t update. This means that if your system can’t get satellite lock (in a tunnel, under trees etc) then the maps remain frozen until a coordinate is supplied. The tracklog however should carry on recording (doing whatever the recording algorithm dictates for a lack of current coordinate) in these situations.

The key then is patience and just carry on cycling with one BIG caveat. If you genuinely do have a frozen Rider 450 then it will need rebooting! Remember that means pressing and holding the four side buttons for a few seconds, then releasing them. Once rebooted it then needs to go through the whole process of satellite lock and getting a first coordinate - this can take minutes the first time after a reboot. I have also tried waiting on a number of occasions and once it carried on working and on the other the unit remained frozen. The latter problem came when I suspect the unit didn’t have satellite lock and I tried to change from the map to data screen (or vice versa) freezing operation. It is possible that this is a genuine bug that crashes the unit and I can definitely say the tracklog doesn’t carry on recording. The only solution is a reboot, which is certainly necessary if you want to use the maps/data.

I’ve also noticed that refreshjng the map and the lap timer can well conflict. My timer is set to a fairly rapid 2km (4-5 minutes) and the map often tries to refresh when the timer is due to roll over. The latter is given precedence which again freezes the map display. My best guess at the moment is don’t try to switch in/out of the map screen when this is about to happen.

A later post will talk about what to do with the corrupt files!

Forcing a Public WiFi Login Page to Load

Wednesday, 9 September, 2020

WiFi (and internet access) is so endemic that we often think of it as an essential utility rather than a useful add-on and it’s got to such a point that just about every restaurant offers some kind of service. Whilst inherently less secure that private WiFi, they can be great to jump on to in order to download some Netflix shows or update some apps. The default action once you’ve connected to a service is to load a default login page in order register and verify your credentials. However problems arise when the default page doesn’t load. This has happened to me for three reasons:

  • Puffin Browser: it’s a great mobile browser that is fast because it saves data. It does this by pre-loading the page at a server then sending you compressed versions. By default, this means that the Puffin server is trying to access the login page, but obviously can’t because it’s not on the network! The solution is to use a “normal” browser such as Chrome, Brave, or Firefox.

  • Alternate DNS: if you’ve changed your DNS to try to speed things up and have a little more security then this might be the cause of your problem. The login page will be unique to the WiFi network, so asking OpenDNS or GoogleDNS to do a DNS lookup will fail. The solution is to remove this setting and then use the DNS provided by the WiFi, which will allow your browser to load the login page.

  • Browser Cache: if you’ve visited a website before then it’s possible the DNS lookup will have been cached. You try to go to the site again, it bypasses the login page and then can’t load the remote site. The solution is to avoid using cached data and then force a new page to load. The simplest solution to the first part is to start a new incognito page which is sand-boxed and can’t access an cache information. Loading a new page ideally requires an http connection (not https as this won’t allow redirection to a login page for security reasons). These are much rarer than you might expect, however ICAAN’s example.com is a great option.

The third one crops up more often than you might expect, so it’s good to have this fix in the bag!

Bryton Rider 450: Downloading Raw Workout Data

Tuesday, 7 July, 2020

In my earlier post I noted a couple of “bugs” that would be good to fix and one of these was downloading workout data (locations and sensor readouts) from the device, app, or Bryton Active website. There is no button to press or link to click to do this, but it does exist and is actually much lower level than this!

At it’s simplest, the Rider 450 is simply a data logger with a built-in GPS that can also link to other ANT+ devices and record all of the sensor data. It writes the data to a file using Garmin’s binary FIT file format (Flexible and Interoperable Data Transfer Activity file) which is simple, small, and flexible. When you plug your Rider 450 in to your PC, it mounts the device as a drive and all the FIT files are in the top directory. You can just copy them straight off!

So what can you do with them? DC Rainmaker has a handy list of bike related software including many to manipulate FIT files, however here are a few worth looking at:

  • FIT Conversion and Repair: from Steve Gordon, this site allows you upload and convert or repair your FIT files. Simple and easy.

  • FIT File Tools: a very handy select of FIT manipulation tools, including merging tracks, so if you accidentally split your workout then this can splice it back together.

  • GPSBabel: the Swiss Army knife of tracklog manipulation, GPSBabel supports FIT files and allows you to convert them in to a range of different formats. Originally a command line utility, it also has a GUI which runs the command line in the background. I wanted to convert my FIT file to a text file (CSV) and it didn’t work because (I think) the GUI didn’t produce the right command line. You want to be using something like this:

gpsbabel -t -i garmin_fit,allpoints=1,recoverymode=1 -f my_workout.fit -o unicsv -F my_output.csv

Bryton Rider 450: Desired Features and Bugs

Friday, 3 July, 2020

This will be a “live” list as things come and go, but I thought I’d start putting down some things that would be good to add or fix:

Desired Features

  • Reverse a route: I’ve planned a route one-way. It would be handy if you could reverse the route once you get to your destination and then follow the navigation back. Maybe too much to ask.
  • Read full notification: notifications only show you the first ~11 characters. Would be good to see an entire message
  • Join tracks: I’ve accidentally stopped and then restarted a track when I’ve been recording it which is irritating as your stats are then calculated separately for each one. The ability to join tracks together.
  • Download Data: would be great to be able to download the raw data from Bryton Active
  • Navigation Screen: you can tailor the bottom row of the navigation screen to show any of the data fields available. If you are not following a route, then speed is shown in the top-right, if you are following a route then it changes to “distance to go” in the top-left. It would good to make the top row configurable.

Bugs

  • Distance to Go: if you are following a route, then the map page shows you distance to go to the finish, however it overestimates this by 15-20%. Quite why I’m not sure as I know the route length from the route planning application and when I get to the end the distance is the same
  • Turn By Turn Instructions: if you are following a route and switch from a data screen back to the map page, the next turn instruction will be out of date and won’t update until the instruction refreshes at the next turn.
  • Lap Timer Error: I’ve set the auto-lap to give me a time every 2km, however if the auto-pause kicks in (e.g. at a junction) then this isn’t subtracted from the lap giving a timing error. The correct time is produced after the ride so it’s clearly correct when the stats are produced, but not during the ride itself.
  • Max Number of Lap Times: I did a 300km ride a few weeks back I when I got to auto-lap 130 (2km each) it stopped recording them. Is this an in-built number of laps it can record?

Bryton Rider 450: tips and tricks for use on the bike

Tuesday, 23 June, 2020

I’ve written earlier about tips and tricks for route planning with the Rider 450, so in this post I wanted to cover tips for actually using the unit on the bike. So in no particular order:

bryton_rider_450.jpg

  • Fit: out-of-the-box the Rider 450 comes with a standard handlebar mount. It’s cheap and works well enough, but uses up valuable bar space. There are two other options worth considering: a stem mount or out-in-front mount. The former is a bit more efficient on space, but perhaps not quite so good if you are tucked down.

  • Learn the Buttons: it goes without saying, learn how to use the unit.

    • 1. Two Operating Modes: I found it slightly counter intuitive to have two different modes. A “cycling” mode and a “settings” mode which you can switch between. The RightTop is a “start” or “OK” button depending which mode you are in, whilst the RIghtBottom is a “pause/stop” or “Back” button.
    • 2. Zoom/Scroll: the two buttons on the left are for scrolling up and lists, except when you are using the map when they zoom in and out (useful!)
    • 3. Map Modes: the BottomLeft changes between cycling mode screens. There are up to 5 data screens you can set up/switch off (in the app) which support a range of different layouts, followed by a navigating/map screen.
    • 4. Power/Light: the BottomRight is for power and light.
    • 5. Reset: the 450 has frozen twice on me now. To reset you need to hold all four side buttons and then release. It will take the GPS sometime to get satellite lock so be patient.
  • Learn the Icons: there are a number of icons at the top and bottom of the screen. There is an efficient use of space so know that they mean as they are useful. For example, the arrows indicate if you are riding above or below the average speed.

  • Start/Stop a Ride: be careful pausing a ride as my natural inclination is that once you pause a ride, you press the same button to start again. But no! That stops the ride and all the recording that goes along with it. Unless you really have to, just left the auto-pause kick in and then restart. Leave the buttons alone!

  • Laggy Screens: all the screens are very responsive except for the map and data sync screens. If you load one of these, wait a few seconds for them to complete.

  • Notifications: these are a step ahead of the competition as you can set up the app to send notifications from any app (not just texts). This is great, however bear in mind it is a 3-line notification that is limited to 11 characters (ish) of text per line. It shows the app, the sender’s name and the message. Anything longer that 11 characters will be truncated. This is frustrating because how hard would it be to allow the notification to fill the screen and then enable you to scroll through it? That’s any comments aside regarding how safe that might be to do.

  • Sensors: the Rider 450 supports bluetooth and ANT+ sensors. I’ve fitted a cadence sensor which works flawlessly. No problems there.

  • Bugs: so far I’ve found the following two significant bugs:

    • Distance to Go: if you are following a route then the map page which show you distance to go to the finish. Except it overestimates this by 15-20%. Quite why I’m not sure as I know the route length from the route planning application and when I get to the end the distance is the same
    • Auto Lap By Distance: another useful feature so you can see your splits except I can’t get the setting to sync across from the app to the Rider 450, but you can set it on the Rider 450 itself.

SSRS Subreport Reports “Error” for a New Data Column

Tuesday, 23 June, 2020

This “bug” took me a while to track down… I have a report which embeds a subreport and returns the data to it. Along the way I realised the subreport needed an additional column. I edited the SQL in the Dataset and then reran the subreport. It loaded correctly. I then went back to my main report and ran it to find that the new column was returning “Error” for all values.

I tried recreating the subreport Dataset, the embedded object in the main report, and eventually the whole subreport itself. None of these worked. What was actually causing the problem was the Visual Studio cache that was created when it first ran the main report. Because I had subsequently edited the subreport, it was returning an extra column which it wasn’t expecting and so throwing an error. I’m not sure if there is front-end way of rebuilding the cache, however the simplest solution was to delete the .data file in the report folder, and the “bin” subfolder. These are then rebuilt the next time the project is opened.

Bryton Rider 450: route planning tips and tricks

Friday, 19 June, 2020

I recently took delivery of a Bryton Rider 450 which, whilst not as polished as the offerings from Garmin or Wahoo, is significantly cheaper. The 450 sports GNSS support across 5 different satellite systems, on-board OpenStreeMap maps, and ANT+/BT connectivity. The specs are certainly up there, but parts of the product are a little rough at the edges.

bryton_rider_450.jpg

This post provides a number of tips for working with mapping on the 450. In no particular order:

  • Bryton Active App: install the Bryton Active app
  • Install Maps: maps come pre-installed but if your locale isn’t already on there, head over to the Bryton Support area and then click on the “Download” menu item on the left and then click “Map” (on the left menu). From here you can download all of the maps, along with instructions for installing them
  • Route Planning: Bryton provide their own route planning tool both on the Bryton Active website, as well as in the app. They’re both a little clunky and not as good as alternatives such as RideWithGPS or MapMyRide however they do work reasonably well once you’ve got used to their foibles
  • Route Syncing: remember that the app syncs the route to the Bryton Active website. You then need to do a “Data Sync” on the 450 which will download the route
  • Sync a Route: if you are planning a route in the app, then remember to hit the “up arrow” in the top-right corner to upload the app to your Bryton Active account. You will then see the route under “My Routes” (in the app) - tap on it to show the route, then hit the ellipses in the top right corner and select “Download routes to device”. You can now do a “Data Sync” and it will appear on your 450
  • Syncing on the Go: if you are route planning when you are away from house wifi then the 450 won’t be able to do a wifi sync. The workaround is to set your phone up as a wifi hotspot and connect the 450 to it. It will then be able to do a “Data Sync”; it does appear to do this over over bluetooth but it doesn’t seem to be as consistent
  • Undo Button:frustratingly there is no “undo” button on either the app or Bryton Active website for planning a route, however the waypoints are in the list on the left hand side (hidden in a pop out panel in the app) and you just need to delete the last point(s) to edit your route as you go. It works!
  • Importing Routes: if you use RideWithGPS there is account syncing built in to the app (although Ive not used it), whilst you can import a GPX or FIT file from any site that can export them. MapMyRide (which seems to have more reliable road routing) exports GPX. The USB import is the most reliable way to get these files on to your PC: plug the 450 in to a USB port then copy the file to the “ExtraFiles” folder
  • Turn by turn navigation: The easiest way to guarantee this is to create the route on the Bryton Active website. It works well although is reliant on the quality of the underlying maps. It can work with third party maps but depends on the ability of the export so your mileage might vary.

What makes the above mildly frustrating is that none of it is complicated and could be made so much easier with a decent manual and forum. The manual is mediocre and there is no forum to address these, although the Facebook page is pretty active. The 450 is a great device for the money so get the best out of it!

SSRS Subreport that Returns No Data Doesn’t Display

Friday, 19 June, 2020

I’ve been designing a new SSRS report this week which has a number of subreports in it. For clarity, what I actually wanted was the title of the subreport to display even if there is no data, however in these instances nothing was displaying. As is often the case with SSRS, getting to the bottom of why something is happening can be tricky.

When a subreport has no data, SSRS’s default action is show nothing. This is actually the result of the subreport’s dataset returning nothing which then hides the subreport container in the main report. In order to show non-data related items in the subreport the solution is actually quite simple: create another dataset in the subreport that returns some data. And nothing is more simple than

select ' '

WinSCP for FlatPress Backup

Monday, 25 May, 2020

The benefit of FlatPress is that it doesn’t use a database… this approach pivots to the axiom of “keep it simple” which should make the rendered site fast, secure, and portable (for example, when I ported from Blosxom to FlatPress). One area where this is particularly evident is backup as all you have to do is copy the content files off the server. You can run this either sever side (putting the files somewhere) or client side (pulling them to a local machine). I’ve opted for the latter approach and my tool of choice is WinSCP (and the portable version), an open source FTP client that includes a n extensive number of reliable and extensible tools. I’ve found WinSCP better than FileZilla, not least because it has reliably handled large file transfers and maintains the create dates of any files you transfer.

Of particular importance for automating FlatPress backup are directory synchronisation and scripting. In fact, the WinSCP GUI can generate the script for you based upon existing profile settings. For completeness this is the very simple script that runs:

open ftp://<username>:<password>@ftp.yourserver.com
lcd c:`\mywebsitebackup
cd /mywebste.com/htdocs
synchronize local -mirror
close
exit

This opens a connection to the server, changes the local and remote directories before mirroring from the remote to the local. On Windows I can then schedule this to run as a daily task.

A good tool for the arsenal!

FREE EPRINT: Sustainable Development Goals: genuine global change requires genuine measures of efficacy, Journal of Maps

Saturday, 23 May, 2020

Smith, M.J.
Journal of Maps


We live in tumultuous times - it is a common refrain for each new generation as the challenges of contemporary society impinge upon their worldview. There is always change and there is no change quite like how we experience it in the here and now and the way in which it disrupts our status quo. Malthus was disturbed by population change and how it would implode the society he inhabited. His thesis - the Principle of Population (1798) - espoused what became known as the Malthusian trap whereby growth in the supply of resources led to an increase in population so negating any boost to living standards. The so-called ‘limits to growth’ remain topical both for proponents and opponents. So is the world we inhabit today any different?

Visual Studio 2015 SSRS Solution Files and Upgrade Woes

Thursday, 21 May, 2020

The arrival of a new Windows PC precipitated an upgrade from Visual Studio 2015 to Visual Studio 2019. All of my development is for SQL-based reports which are then deployed to SSRS. As Visual Studio is Microsoft’s “one-size-fits-all” approach to programming, you need to make sure you pick the right “flavour”. In this instance that means SQL Server Data Tools. For VS2015 and VS2017 that is a standalone installer and you need to make sure you select the “Data storage and processing” option which then installs SQL Server Data Tools. For VS2019 some of the functionality has been moved out in to Extensions: for me that mean installing the MS Reporting Services Projects extension.

With that rigmarole out of the way I pointed VS2019 at my Solution file and… I got an error message saying that it couldn’t be upgraded! WTF?! I mean, seriously? Microsoft can’t upgrade from two versions ago? Whilst the RDL report file format hasn’t changed, setting up new Solution files would be a time vampire for no valid reason.

It then struck me that it was worth a punt installing VS2017 to see if the intermediary version could upgrade the VS2015 files, and then move on to VS2019 after that. A 1Gb download and 30 minute install later (seriously!) and VS2017 successfully upgraded the Solution files. I then copied these over to my new machine and VS2019 successfully upgraded those too. It’s one extra step but is then seamless!

Note to self… Permanent Power to a Transcend Wifi SD Card in a Nikon Camera

Thursday, 12 March, 2020

I had been looking through my box of “spare stuff” to find a slightly ageing Transcend Wifi SD Card which I could use in my Nikon D800. To cut a long story short, I wanted to upload a few selected photos from the card to my smartphone and this seemed like the easiest way. OK, so the card is a little slow, but for a few photos that’s fine. The first task was to upgrade the firmware of the card to the latest version, install the WiFi SD App and then connect to the camera. It didn’t work. In fact, the smartphone couldn’t find the card at all which suggested that the card wasn’t being powered. I tried scanning at the same time as I was taking a photo and the card would briefly appear before disappearing.

Clearly the card is not continually powered by the camera and after some slightly long-winded Googling I found this page. In short, there are two modes where the card is constantly powered:

  • Live View
  • “Auto-Meter Off Delay” switched off

The “Auto-Meter Off Delay” from your Custom Settings is the one to change (and select it as an option on your MyMenu). Once you set this to infinity the camera powers the card and you can then access it via the smartphone app.

If you are using something like Snapseed on your phone to edit, then it is a whole lot quicker to shoot in “RAW+JPEG Basic” (the 36MP resolution means “Basic” is actually pretty detailed!), before uploading just the JPEG.

Copying a Visual Studio SSRS Solution

Tuesday, 5 November, 2019

Designing SSRS reports in Visual Studio is liberating in how easy it is to get them up and running, but every so often you come across a gotcha that you think should be straight forward. One of them is copying a “solution” (VS’s name for a set of project files) to a new location. You might want to do this because you want to back it up, duplicate it for another related project, or just to run some tests against a demo version. What’s missing in VS is a “Save As” for the whole solution (you can do it for individual reports). If you copy the folder containing all the files you can create a new version in a new location, however all of the hard coded file locations will be incorrect and it will then fail to load.

So what is the solution?! Well you could create a new solution, then add in copies of all the existing reports, but then you still have to set it all up again which is just a little self-defeating. Surprisingly, the simplest thing is to copy the solution folder, but keep it within the same directory as the original, just changing the name. You can then open the copied solution from within this folder and all the reports load correctly (as new copies). If you are deploying this to SSRS then you will need to change the name of the solution in the solution properties, but then you are good to go.

Microsoft SQL Server Report Designer Error: An item with the same key has already been added

Wednesday, 23 October, 2019

Whilst designing a report for deployment to SSRS from Visual Studio 2015, I received this error message when entering a SQL query I knew worked in to the New Report wizard:

An error occurred while the query design method was being saved. An item with the same key has already been added.

This is a classic Microsoft error message that is both specific and vague at the same time… and also shouldn’t happen. There are scant details online as to where this comes from but is a result of Microsoft SQL Server Report Designer having a requirement for unique column names (even if the underlying SQL query returns unique columns with the same name). This is a stupid limitation and whilst the error message is accurate, it is sufficiently vague to obfuscate what is going on.

The solution - unsurprisingly - is to make sure that there is no repetition in the names of the columns.

Grouping Objects in Visual Studio 2012

Monday, 14 October, 2019

Grouping objects should be one of those things that is - well - easy to do! In Microsoft Word you Ctrl select each object, then right-click and select “Group”. Easy. In Visual Studio 2012, not so. You would have thought that, in Microsoft’s prime programming environment, these simple layout tasks would be easy, but thy’re not and it’s not documented anywhere. In my particular instance I was creating a SQL Server Reporting Services report where images in the template were moving depending on the number of rows in the output. The solution was to group the images together.

The grouping concept is sensible and well implemented, it’s just that working out how to do it is difficult! You actually have to insert a new rectangle object and then drag-and-drop the objects you want to group in to it. Once you’ve done this, the properties of your contained objects should look something similar to this where the “Parent” attribute under “Other” shows “Rectangle”. Now if you move the group, they all move. Job done!

rectangle_properties.jpg

ISO 3166-1

Wednesday, 2 October, 2019

ISO 3166-1 just trips off the tongue, however it’s one of those standards that underpins a fair amount of daily geospatial traffic that is undertaken on a daily basis. Yes, I’m talking about country codes which Wikipedia helpfully defines as:

ISO 3166-1… defines codes for the names of countries, dependent territories, and special areas of geographical interest

This is important because it is used in so much analogue and digital data exchange between countries, although don’t for a moment think the ISO is the only organisation that defines country codes… but that’s a whole other blog post!

What gets in included in the list is interesting… the criteria for inclusion include member states of the United Nations, a UN specialized agency or a party to the Statute of the International Court of Justice. Becoming a member state of the UN is clearly helpful, although what makes a country is interesting in itself, as well as highly politicised. Palestine is an obvious example, but just look at the UK. The UK is a country, but should Wales, Scotland, and Northern Ireland also be included? For example, they are included for FIFA. The UN loosely uses Article 1 from the Montevideo Convention which outlines four qualities a state should have: a permanent population, a defined territory, government, and the capacity to enter relations with other states.

Anyway, once you are on the ISO 3166-1 list you get 2 and 3 letter codes, along with a 3 digit numerical code. These are maintained by the ISO 3166 Maintenance Agency and, given the above, change regularly. You can view the current list here and subscribe to official updates.

At the RGS we are a membership organisation and take online international payments, so having up-to-date country codes is important. Rather than subscribe to the ISO, we use the UK government Country Register, which includes an update service. It has the ISO-2 letter codes, although isn’t necessarily identical (as it’s countries the UK recognises).