Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent Help required on Crviewer crash

Status
Not open for further replies.

asimasm

Programmer
Nov 27, 2000
62
AU
Hi
I am making Dynamic reports (there is no rpt file)from my VB application using Crviewer control and CRAXDRT object. But there seems to be strange crashes out of no where with no particular reason that i can understand. My application gives an error of the following description

"The instruction at "0x02634f55" refrenced memory at "0x00000000" the Memory could not be read"

Now this crash comes randomly. sometimes the report is opening it crashes other times when i move to nxt page on the report it randomly crashes and sometimes when i press the close button of my report after viewing it it crashes. And i dont see wt exactly is the problem. Bcz this thing was working perfectly b4 and now from no where it has started crashing. Can any body give me a solution bcz my client is really mad as he is unable to print his report.

Thanks in Advance
 
One other thing that my databse is Access 97 format and i m using RDC 8.5 dlls as runtime for displaying the reports.

Plz if somebody can give any usefull suggestion.
 
asimasm:
I think the reason maybe is the misuse of crviewer's ReportSource property.
Usually we create a CRAXDRT.Report object and set it to crviewer's ReportSource to show it, when we handle another report, we usually do as:
dim Report1 as CRAXDRT.Report
...
set Report1=nothing
Report1.openreport(... )' another report
...
CRViewer1.ReportSource = Report1

Here is a error, because crviewer is still point to Report1, set Report1=nothing is not suitable. So we should do as:
dim Report1 as CRAXDRT.Report
dim TempReport as new CRAXDRT.Report
...
CRViewer1.ReportSource = TempReport
set Report1=nothing
Report1.openreport(...)
CRViewer1.ReportSource = Report1

Here we first set the crviewer's point to a temporary object, then set it to the really report object Report1.

Try it!
BobGuo
2002 7 9
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top