Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to display Crystall Reports.

How to display Crystall Reports.

Scheduled Pinned Locked Moved Visual Basic
questioncsharpdesignhelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SekharOne
    wrote on last edited by
    #1

    How can I display a Crystal Report in VB.Net 2005. I have added a report by clicking on the Add\New Item\Crystall Report on the Solution Explorer window. And I have also desined the report and the data is getting fetched in the design mode. Also how can I change the connection string property during runtime ? Please Help, I am new to Crystall Reports. Thanks in advance.

    Sekhar :)

    C U 2 Replies Last reply
    0
    • S SekharOne

      How can I display a Crystal Report in VB.Net 2005. I have added a report by clicking on the Add\New Item\Crystall Report on the Solution Explorer window. And I have also desined the report and the data is getting fetched in the design mode. Also how can I change the connection string property during runtime ? Please Help, I am new to Crystall Reports. Thanks in advance.

      Sekhar :)

      C Offline
      C Offline
      CKnig
      wrote on last edited by
      #2

      I assume you've got an db-view connected to the report. Normaly you don't have to provide the connection string anymore (it's hardwired into the generated report-class), if not you can allways use the DataSource-property of the report. To show the report you need the CrystalReportViewer-Control (well it should be named something like this). Just put it on a form and set the ReportSource - property of the control to an instance of your report-class (same name as your report - get's generated - sometimes CR has problems with namespaces so look into the object browser) - that's it. If you just want to print the report you can use the print-functions of the report without the viewer (same for exports - great for PDFs and so on). Bye the way: I normaly use CR with datasets (so I greate an dataadapter for the dataview I like to see, create the CR with this dataset and then do something like: dim report as new CrystalReport1 report.SetDataSource(ctype(dataadapter.GetData(),DataTable)) crviewer1.ReportSource = report This way I can pass parameters for the view in GetData (if I have any) - filtering in CR tended to be done on the client (i.e. all the data of the table/view was passed to the report and THEN filtered :wtf: - don't know if this is still the case but I use the above approach anyway ... )

      1 Reply Last reply
      0
      • S SekharOne

        How can I display a Crystal Report in VB.Net 2005. I have added a report by clicking on the Add\New Item\Crystall Report on the Solution Explorer window. And I have also desined the report and the data is getting fetched in the design mode. Also how can I change the connection string property during runtime ? Please Help, I am new to Crystall Reports. Thanks in advance.

        Sekhar :)

        U Offline
        U Offline
        Ujjaval Modi
        wrote on last edited by
        #3

        Hi, On your Win Form add crystalreportviewer and reportdocument from the Toolbox. and in code just add following 2 lines : reportdocument.SetDataSource(dataset1.Tables(0)) crystalreportviewer.ReportSource = reportdocument where your dataset contains the report data to be displyed.

        Regards, Ujjaval Modi

        N 1 Reply Last reply
        0
        • U Ujjaval Modi

          Hi, On your Win Form add crystalreportviewer and reportdocument from the Toolbox. and in code just add following 2 lines : reportdocument.SetDataSource(dataset1.Tables(0)) crystalreportviewer.ReportSource = reportdocument where your dataset contains the report data to be displyed.

          Regards, Ujjaval Modi

          N Offline
          N Offline
          Net Programmer 129399
          wrote on last edited by
          #4

          There is no Report Document in the ToolBox. Please can u tell me how to add Report Document in the ToolBox....

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups