Dear All,
saya punya kode untuk crystal report dan sudah bisa running, ketika
saya beri password pada user, tidak bisa di load reportnya
kodenya seperti ini
=================
Dim sRec As New ADODB.Recordset: Dim sRec2 As New ADODB.Recordset
Dim sRec3 As New ADODB.Recordset: Dim sRec4 As New ADODB.Recordset
If sRec.State = adStateOpen Then sRec.Close
strSQL = "select * from mst_item where kodeitem='" &
FlagDataSearch1 & "'"
sRec.Open strSQL, StrConnection, adOpenDynamic, adLockOptimistic
CRViewer91.DisplayBorder = False 'MAKES REPORT FILL ENTIRE FORM
CRViewer91.DisplayTabs = False 'THIS REPORT DOES NOT
DRILL DOWN, NOT NEEDED
CRViewer91.EnableDrillDown = False 'REPORT DOES NOT SUPPORT
DRILL-DOWN
CRViewer91.EnableRefreshButton = False 'ADO RECORDSET WILL NOT
CHANGE, NOT NEEDED
Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
If Trim(FlagDataSearch2) = Trim(FlagDataSearch3) Then
Set Report = crystal.OpenReport(app.Path
& "\ReportProgram\mst_Item.rpt") 'OPEN OUR REPORT
Else
Set Report = crystal.OpenReport(app.Path
& "\ReportProgram\mst_Item.rpt") 'OPEN OUR REPORT
End If
Report.DiscardSavedData 'CLEARS REPORT SO WE
WORK FROM RECORDSET
Report.Database.SetDataSource sRec 'LINK REPORT TO RECORDSET
CRViewer91.ReportSource = Report 'LINK VIEWER TO REPORT
CRViewer91.ViewReport 'SHOW REPORT
Do While CRViewer91.IsBusy 'ZOOM METHOD DOES
NOT WORK WHILE
DoEvents 'REPORT IS
LOADING, SO WE MUST PAUSE
Loop 'WHIL
E REPORT LOADS.
CRViewer91.Zoom 94
sRec.Close 'ALL BELOW HERE IS CLEANUP
Set sRec = Nothing
Set crystal = Nothing
Set Report = Nothing
====================
ketika dicoba user tanpa password running well, dicoba dari
crystallnya juga memakai user yang ada passwornya bisa, tapi kalau
dipanggil dari program tidak bisa, message nya kira2, could not load
report karena parameter user dan password
Please Advice, and help me,
any advice , will be very appreciate