PDA

Click to See Complete Forum and Search --> : How to show a crystal report in vb .net?


cplaqui
Feb 20th, 2005, 09:56 PM
Guys,

Good day!

Hope you can help me with this... Im using vb .net and created a report using crystal report...How can i show the report when i run the prog by simply clicking to a button? Whats the code for this?

Thanks and more power!

RobDog888
Feb 20th, 2005, 10:20 PM
Welcome to the Forums.

Here (http://www.vbforums.com/showthread.php?t=322513) is a link to a short example of displaying a CR in VB.NET

cplaqui
Feb 20th, 2005, 11:58 PM
Thanks for your prompt reply sir but im juz a newbie in using vb .net...
Appreciate if you can help me where to place the code uv given me... here's my code:

thanks again!

*the main form is pqesmainform
*the crystal report is pqes

Public Class pqesmainform
Inherits System.Windows.Forms.Form
Dim setupform As Form
Dim pqesmainform As Form
Dim pqes As pqes


#Region " Windows Form Designer generated code "

Private Sub reportbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles reportbutton.Click

pqes = New
pqes.Load()

End Sub

RobDog888
Feb 21st, 2005, 12:18 AM
Look through the demo. Did you add the Imports statement at the top of your class?
Imports CrystalDecisions.Shared

cplaqui
Feb 21st, 2005, 03:30 AM
Sir, I did it but there is a "declaration expected" error

RobDog888
Feb 21st, 2005, 11:25 AM
Have you added the CR control to your form yet?