By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,395 Members | 2,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,395 IT Pros & Developers. It's quick & easy.

Crystal Reports 2008 with Visual Basic 2008

P: 42
I am new to visual basic 2008. In the past I have used vb6 to display an existing crystal report. I would like to accomplish the same with vb.net. However I am not clear on the syntax to display a crystal report using the crystal report viewer or crystal report document. Here is my code from vb6

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     CrystalReport1.Connect = "DSN=perfection;UID=crystal;PWD=crystal"
  3.     CrystalReport1.ReportFileName = "e:\Nittany Work Tickets\Nittany Work Tickets.rpt"
  4.     CrystalReport1.Destination = crptToWindow
  5.     CrystalReport1.WindowState = crptMaximized
  6.     CrystalReport1.Action = 1
  7. End Sub
  8. Private Sub Form_Unload(Cancel As Integer)
  9.   Set frm = Nothing
  10. End Sub
  11.  
And i know we can accomplish it with using Crystal report viewer.the example code is below

Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Dim cryRpt As New ReportDocument
  3.     Dim pdfFile As String = "c:\ProductReport1.pdf"
  4.  
  5.     Private Sub Button1_Click(ByVal sender As System.Object, _
  6.     ByVal e As System.EventArgs) Handles Button1.Click
  7.         cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt")
  8.         CrystalReportViewer1.ReportSource = cryRpt
  9.         CrystalReportViewer1.Refresh()
  10.     End Sub
  11.  
my question is is there any way we can display the report in vb 2008 with out the use of Crystal report viewer.

If anyone find any idea please replay it..

thanks in advance.

Firoz.
Jul 31 '08 #1
Share this Question
Share on Google+
3 Replies


P: 42
Disappointing..................................... ......................................
Jul 31 '08 #2

P: 42
No one knows it....???
Aug 1 '08 #3

P: 42
Every one can use there power madly...............if they use their brain........how good our world .......................
Aug 3 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.