Skip to Content
0
Former Member
Jul 15, 2011 at 04:22 PM

Data missing when running in Release vs. Debug

62 Views

I have an invoicing program that we have been using for a few years now. The invoices are viewed using CR in a .NET environment. One of the subreports lists some line item detail. This particular subreport has just two fields. It gets an ID as a parameter and calls a stored procedure on a SQL server passing the ID and gets a list of description and money fields in return.

The report was created, and is maintained, using CR 2008 version 12.3.3.812. The program was developed in VB.Net using VS 2008. Everything has worked fine for a long time.

Recently, I upgraded the program to use VS 2010 and CR for VS 2010, version 13.0.1 and a very strange thing began happening. I noticed that the subreport had stopped showing the dollar amount after the description. However, if the program is bullt in DEBUG mode, with no other changes, the dollar amount shows up just fine.

I did some playing around and in that process I added a third field to the subreport. This field displayed NULL if the dollar amount was null, T if it was > 0, and F otherwise. In the DEBUG version, this new field displays T, as I would expect. In the RELEASE version, however, the new field displays NULL.

So in the RELEASE version, Crystal is getting a NULL back for the money field but the stored procedure isn't returning a null.

I did try writing a new simple test program that uses the same report. It has no problems in either the DEBUG or RELEASE modes.

I am at a loss to figure out what is going on here. I would appreciate any ideas that anyone may have as to what I can try to fix, or get around, this problem.

TIA,

David