Solved

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

Posted on 2004-10-02
9
905 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
  • 5
  • 4
9 Comments
 
LVL 100

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 100

Expert Comment

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

What is the rest of the code?

What OS and database?

mlmcc
0
 

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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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 100

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 100

Expert Comment

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

Glad I could help

mlmcc
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now