Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set the XML datasouce Dynamically

Status
Not open for further replies.

gundu

Programmer
Aug 31, 2001
18
US
HI,

I am using VB.Net to open the Crystal report 9.0 by using the following statments

Dim crapp1 As New CRAXDDRT.ApplicationClass
Dim crReport As New CRAXDDRT.ReportClass
...Opened the connection
crReport = crapp1.OpenReport(FilePath & MyReport.rpt", 0)
crReport.Database.LogOnServer("pdsodbc.dll", DSN(of XML Datasource))
crReport.Database.Tables(0).SetDataSource(DtSet)
CrystalReportViewer1.ReportSource = crReport
CrystalReportViewer1.Show()


when i run the above code the following error is occured

System.Runtime.InteropServices.COMException

How to solve this problem

Thank you


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top