
Crystal Reports GPF after changing database structure
I wonder if anyone else has come across this problem, or if it is
something unique to my configuration:
I am using 16-bit VB 4.0 (Enterprise) with the version of Crystal
reports it shipped with. I defined a report on a given database, then
changed the structure of the database (adding fields), returned to
Crystal Reports to "Fix Up" the database and add the new fields to the
report. After saving the new report, closing it, and reopening it (I
even tried exiting Crystal Reports & going back in) I found that the
changes weren't applied.
When I later try to call the report from VB, I get a GPF that crashes
VB (in debug mode) or displays an error message (Something linke "An
error occurred in Crystal Reports, click Ignore to try again, or Close
to cancel"), which *will* print the report if you click "Ignore" three
or four times in a row.
I have a report control (rptSingleCA) on a VB form and am calling the
report with the following (the spacing looks odd because I had to fit
it in the 70 columns of this message):
rptSingleCA.ReportFileName = App.Path & "\singleca.rpt"
If PJVer <> 0 Then
rptSingleCA.DataFiles(0) =ProjectPath & dsMasterProject!ProjectID & _
"\" & CStr(PJVer) & ".mdb"
Else
rptSingleCA.DataFiles(0) =ProjectPath & dsMasterProject!ProjectID & _
"\" & CStr(dsMasterProject!LastRevision) & _
".mdb"
End If
rptSingleCA.Action = 1
The database being reported on may change each time the report is run,
though the report file itself is static - I set the path to it in case
I have to change the application directory at a later date.
I have found that I *can* get the reports to work consistently (so
far, anyway) if I completely recreate the .rpt file using the new
database structure.
Any responses will be greatly appreciated. Please cc me at
(this is a *very* active group).
-----------------------------
| Erik L. Przekop |
| Damon, Przekop & Associates |
| Dearborn Heights, MI |
| http://www.*-*-*.com/ ~erik |
-----------------------------