I was working on my TeamTrack software to add a ‘Delete Scheduled Report Function’. Well, the first thing was that my database library was missing a minor feature – the ‘Delete Report by ReportID’ function. The function technically was there, it is just that it displayed a message box that said ‘To Be Implemented’. Five minutes of programming fixed that one. Then I had to test it. I removed the report I wanted to delete, leaving another two there, but I wanted to do more testing. So I had to add some reports. And the software kept crashing. Very strange. It was saying a string was too big for the database field. Editing the database did not help either. This should not be happening.
Then I started looking at the code. The routine for adding the record to the database was being run lots of times rather than just once. I could not work out what was happening, particularly since the function did not seem to be called more than once, and the code was not inside a loop. After a lot of stuffing round I found I had copied some text to below the call to the Add Report function. And this code had a GOTO statment which caused the program to always re-execute the Add report by accident. Removing that piece of code made things work.
One side effect of this is that I added the reports saying that they had last been run in 1899 by accident. Well, I purposly set that date, but I had code that then said if the year is 1899 then assume that the report was last run today. And I forgot about that code, and thought that having 1899 was correct. Which could mean that the software would send through close to 40,000 reports listing the daily use of the vehicles. Needless to say that this bug has been fixed.
I am now runing out of features to be added. There are some new report formats to be added but that is not by job – I have a client who is happy to design reports and for me to include them into my software. What more could I ask? It is fantasic when that happens – I can work on the back end systems, and someone else can work on designing the reports how they need them. Since i do not actually use the reports myself for anything it is hard for me to know what to put into them.