Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A
dotnetinter

C# and .NET interview Question - How to implement crystal report in a project?


Answer:

Any project you take in .NET or any language reporting is an integral part of
the application. You will rarely find application without reports. Due to heavy
usage of reporting in application this topic becomes a hot favorite of
interviewers.  There are two prominent technologies by which you create reports
in .NET one is crystal reports and the other is SQL reporting services.  In this
question we will try to answer from the crystal report point of view.

So again a very typical .Net interview question which is asked to understand if
you know how to create crystal report.

Let’s demonstrate a simple example to see that, how we can create crystal report
in our project.

Creation of crystal reports its basically 7 step process as following.

Step 1:-This is very simple and basic step for adding crystal report in the
project for that just click on the "Project" menu and select "Add New Item" -->
"Reporting"--> "Crystal Report".











Step 2:-When you click on add button the following window will appear and you
can select your choices according to your project requirement and then click OK.







Step 3:-As soon as you click on OK button a new window will appear from that
expand Create New Connection ->OLEDB(ADO)  as you can see in below diagram.







Step 4:-Now, Expand the OLEDB(ADO) folder and a new window will appear with all
the connection providers from that you can select your own connection provider
name and click on “Next”.







Step 5:-When you click on Next a new window will pop-up where you can define
your server name and your database name then click on Next another window will
pop-up then click on “Finish” later you can see a new window like below diagram
with your selected database then you can select the table on which you want to
generate report and click on “Next”.







Step 6:-Choose the field name, which you want to display on your report and
click on “Finish”.







Step 7:-Once you have completed the above step then create a new form and place
a CrystalReportViewer from the toolbox and define the report source like below
diagram.









Once you select the report source click on “OK”, now you can run your project
and see the report.






Please click here to see more C#/ .NET interview questions

Regards,



Visit Authors blog for more C# and .NET interview questions
Tags: .net and c# interview questions, .net and c# training, .net interview questions and answers, csharp interview questions, information technology questions, programming interview questions
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments