Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello

 

We have developed a report in crystal that connects with our local database. After development we want to deploy the same to our clients with different data source configuration.

 

Presently we are taking each report file and configuring the client database by replacing the existing data source.

 

How can we achieve this programmatically thru VB.NET?

 

Thanks & Regards

Ananda

Posted

Invalid report source

 

Hello

 

Thanks for your information. When I execute the following code I am getting invalid report source error.

 

---------------------------------------------------

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim myreport As New ReportDocument()

Dim logoninfo As New TableLogOnInfo()

Dim i As Integer

myreport.Load("c:\temp\industry.rpt")

For i = 0 To myreport.Database.Tables.Count - 1

' Set the connection information for current table.

logoninfo.ConnectionInfo.ServerName = "staffing"

logoninfo.ConnectionInfo.DatabaseName = "ir"

logoninfo.ConnectionInfo.UserID = "prman"

logoninfo.ConnectionInfo.Password = "prman123"

myreport.Database.Tables.Item(i).ApplyLogOnInfo(logoninfo)

Next i

'----------------------------------------------------------------------

CrystalReportViewer1.ReportSource = myreport

CrystalReportViewer1.DisplayGroupTree = False

End Sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...