PDA

View Full Version : مسیر Report در شبکه



nazila_f
چهارشنبه 20 دی 1385, 15:33 عصر
من برای دادن مسیر سرور به کریستال از Connectioninfo استفاده کردم و درست هم کار می کند یعنی بعد از نصب در سرور درست کار می کند اما در Client که از بانک سرور استفاده می کند با این که در قسمت Servername نام کامپیوتر سرور را نوشتم و username آن که sa هست را هم دادم ولی باز درست کار نمی کنه؟
در قسمت servername نام کامپیوتر سرور را نوشتم.درست ؟

کد من دقیقا این هست ؟


Dim intCounter As Integer
Dim ConInfo As New CrystalDecisions.Shared.TableLogOnInfo

ConInfo.ConnectionInfo.ServerName = "" + masirtexttxt + ""
ConInfo.ConnectionInfo.DatabaseName = "dba"
ConInfo.TableName = "SaleByPostCode"
ConInfo.ConnectionInfo.UserID = "sa" '<User Name>
ConInfo.ConnectionInfo.Password = "" '<Password>

For intCounter = 0 To rep.Database.Tables.Count - 1
rep.Database.Tables(intCounter).ApplyLogOnInfo(Con Info)
Next
''''''''''''''''''''''''''''''''''
Dim index As Integer
Dim intCounter1 As Integer
Dim mySubReportObject As _
CrystalDecisions.CrystalReports.Engine.SubreportOb ject
Dim mySubRepDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
''''''''''''''''''''''''''''''''''''''''''''
For index = 0 To rep.ReportDefinition.Sections.Count - 1
For intCounter = 0 To _
rep.ReportDefinition.Sections(index).ReportObjects .Count - 1
With rep.ReportDefinition.Sections(index)
If .ReportObjects(intCounter).Kind = _
CrystalDecisions.Shared.ReportObjectKind.Subreport Object Then
mySubReportObject = CType(.ReportObjects(intCounter), _
CrystalDecisions.CrystalReports.Engine.SubreportOb ject)
mySubRepDoc = _
mySubReportObject.OpenSubreport(mySubReportObject. SubreportName)
For intCounter1 = 0 To mySubRepDoc.Database.Tables.Count - 1
mySubRepDoc.Database.Tables(intCounter1).ApplyLogO nInfo(ConInfo)
mySubRepDoc.Database.Tables(intCounter1).ApplyLogO nInfo(ConInfo)
Next
End If
End With
Next
Next