Creating your First Crystal Report for Use in a .NET Application
page 5 of 6
by Jeff McWherter
Feedback
Average Rating: 
Views (Total / Last 10 Days): 29092/ 48

Beginner Tips

The first half of this article discussed creating a Crystal Report file, including it in your custom .NET application and then getting data to the report. The steps to accomplish this are not the complicated, but the report that we are rendering is not that complex either. The great thing about using a reporting package is the ability to adapt as reporting needs become more complex. Clients will often nit-pick every detail on reports.

Crystal Reports Processing

One of the most common complains about Crystal Reports is that reports take a long time to render. The team that created Crystal Reports has spent a great deal of time in recent versions correcting the performance issues. That being said, keeping the processing that Crystal Reports performs on the data to a minimum is still a wise course of action.

For example, Crystal Reports includes functionality to order records by fields. It is still better to order your data before it gets to the Crystal Report, since your database server will be able to perform this action much more quickly than Crystal Reports will.

Exporting

One of the most powerful features in Crystal Reports is the ability for your users to export your Crystal Report to over 14 other formats.

Crystal Reports RPT

HTML 3.2

HTML 4.0

Microsoft Excel (93-2007)

Microsoft Excel Data-Only (93-2007)

Microsoft Word (93-2007)

Microsoft Word Editable (93-2007)

PDF

Record Style-Columns with spaces

Record Style-Columns without spaces

Rich Text Format (RTF)

Separated Values (CSV)

Tab Separated Text (TTX)

Text

XML

It is beneficial to have the ability to export to all these different formats, but the export feature in Crystal Reports does not export each format in exactly the same way. This primarily comes from the way that the developer created the report, and also which format the report is being exported to. If you decide to allow your users to export your Crystal Report, I suggest you officially support the export to PDF (they always look exactly like the RPT file that was generated) and inform the users that the other exports may render the report a bit differently.

This is not to say that a report can’t be “tweaked” to work with all of the different export options, but it can be cumbersome to do so.

Grouping

One of the most commonly used features when creating a report is grouping similar data together. This is one of the biggest advantages of using a reporting package such as Crystal Reports. The example in Figure 4 shows the employee data used in other examples grouped by city.

Figure 4: Report grouped by city

 

To group similar data in Crystal Reports, use the “group” option, which can be found under insert>group in the Crystal Reports stand alone editor.

Figure 5: The group menu

You will then be prompted for which fields you would like to group by. For our example, we will just be grouping by the city field and not worrying about any other options.

Figure 6: Selecting a field to group the report on

After the group has been created, your report now contains two more sections: Group Header #1 and Group Footer #2. This allows you to place data specific to the group in these sections. It is common to place the field that is being group in the group header.


View Entire Article

User Comments

Title: Many thanks   
Name: binam
Date: 2010-10-19 3:29:41 AM
Comment:
Many Many thanks for this article .
Title: A Look at Crystal Reports   
Name: Tahir Yaqoob
Date: 2010-10-11 6:35:28 AM
Comment:
A very nice article for any beginner to crystal reports.... thank's baby!!!!!!
Title: Article   
Name: Shawpnendu
Date: 2010-05-10 8:51:42 AM
Comment:
Very nice for novice developers.
Title: General Help with Crystal   
Name: Elizabeth
Date: 2010-04-27 3:18:06 PM
Comment:
Very helpful. A get started article allowing me to use Crystal without a lot of time spent learning.
Title: Article   
Name: Junaid
Date: 2010-03-22 9:42:00 AM
Comment:
It is such a useful to us. as i am a beginner so i got a very clear idea about Crystal Report.
Title: article   
Name: dave himanshu
Date: 2010-03-22 6:55:26 AM
Comment:
such a good job!!!
Title: deploy crystal report   
Name: john
Date: 2010-03-16 8:06:24 PM
Comment:
Great article. Thanks.

Once I have created a crystal report using visual studio 2008, what do I have to deploy to my server for the report to work on a shared hosting server?

Product Spotlight
Product Spotlight 



Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-18 6:58:53 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search