Hi,
I have a strange issue in one of my application.
I created an application in visual basic 6 using Crystal Report 8.5.
I use this lines of code in my program :
Dim adoRecordset As New ADODB.Recordset
Dim mCrrep As CRAXDRT.Report
Dim mCExport As CRAXDRT.ExportOptions
Dim objCrystal As CRAXDRT.Application
Dim strDatabase As String
Dim strServer As String
Dim pwd As String
Dim user As String
Dim CRXParamDefs As CRAXDRT.ParameterFieldDefinitions
Dim CRXParamDef As CRAXDRT.ParameterFieldDefinition
Dim sshel As New Shell
adoRecordset.Open "spFactura " + CStr(pIdxFactura), gstrCadenaConexRpt
' We load the crystal report
Set objCrystal = New CRAXDRT.Application
Set mCrrep = objCrystal.OpenReport(GenReportes$ + GL_NOMBRE_REPORTE, 1)
mCrrep.DiscardSavedData
' We load the parameters
Set CRXParamDefs = mCrrep.ParameterFields
For Each CRXParamDef In CRXParamDefs
With CRXParamDef
Select Case .ParameterFieldName
Case "@Factura"
.SetCurrentValue pIdxFactura
End Select
End With
Next
' We added the values for the options we need
mCrrep.ExportOptions.DestinationType = crEDTDiskFile
mCrrep.ExportOptions.FormatType = crEFTPortableDocFormat
mCrrep.ExportOptions.DiskFileName = pFileName & ".pdf"
mCrrep.ExportOptions.PDFExportAllPages = True
' We load the recordset
mCrrep.Database.SetDataSource adoRecordset, 3, 1
mCrrep.EnableParameterPrompting = False
mCrrep.Database.Tables(1).SetLogOnInfo "", "", GenUsuario$, Password$
' We create the report
mCrrep.Export False
When I execute the software on my dev machine I have no problem but when I do the same on the Client machine the export don't seem to work.
The pdf file is not created and I have no error, if I run the software in admnistator on the client machine everything work.
I added all the secrurities on all directories where the application work but is not working except if I run it in administrator.
So I don't know which security I need to apply.
Both OS (the dev and the client) are Windows 7 Pro 32 bits.
I applied the latest fixes on the dev machine but it's worst because when I do that now I have the error can't export file on the client machine.
But maybe is normal.