|
-
Aug 14th, 2012, 02:54 PM
#1
Thread Starter
Fanatic Member
Run existing Crystal Report in VB.NET
I have an existing Crystal report built (using Crystal Reports), and I want to be able to share it with other users who don't have Crystal installed. Actually, I want them to be able to run it themselves. I figure the best way to do that is to setup a little VB.NET app that calls the report and sends a few parameters like date, llocation - whatever.
I know there is a Crystal Reports "viewer" in VS 2010 but I'm not sure how to use it to run my report. I've found a couple of examples online but I must be missingsomething. This one in particular seems pretty good, but myVB doesn't like the code snippet highlighted in bold below:
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
Any help/insight is appreciated. Oh - and I'm putting in the actual path/file name for my file in the program - not using "PUT CRYSTAL PATH HERE" as shown above!
-
Aug 14th, 2012, 03:14 PM
#2
Re: Run existing Crystal Report in VB.NET
You should post this in the Reporting Forum, also , what is the error?
-
Aug 16th, 2012, 12:15 PM
#3
Re: Run existing Crystal Report in VB.NET
Moved To The Reporting Section
-
Aug 16th, 2012, 12:46 PM
#4
Thread Starter
Fanatic Member
Re: Run existing Crystal Report in VB.NET
 Originally Posted by wes4dbt
You should post this in the Reporting Forum, also , what is the error?
I had it loaded but I didn't save it. Basically, after pasting the code VS underlined a bunch of code with squiggly blue lines. Its like I was missing a reference or something.
-
Nov 25th, 2014, 09:45 PM
#5
New Member
Re: Run existing Crystal Report in VB.NET
if error like this in other pc
-
Nov 27th, 2014, 02:59 AM
#6
Re: Run existing Crystal Report in VB.NET
I have an existing Crystal report built (using Crystal Reports), and I want to be able to share it with other users who don't have Crystal installed.
a note on this: your users will need to install the crystal runtime on their machines otherwise it will not work.
For your error: Have you dragged that crystal preview control (dont know the name now) onto your form and named it "CrystalReportViewer1"?
Edit: ahh, i see this is an old thread and the issue is probably already resolved....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|