Results 1 to 6 of 6

Thread: Run existing Crystal Report in VB.NET

  1. #1

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    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!

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,509

    Re: Run existing Crystal Report in VB.NET

    You should post this in the Reporting Forum, also , what is the error?

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Run existing Crystal Report in VB.NET

    Moved To The Reporting Section

  4. #4

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Run existing Crystal Report in VB.NET

    Quote Originally Posted by wes4dbt View Post
    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.

  5. #5
    New Member
    Join Date
    Nov 2014
    Posts
    4

    Re: Run existing Crystal Report in VB.NET

    if error like this in other pc
    Name:  error1.jpg
Views: 2229
Size:  27.0 KB

  6. #6
    Frenzied Member
    Join Date
    May 2014
    Location
    Central Europe
    Posts
    1,388

    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
  •  



Click Here to Expand Forum to Full Width