Ryobi
Registered User.
- Local time
- Today, 09:04
- Joined
- Mar 5, 2012
- Messages
- 49
Hello,
I am learning Visual Basic 2010. I have the Crystal Reports reports installed.
I am using an MsAccess database as backend. I am able to create the report and view with the viewer, but what I want to do is be able to open the report from a form by clicking a button. Is this possible ? I found the code below on the net, but this the report within a form, but What I want is for the report to open a appear as separate window when the button is pressed.
Imports CrystalDecisions.CrystalReports.Engine Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cryRpt As New ReportDocument cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt") CrystalReportViewer1.ReportSource = cryRpt CrystalReportViewer1.Refresh() End Sub End Class
Something like
show (CystralReport1)
Thanks
I am learning Visual Basic 2010. I have the Crystal Reports reports installed.
I am using an MsAccess database as backend. I am able to create the report and view with the viewer, but what I want to do is be able to open the report from a form by clicking a button. Is this possible ? I found the code below on the net, but this the report within a form, but What I want is for the report to open a appear as separate window when the button is pressed.
Imports CrystalDecisions.CrystalReports.Engine Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cryRpt As New ReportDocument cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt") CrystalReportViewer1.ReportSource = cryRpt CrystalReportViewer1.Refresh() End Sub End Class
Something like
show (CystralReport1)
Thanks