Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 5th, 2007, 05:11 PM
Authorized User
 
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to open report exported in Crystal rep


Hi,
Sub: Unable to open the Crystal report exported in Crystal Report Format

1) I have used Oracle Native connection, while designing the report.
2) I have passed the record set to the report at run time.
3) Exported the report to Crystal Report Format, But I could n’t able to open report, while opening , the report asks for OLEDB information, even though I used Native connection at design time.
4) In Crystal Report 8.5, connect driver property, but I am using crystal reports XI and in Visual Basic 6.0, Is there any method or property to convert the connection?. As I have to export report to crystal format and emailed to user, so that user can open it.
Any assistance in this regard is highly appreciated

The code is as follows:
Public Sub Aging_REPORT(strSQL As String, sReportName As String, sDestFileName As String, ReportTitle As String)

On Error GoTo Err
Dim CrAppl As CRAXDRT.Application
Dim crrep As CRAXDRT.Report

Dim rsCrystal As ADODB.Recordset

    Set CrAppl = New CRAXDRT.Application
    Set crrep = CrAppl.OpenReport(sReportName) 'Opens the report

   Set rsCrystal = New ADODB.Recordset


    rsCrystal.Open strSQL, Conn, adOpenStatic, adLockReadOnly
    rsCrystal.Requery


     With crrep
     .DiscardSavedData
    .Database.LogOnServer "crdb_oracle.dll", strServerName, "", strUserName, strPassword
     .ReportTitle = ReportTitle
     .Database.SetDataSource rsCrystal, 3 'LINK REPORT TO RECORDSET
     .VerifyOnEveryPrint = True
     End With

   With crrep.ExportOptions
    .DestinationType = crEDTDiskFile
    .FormatType = crEFTCrystalReport
    .DiskFileName = sDestFileName
   End With


   crrep.Export (False)
    Set crrep = Nothing
    Set CrAppl = Nothing
    Exit Sub
Err:
 MsgBox Err.Description

End Sub

Thanks,




 
Old January 19th, 2007, 09:10 AM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
My nickname is Lupo
I also have converted from Crystal Reports 8.0 to XI.
Pls send me your email address so I can send you sample code
of my application.

I have recompiled my old reports into version XI.
I use such predefined reports for printing on paper, exporting into PDF-File and also as email to "Outlook".
There might be code that can help you.
I use the German version of XI - which version do you use ?
I'm German - if you prefer to correspond in German - OK

Regards Lupo

 
Old February 27th, 2007, 02:55 AM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i too have the same problem in crystal report 7..

can anyone help

bhagya

 
Old June 4th, 2007, 08:06 AM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, i have the same problem too.

Can you send to me your sample code?

Thanks you for the helping.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Manager - unable to open Reshmacb BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 October 23rd, 2007 02:22 AM
How to set password to exported Crystal Report jdaulagar Beginning VB 6 0 January 10th, 2007 04:19 PM
unable to pass parameters to crystal report ukumawat Crystal Reports 1 May 6th, 2006 09:08 AM
Crystal Report: 20536: Unable to logon server caryraleigh Pro VB 6 0 December 4th, 2004 10:38 AM
Save Crystal Rep with out data pavel Pro VB 6 2 March 3rd, 2004 07:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.