Crystal Reports in ASP.NET using C#

Irit Kushwaha
GDSC UMIT
Published in
3 min readDec 31, 2021

Quick Overview 🚀

Let’s first understand what specifically crystal report stands for Crystal Reports is the standard reporting tool for Visual Studio .NET used to display data of presentation aspect. You can illustrate multiple-level totals, charts to research data, and far more in Crystal Reports. Developing a Crystal Report requires minimal coding since it’s developed within the Designer interface. It is accessible as an integrated feature of Microsoft Visual Studio.NET.

Dive Deep into How Crystal Report works 🤔

We will initially download the Crystal Reports from the source and install it on our system, then using some simple code we will proceed.

Now I added a crystal report to the ASP.Net Application by giving its the name “demo.rpt”.

You must then go to crystalrpt_demo then right-click then select Add New Item -> Find Crystal Report.rpt file.

When you add this new Crystal Report Gallery opened then you get a dialog in which you have to select Using the Report Wizard option.

  • Once you press OK, the Report Wizard starts and you need to Right-click on Field Explorer then select Database Expert -> Create New Connection. You will need to find the table that you made in the Dataset, Newtbl_data.
  • Next, the Wizard asks for the Columns or Fields from the DataSet which need to display on the Crystal Reports. So, you require to add that table to the right side pane using the “ >>” button then again press OK.
  • Now You will get your table_data in Field Explorer

Once you click on finish Crystal Report your crystal report should look like as below image❕

Sort Report

If you want to sort the report in ascending order according to any of your attributes, you have to right-click on the blank side of the demo.rpt and click on sort. In the Report option, you have to click on report sort expert.

Design

Now open your demo.aspx file, where we create our design for Crystal Reports. We will add a Crystal Reports Viewer here.

Code

Open your demo.aspx.cs and write some code so that the application works.

Conclusion 🙇‍♀

That is it as far as basics go when it comes to using Crystal Report. There is obviously so much more to know and I would definitely encourage you to build a few small projects and experiment 💪

If you have any questions about this tutorial, please let me know in the comments section of this blog post. You can also contact me through Linkedin. I’m happy to assist you 😊!

--

--