Subject: How to set password to exported Crystal Report
Posted By: jdaulagar Post Date: 1/10/2007 3:19:42 PM
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,






Go to topic 54592

Return to index page 67
Return to index page 66
Return to index page 65
Return to index page 64
Return to index page 63
Return to index page 62
Return to index page 61
Return to index page 60
Return to index page 59
Return to index page 58