Crystal Reports

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Funky
    New Member
    • Mar 2008
    • 13

    Crystal Reports

    Hello guys!

    I'd like to use Crystal Reports in my application to print out some data. I added an instance of the crystalReportVi ewer class to my form. Then I created a DataSet based on a Access databse which contains some data. Then I created a report with te wizard and added to it some fields from the DataSet.

    When I run the program, the data aren't visible in the report. I tried to refresh the view and they're still not shown. Is there a method I need to call to load data that they're getting loaded into the crystalReportVi ewer? I didn't find any useable information by my self.

    Thanks,

    regards.
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by Funky
    Hello guys!

    I'd like to use Crystal Reports in my application to print out some data. I added an instance of the crystalReportVi ewer class to my form. Then I created a DataSet based on a Access databse which contains some data. Then I created a report with te wizard and added to it some fields from the DataSet.

    When I run the program, the data aren't visible in the report. I tried to refresh the view and they're still not shown. Is there a method I need to call to load data that they're getting loaded into the crystalReportVi ewer? I didn't find any useable information by my self.

    Thanks,

    regards.
    plenty of resources in the net........you have to set the ReportSource of the reportviewer like this,......

    [CODE=vbnet]
    Dim myReport As New CrystalReport1
    myReport .SetDataSource( myDataset)
    myCrystalReport Viewer.ReportSo urce = myReport
    [/CODE]

    see this........... ....
    Crystal Report Viewers work as a container of a report and allow us to view a crystal report in Windows and Web applications. Crystal Reports for Visual Studio .NET provides two report viewers – Windows Forms Viewer and Web Forms Viewer.


    Here I will show you how to create a simple report using Crystal Reports and Visual Studio .NET. Here we will learn to add a Report to a Project, add a Data Source, add a Crystal Report Viewer Control, attaching Report to Crystal Report Viewer Control.

    Comment

    • Funky
      New Member
      • Mar 2008
      • 13

      #3
      In fact I used the wizards to accomplish all mentioned tasks. I'm using Visual studio 2008 with Crystal Reports installed. So the report, created thrugh the wizard has set the ReportResource. I added only an instance of the CrystalReportVi ewer class to the Form and in that class I select the report which soulhd be represented by the viewer. I thing the data should be shown. The actual data from the database aren't shown even in the preview of the report (in vs2008). There are some random data, created by the IDE. I just don't get it.

      Thanks for your posted links. I'm going to read the articles and maybe I could accomplish my tasks programmicaly.

      But I'm wondering why the data aren't shown in the viewer although I used the wizards.

      Regards.

      Comment

      • Funky
        New Member
        • Mar 2008
        • 13

        #4
        I really don't get it. I followed hints in this example: http://www.dotnetforce.com/Content.aspx?t=a&n=179

        I created a test mdb database, added a table and some data into the fields. Then I created a DataSet and chose the option that copies the database to the bin folder each time the project gets compiled. Then I created a Crystal Report and added fields to it per wizard and next time I tried also manually. In the CrystalReportVi ewer I chose the report, next try I programmicaly chose the ReportSource of the report viewer (as a object of the crystal report and as a filepath to the rpt file).

        It just doesn't work!

        I tried also to use the MicrosoftReport Viewer. I added an instance of it to a Form, choose "Design a new report" from it's object and when I complete the wizard (choose the table from the DataSet and the fields to be displayed), I get an error when the Report should appear in the designer:
        Warning 1 Deserialization failed: The element 'TableCells' in namespace 'http://schemas.microso ft.com/sqlserver/reporting/2005/01/reportdefinitio n' has incomplete content. List of possible elements expected: 'http://schemas.microso ft.com/sqlserver/reporting/2005/01/reportdefinitio n:TableCell'. Line 65, position 20. 65 0

        I found on the web that it's a bug but no advices for a work-around or something.

        I'm using Visual Studio 2008.

        Please if someone could help!

        Regards

        Comment

        Working...