[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Problem related to VB and Crystal Report.

I have a project that has a lot of forms and report (crystal report).  When compile the program, everything is fine and all reports are no error.

After make exe for this project and close VB, VB request to save the .dsr file.  Either save it or not, a "perform illegal operation" message display on screen.

When i use that exe file to run my program, the program can run, but when i want to view the report the program hang and an error message display on screen. "MyProject caused an invalid page fault in module CRAXDRT.DLL at 0167:4leb2324.

"MyProject" is my project name.

Can anyone tell me why this happen and how to solve this problem??

0
yongyih
Asked:
yongyih
1 Solution
 
mlmccCommented:
The reports aren't being saved as .dsr files.

The runtime error is because the file doesn't exist or is corrupt in some way.

Recommend you uninstall CR and reinstall from scratch.  I suspect one of the CR dlls has been corrupted.  

If that doesn't work let me know.

good luck
mlmcc
0
 
yongyihAuthor Commented:
actually i am helping my friend to ask about this..
my friend said only one of the report has problem.
when view that report, error will occur.  other report should be no problem.

besides, the error happend in every pc in office..

any idea why this happen?

Anyway, i will ask my friend try to reinstall CR..
if still have problem, i will let u know.

thanks for reply..

0
 
mlmccCommented:
I had similar problems with one of my reports.
I ended up rebuilding the report from CR and then importing it to VB.  You may be able to open the report and save it to another file.

good luck
mlmcc
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
yongyihAuthor Commented:
my friend said he rebuild the report for 3 times already but i not sure he build it in VB CR designer or in CR.

Save that report to another file, you mean rename it?  this is another solution, i will ask my friend to tell this later on.

if have any other new solutions, please tell me.
thanks.
0
 
mlmccCommented:
Rename it but through the CR file - SAVE AS

mlmcc
0
 
yongyihAuthor Commented:
no every report has problem except my friend's report.
rename didn't solve the error.
any coding will cause this problem?
0
 
mlmccCommented:
Can't think of any coding that would cause the problem.  What code is he using to display the report?  

I avoid using the .dsr method because if the report changes I have to recompile and redistribute the applicationi whereas using either the ActiveX viewer or the CR viewer & the RDC I can open any report through code and when the report changes I simply swap out the report files.

I'll try to post my code in the morning.

mlmcc
0
 
yongyihAuthor Commented:
He design his report in crystal report and add into VB..
we really no idea why this happen...
save as doesn't solve this problem too..
0
 
yongyihAuthor Commented:
still waiting for more commend to solve this problem...
0
 
yongyihAuthor Commented:
My friend said if he disabled most part of the coding, then he can compile the project.  If put back everything, then compile error again.  He tried to save as and rename.  At first, can compile the project become exe file. (Remark most part of coding)  After remove all remarks, VB cannot compile the project anymore.  He restart pc for few times but still cannot compile successfully.  When compile half way, an error message 'perform illegal function in kernel.dll file..' display on screen.

Why this happen????  Please reply me. Thanks.
0
 
mlmccCommented:
What code is he using for the report?

Does the report include any special functions?

mlmcc
0
 
mlmccCommented:
Here is the code I use.  Note the report is just the .rpt file, it isn't included in the VB.  This code is on the CRViewer form.

Dim crApp As CRAXDRT.Application
Dim crRpt As CRAXDRT.Report

'
'   Check if report is already in use
'
    If IsObject(crRpt) Then
       Set crRpt = Nothing
    End If

'
'   Open report
'
    Set crApp = New CRAXDRT.Application

    Set crRpt = crApp.OpenReport("c:\CR\Reports\myrpt.rpt", 1)

'
'   Set flags for CRViewer
'
    crRpt.MorePrintEngineErrorMessages = False
    crRpt.EnableParameterPrompting = False
    crRpt.DiscardSavedData


'
' Set the viewer's report source to the Report object
'
    Me.rptCRViewer.ReportSource = crRpt      
    Me.rptCRViewer.ViewReport
    Me.Show

good luck
mlmcc
0
 
yongyihAuthor Commented:
My friend create every crystal report in VB. (.DSR)  He have to do like this because the program allow user to do report customization.  Therefore, the way he load the report is the same as yours.

No special function in his report.

He redo all reports for few times already but still the same.

Do you think any function will cause this error and why the kernel.dll error occur?
0
 
mlmccCommented:
Is he referencing the Crystal Runtime or Design Time library.  Since he wants the users to customize the reports he needs to include the RunTime library.

mlmcc
0
 
yongyihAuthor Commented:
ok, i will ask him..  
0
 
yongyihAuthor Commented:
According to my friend, he do everything within VB (add crystal report).  as for the customization, he do it through coding in VB program. (set different font, font size..)

If a crystal report contain too many formular, it will cause errors or not? (The program contains a lot of forms and reports and need qite a long time to compile..)

He need to solve this problem within these few days..

If you have any friends that good in VB or crystal report, please help me to ask them, thanks first. ^_^
0
 
yongyihAuthor Commented:
My friend still cannot solve this problem..
according to what he said, in that project, they used both Crystal Report version 7 and 8.. Is it ok?

0
 
mlmccCommented:
That is most likely the problem.  CR 7 & 8 file formats are different.  I would update all reports to one or the other and then try the project.

CR8 can save back to CR7 or it can import and save as CR8.

I had many problems trying to use the DSRs especially when the project got large and the number of reports grew.  By going to the .rpts we have been able to have larger projects with as many reports as necessary.

If you are trying to allow users to modify/develop their own reports you will need a CR license for each machine/user.

mlmcc
0
 
mansonlamCommented:
I had the same problem for some reports with graphs. Did you include "pg32conv.dll" in your setup package? I found from Crystal Report's web site and know that the shared file is needed for producing graphs. Yet, if it does not work, you can try to include more shared files in "D:\program files\Seagate Software\Shared" in your package. I think quite a lot of dependency information for CR's files are incomplete and therefore PDW can not manage to include enough dependent files in the package.
Hope this work for you.
Manson
0
 
yongyihAuthor Commented:
I solved the problem already.  We separate the project into few different projects.  Then, no more compilation error and everything work correctly.

My problem is the system is too large.  

Hope this can help you too. Good Luck.
0
 
mlmccCommented:
Seems I suggested that as a problem or potential problem about a month ago.

mlmcc
0
 
DanRollinsCommented:
Hi yongyih@avtech,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

yongyih@avtech, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
Computer101Commented:
Question placed in PAQ

Computer101
E-E Admin
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now