none
How to make a setup or deploy a program include Crystal Report and database? RRS feed

  • Question

  • Hii.

    Anybody knows how to deploy/publish a program with include crystal report and database. I have tried any method to do this, however after finishing setup and start the program it's able to insert data to database but I cannot print data to crystal report. I did set the app.manifest to require Administrator but it didn't work. I'm very confused, cause there is no error or warning message. Is my script wrong or I missed the setup configuration? Have you any idea to resolve this problem?

    I'm currently using Visual Studio 2010 and Ms. Access as a database.

    Thank you before.

    Here is my print script:

    Private Sub Button5_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
            Dim MYReport As New ReportDocument

            MYReport.Load("CrystalReport\CR1.rpt")
           
            MYReport.SetParameterValue("KeyWord", TextBox7.Text)
     
            printpreview.CrystalReportViewer1.ReportSource = MYReport
            printpreview.CrystalReportViewer1.Refresh()
            printpreview.Show()
        End Sub

    Sunday, April 8, 2018 12:05 AM

All replies

  • Well I have no idea once setup occurs what path "CrystalReport\CR1.rpt" is on the PC setup occurs on. Nor is this Forum for issues with Crystal Reports as they are 3rd party.

    But I will guess no file is at whatever location the path you use is pointing to.

    Perhaps it is in the application (executables) startup path or somewhere else. However you should use appropriate coding for getting that information for the path and verify the file is in that path.

    See Application.StartupPath Property for one example and use IO.Path.Combine to combine strings and it will add the path separators.

    Dim Path As String = IO.Path.Combine(Application.StartupPath, "CrystalReport", CR1.rpt") for example.


    La vida loca

    Sunday, April 8, 2018 2:06 AM
  • What O/S are you trying to deploy the application on? If you don't understand how to address the O/S on where things like files the program needs and where they go, then you are going to have trouble.

    Sunday, April 8, 2018 10:27 AM
  • If you are installing on a machine different than the development machine, there is typically a separate runtime that needs to be bootstrapped or installed independently from the app. Since the version of Crystal Reports your are using for VS 2010 is now owned by SAP I would recommend posting your question there:

    https://www.sap.com/community/topic/crystal-reports-for-visual-studio.html


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Sunday, April 8, 2018 1:21 PM