Solved

Run-time error '-2147417848 (80010108)': error seen on export of Crystal report from VB6

Posted on 2004-10-02
9
931 Views
Last Modified: 2008-02-01
I have  strange problem, I am using Crystal 8.5 developer to export some reports using a vb6 project. I have one chunk of code that used to work, but now it wont.

When I attempt to run the code I get this error:
Run-time error '-2147417848 (80010108)':
Method 'Export' of object 'crptBB24Brief' failed

If I immediately run it again it runs fine. when I go the third it fails, 4th it works etc....

here is the code, the strange thing is that the one above it works fine each time.

                'Creates the Blackberry CAD Status Web Page
'                        crptBBCadStatus.ExportOptions.HTMLFileName = ("\\Nt500901\pdf\BBPages\BBCadStatus.html")
'                        crptBBCadStatus.ExportOptions.FormatType = crEFTHTML32Standard
'                        crptBBCadStatus.ExportOptions.DiskFileName = ("\\Nt500901\pdf\BBPages\BBCadStatus.html")
'                        crptBBCadStatus.ExportOptions.DestinationType = crEDTDiskFile
'                        crptBBCadStatus.Export (False)

                'Creates the Blackberry 24 hour briefing page
                        crptBB24Brief.ExportOptions.HTMLFileName = ("\\Nt500901\pdf\BBPages\BB24Brief.html")
                        crptBB24Brief.ExportOptions.FormatType = crEFTHTML32Standard
                        crptBB24Brief.ExportOptions.DiskFileName = ("\\Nt500901\pdf\BBPages\BB24Brief.html")
                        crptBB24Brief.ExportOptions.DestinationType = crEDTDiskFile
                        crptBB24Brief.Export (False)

My typing is all correct, I just can't seem to see why this works once and then fails and so on... When I debug it goes right to the line crptBB24Brief.Export (False)

0
Comment
Question by:DavidNPD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 12209627
It goes to that line because the error occurs when you export.

How did you declare the report objects?
http://support.businessobjects.com/library/kbase/articles/c2002243.asp

If you are using the OCX this may be the problem
http://support.businessobjects.com/library/kbase/articles/c2010578.asp

mlmcc

0
 

Author Comment

by:DavidNPD
ID: 12210246
but would this explain why one works absolutley fine and the other only works every other time?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12210281
Don't know.  It might.

What is the rest of the code?

What OS and database?

mlmcc
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:DavidNPD
ID: 12211477
I took a look at those two papers, I am not using the OCX, so it is not the first, and I am on Crystal 8.5 Developer, that paper states it only effects Crystal 6.0 Pro. The first one dealt with MAPI also, I mail the report out later in the app, right now I am just trying to create a Web page on a network location.

Security and names all seem fine, as the working report is going to the same location.

I am running this on Winxp, against a SQl database. The code has worked in the past, I am not really sure what I did to change it. I make modifications to the actual reports outside vb in Crystal and then I re-import them in again. During one of those updates is when it went wrong. I have tried changing that report having the problem. Stripiing it down and re-running it. No help.
I actually had this problem when I first started using this app and put a message up here asking for help, I then went back into the app to try to figure it out and it started working, no idea why, since that time I have had no problems until just recently. Here is the code I am using, I ma not real versed in VB, it was taken from a Crystal help book CD and modified to meet my needs, so I am not really very knowledgable on it.



Option Explicit
    Public crptCallTypes As CRAXDRT.Report


  Private Sub Form_Load()
   
' On Error GoTo ErrHandler
    Screen.MousePointer = vbHourglass
    Screen.MousePointer = vbDefault

'' This gets the Department Name from the Control Table
    'GetDepartment
        'frmScheduler.Caption = m_strDepartment


 
  'This runs the Cad Status Report for the BlackBerries and exports it to "BBCadStatus.html"
  'This should be reenabled to Make a BBCadStatus.exe for the 5 Minute refresh of the Cad status page.

                'Creates the Blackberry CAD Status Web Page
'                        crptBBCadStatus.ExportOptions.HTMLFileName = ("\\Nt500901\pdf\BBPages\BBCadStatus.html")
'                        crptBBCadStatus.ExportOptions.FormatType = crEFTHTML32Standard
'                        crptBBCadStatus.ExportOptions.DiskFileName = ("\\Nt500901\pdf\BBPages\BBCadStatus.html")
'                        crptBBCadStatus.ExportOptions.DestinationType = crEDTDiskFile
'                        crptBBCadStatus.Export (False)

                'Creates the Blackberry 24 hour briefing page
                        crptBB24Brief.ExportOptions.HTMLFileName = ("\\Nt500901\pdf\BBPages\BB24Brief.html")
                        crptBB24Brief.ExportOptions.FormatType = crEFTHTML32Standard
                        crptBB24Brief.ExportOptions.DiskFileName = ("\\Nt500901\pdf\BBPages\BB24Brief.html")
                        crptBB24Brief.ExportOptions.DestinationType = crEDTDiskFile
                        crptBB24Brief.Export (False)



        'Exit the App
            End

End Sub

0
 

Author Comment

by:DavidNPD
ID: 12211483
'The basic form I used to start this app, brought up the following report crptcallTypes" when you click a button. It 'is not really used in this aspect of it, but that was the original app. It always worked so I didnt change anything 'here.

Option Explicit
    Public crptCallTypes As CRAXDRT.Report
0
 

Author Comment

by:DavidNPD
ID: 12211504
I dont know if this would help, but I just went into the app, and made several attempts to run it, this is what happened:

Clicked on run: Error came up, then clicked end.
Clicked on run: Error came up, then clicked end.
        Clicked on run: App ran fine and report went out.
Clicked on run: Error came up, then clicked end.
         Clicked on run: App ran fine and report went out.
Clicked on run: Error came up, then clicked end.
          Clicked on run: App ran fine and report went out.
Clicked on run: Error came up, then clicked end.
Clicked on run: Error came up, then clicked end.
Clicked on run: Error came up, then clicked end.
Clicked on run: Error came up, then clicked end.
Clicked on run: Error came up, then clicked end.
etc.. etc...

If this runs sometimes, I assume that my report itself is OK, my typing is OK, permissions are OK, and the actual code is OK.......
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 50 total points
ID: 12212218
Here is the code I use.  I use private variables, not sure if that makes a difference or not but I doubt it.

Option Explicit
    Private crApp As CRAXDRT.Application
    Private crRpt As CRAXDRT.Report
'
'   Open report
'
    Set crApp = New CRAXDRT.Application

    Set crRpt = crApp.OpenReport(txtReportName, 1)
'
' Set the viewer's report source to the Report object
'  YOUR EXPORT CODE GOES HERE and these lines are gone
'
    Me.rptCRViewer.ReportSource = crRpt
    Me.rptCRViewer.ViewReport
    Me.Show

    Exit Sub

The only thing I see really different is my use of the Crystal application.  You mught add it.

mlmcc
0
 

Author Comment

by:DavidNPD
ID: 12237276
mlmcc, thank for all the help, but in the end i couldnt get this working. I ended up taking the report that was working copying it and modifying entrirely inside the VB app to be the same as the one that was not working. It is working fine now, i just have no idea why. I made no code changes at all I just changed the report.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12244549
Sometimes that is the solution.  

Glad I could help

mlmcc
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question