Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 10th, 2007, 04:19 PM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to set password to exported Crystal Report

Hi,

Sub: How to set password to exported Crystal Report


We have VB 6.0, Crystal Reports Xi and Oracle 10 G.

I have designed a report using Oracle native connection and passed data at run time.
Exported the report to Crystal Report Format. But while opening the report, the exported report (destination report) asks for password.

Is there any way to set the password to the expoted report in Visual Basic.

Here is my code:


Dim CrAppl As CRAXDRT.Application
Dim crrep As CRAXDRT.Report
Dim crrepDest As CRAXDRT.Report
Dim strsql As String

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

   With crrep
    .Database.LogOnServer "crdb_oracle.dll", strServerName, "", strUserName, strPassword
    .DiscardSavedData
    .SQLQueryString = strsql
    .ReportTitle = strReportCriterias
    .Database.Verify
    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


I would appreciate your help in this regard.

Thanks,





Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report 9 password protected mdb ACCESS sajid_rauf Pro VB Databases 2 July 27th, 2007 02:29 AM
Unable to open report exported in Crystal rep jdaulagar Beginning VB 6 3 June 4th, 2007 08:06 AM
Crystal Web Report asking User name/password abmohan75 Crystal Reports 2 January 22nd, 2006 04:40 AM
changing Password dynamically in crystal report irfanthegame Crystal Reports 0 October 7th, 2005 06:59 AM
page margins not set in the exported pdf files boat Crystal Reports 0 April 21st, 2004 04:36 AM



All times are GMT -4. The time now is 02:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.