Presentation Crystal Report

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 17

Pre-requisites:-

1) CRUFLIscii.dll must be registered (using regsvr32 and the path of the Dll in the run prompt)

2) Put Ismapi32.dll and *.fa32 and *.fra32 (eg: dvbwfa32.dll, dvbwfra32.dll) .


Adding a Crystal Report to a Project

To add a report to the project, add a new item by Right Clicking on the project
in Solution Explorer and selecting Add->Add New Item->Crystal Report as you
can see in Figure
Crystal Report Gallery provides three options Using the Report Expert, As a Blank Report, or From an
Existing Report.
Standard Report Expert wizard

Select Data Source according to your Data Base. In this Example we have used MSAccess.
Now our next step is to link a data source to the wizard click on the OLE DB(ADO) tree item in the below
Figure. For MS Access we selected Jet Provider
Select the Data Base and press Finish.
Now on this page, I selected Stud table and add it by clicking Insert Table button. Now you can see the table
listed in the right list box. See Figure.
The Table Stud contains 4 fields namely Rollno,Name,M1 and M2 which can be seen in the figure Below.
Name is the only field which contains ISCII data which needs to be converted to ISFOC.To do the conversion
click on the formula button which will popup a dialog box give a name to the formula i.e.) Conversion
press ok button which will open a formula editor.
Go to Additional functions -> Visual Basic Ulfs you will find a exported function called iscii2Isfoc from the
CRUFLiscii.dll. Double click on it. Which will display the function in the lower part of the screen.
Now Select the field that needs to be converted to ISFOC.In our case the field name is Name. So double click
on the Name which will be filled automatatically as the first parameter in the formula. The second
parameter takes the Script Mnemonic.
Now save the changes that has been made to the formula and exit from the formula editor. After this the
formula appears on the top on the standard report expert dialog.
Now add the fields and the Conversion formula to the Fields to Display List box. And press finish button.
The generated report looks like this. Select DVBW-TTYogeshEN font to all the fields.
Now go to the form and add the crystal report viewer from the tool bar.
Add the following code snippet in the form load event of the application.

private void Form1_Load(object sender,


System.EventArgs e)
{
CrystalReport1 custReport = new
crystalReport1();
CrystalReportViewer1.ReportSource =
custReport;
}
Now Run the application and click on the play button which is third from the left. The output appears like the
one below.

You might also like