Showing posts with label Crystal Reports. Show all posts
Showing posts with label Crystal Reports. Show all posts

Friday, September 12, 2014

How to include crystal report in to form in asp.net

Title: Include crystal reports in to form in asp.net

Description :The crystal report can not be executed separately, Hence we can use a windows form to execute the report
Asp.net provides a control i:e CrystalReportViewer which can be used display the crystal report on the form

Steps have to do invoke the crystal report

1.Drag ―CrystalReportViewer control from tool box to specified form

Properties for Report control:

1.Report Source: EmployeeDetailsReport.
2.Run the solution .Then it will ask a authentication ,there you need to enter a code(PWD) to finish the process
While running the application the report viewer provides the format option to display records(PDF,MS word etc)

Monday, December 10, 2012

How to filter the data in Crystal report


Crystal Report viewer control is providing selection information property
Syntax:CRV.SelectionFormula="Criteria"

Here i will give some examples to filter the data in reports
Query based on numeric
CRV.SelectionFormula="{emp.deptno}=10"
Query based on string
CRV.SelectionFormula="{emp.nob}"="head"
Query based on date
CRV.SelectionFormula="{emp.expDate}"="#11/12/2012#"
We can use operators  >,<,in,like etc to filter the data.

Design of crystal reports

Title: Design of Crystal reports in asp.net

From VS 2008 to current version  providing the crystal report designer for generating reports towards windows form and web form.The applications should provide report generation to make data entry operator job easier.Report is formatted data with proper management.The info can be arranged in diffident section

*Report Header section:The info will be placed with in the first page of report
ex:Company name,logo,date etc
*Page Header Section :The information will be placed with in each page of report at the top
*Group Header Section:This will display grouped column information.It will avoid repetition
ex:display (deptno) only once
*Details section:It will display each record information
*Group footer section: Will display calculated value with respect to grouped columns
ex: sum of sals  w.r.t dept
* Page footer Section:The information will be displayed at the end of page.
ex:One out of count,turn page..etc
*Report footer Section:It will display information at the end of page.
total salary payed for all the emps

Tuesday, April 17, 2012

How to use DataReadear in asp.net

Title: What is Data Reader and How to use Data reader

Description:Data reader is Read only and forward only.Simple description for those two properties
Read Only-->Data Reader doesn't support manipulation[insert,delete]
Forward Only-->Data Reader supports Reading records is forwarding direction[Reading only once]

VB.Net:
Dim cms As New OleDbCommand("select*from dept",cn)
Dim dr As OleDBDataReader
dr=cms.ExcuteReader()

C# Syntax:
Before going to use the data reader we should add the name System.Data.SqlClient to our application
SqlDataReader reader =new SqlDataReader();
dr.Read():-It will fetch a record into application process.It returns True fetching record is successfully else false
dr.Item(ColIndex/ColName) or dr(ColIndex/ColName) :-This can be used for any type of data
dr.GetData():-It will produce  better performance
dr.FieldCount:-It returns column count
dr.HasRows:-True:Records are available
                     False:Records are not available
dr.Close:-It will Release memory
dr is a pointer to the temp memory.where the records stored.
Data Reader will fetch record by record and it will consume only one record memory with in  application process.This will reduce burden on application process.Data Reader is strongly recommend when the application requirement is reading data only once with out manipulation

Bel