Wednesday, July 4, 2018

Case study - Using the CRI file

One of the joys of attending a cricket match is when there is a scorecard available.
Mobile phones are all well and good but there is nothing like a printed copy to read and analyse and if the mood takes you, actually fill in the scores.

You can generate a bit of income for your club by selling them or by printing adverts on the back of the card.

We can use the PCS export (cri file) to generate the scorecard for a match.
A working utility is available at http://pcsutil.thehomeofcricket.com

Unfortunately the cri export doesn't include the full names of the players (until they have batted or bowled), only the scoreboard name, so make sure you scoreboard names are correct in the PCS database.

Click on Scorecard and then upload your CRI exported file and click on Process File.


If a team logo already exists in the database it will be used, if not you may add a logo.
 
 
 
You do not have to have a logo it simply makes the scorecard more attractive.

Click Generate Scorecard and you will be presented with a printable version like this.





Technical Details

This section may be of interest to programmers. It demonstrates how you can load the CRI file into an XDocument and then extract the data required to build the card.

The only potential gotcha is that the 'Competition' may not exist, if this is the case we have to get the information from the MatchType stanza.



 
           

 







No comments:

Post a Comment