Please forgive me for the lack of information I'm about to provide, but I'll do my best. I'm going to do my best to make a very long story a bit shorter.

At my workplace there was an immediate need to build a quarterly reporting system that would a) capture data points for a list of measures and b) print the data in an easy to read package. Through some luck, we obtained a piece of custom-built software from a gentleman at another company similar to us. The developer has even provided us with his source code.

The project that they built was written in VB (Visual Studio 2008) and connects to an SQL Server database. Users can enter data on the front-end and once everything has been entered, they can click on a button called "Generate Report" that executes a Crystal Report to show them everything they've just entered, complete with graphs and so on. (The Crystal Report was built in Visual Studio using the add-on).

I have installed this software on my local PC which has Visual Studio 2010 and it works perfectly for the most part. The part of his program that passes parameters to Crystal Reports is a bit wonky though. The first time you run the report, it ignores the two parameters you would normally provide for fiscal quarter (e.g. Q1 - Q3), so you end up with a report that is not limited in any way. What ends up happening is I get a huge report that contains all quarters that are in the database.

Here's the strange part though. If I toggle a checkbox that's on the form on and then off, the paramaters work just fine and the report prints as expected. The checkbox has no code behind it whatsoever. There is just a small snippet of code that checks to see if the checkbox is selected or not before it passes the parameters to Crystal Reports and executes the report.

I've entered debug mode several times to try and figure out what's wrong and the parameters VB passes to Crystal are EXACTLY the same, both when the report craps out (printing all quarters) and when it works (printing data for desired Q's only).

Now I must confess that I'm just getting out of VB 6.0, so I'm not entirely up to speed on parameters going into Crystal, but from my end it looks fine. The developer does not have this issue on his computer.

The only differences are I have VS2010 while he has 2008 and a conversion did occur when I opened his project.

We're both at a loss for what to try next. To summarize, the problem is that parameters being passed to the program into Crystal are being ignored - unless a checkbox on the screen is activated/deactivated....then it works fine.