Crystal Reports
Kada se promeni racunar ili izvor podataka a struktura tabele ili upita ostaje
ista trebao bi promenom izvora podataka da dobijem regularnu stampu.
Međutim ja nikako ne uspevam da dinamicki promenim izvor podataka
Ovako jos i prodje kada je baza MSSQL.
Ovaj kod se nalazi u nekavom dugmeti
Dim rptExpensiveProducts As New ReportDocument()
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
Try
' Load the report
rptExpensiveProducts.Load("..\CRArtKlasa.rpt")
'Set the connection information for all the tables used in the report
'Leave UserID and Password blank for trusted connection
For Each tbCurrent In rptExpensiveProducts.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = ServerName
.UserID = ""
.Password = ""
.DatabaseName = "ImeDatabase"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent
' Set the report source for the crystal reports
' viewer to the report instance.
crvBasic.ReportSource = rptExpensiveProducts
' Zoom viewer to fit to the whole page so the user can see the report
crvBasic.Zoom(2)
Catch Exp As LoadSaveReportException
MsgBox("Incorrect path for loading report.", _
MsgBoxStyle.Critical, "Load Report Error")
Catch Exp As Exception
MsgBox(Exp.Message, MsgBoxStyle.Critical, "General Error")
End Try
Ali ako je baza Access onda nikako ne upsevam da je promenim.








Dinamicaka promena dataseta ili datasourca kod reporta u VB.
Re: Dinamicaka promena dataseta ili datasourca kod reporta u VB.
Re: Dinamicaka promena dataseta ili datasourca kod reporta u VB.