SlideShare a Scribd company logo
1 of 26
Crystal Report
• What is crystal report?

• How to implement using crystal report
What is crystal report
• Crystal Reports is a business intelligence application used to
  design and generate reports from a wide range of data
  sources.
• Crystal Reports is the built-in report designing tool in Visual
  Studio .NET and it is fully integrated with windows and web
  applications.
How data transferred
• Imagine we are using ADO .NET to get a subset of data from
  SQL Server and store it in a DataSet. Then we conduct the
  data from dataset to CrystalReportViewer object to be
  displayed.
• SQL Server -> SQLConnection -> SQLDataAdaptor -> DataSet -
  > CrystalReportDocument -> CrystalReportViewer -> ASP .NET
  web page.
• In .NET application Crystal Report Document reads the data
  from dataset, NOT directly from data provider and this is the
  key point to Crystal Report integration with .NET.
Crystal Report Advantages
• major advantage of using crystal report for
  visual studio .NET are
  *Rapid report development
  *can extend it to complicated reports with
  interactive charts
  *can programmatically export the reports into
  widely used formats like
  .pdf,.doc,.xls,.html,and .rtf
Publish Content Into Crystal Report
• ***There are 2 ways to publish content into Crystal
  1. Pull Method
  2. Push Method

* Crystal Reports, like many other applications, connects to a
  database by way of a database driver, where each driver is
  designed to handle a specific database type or method of data
  access. With Crystal Reports, you can use one of two models
  of accessing data: "Pull" and "Push."
Pull Model
• In this model, the report will connect to the database, using
   the parameters given to it a design time, to pull the data as
   needed.
• In this mode, all of the work is done by the report:
 * connecting to the database and issuing the SQL commands;
 *These are all handled without any coding from the developer.
 *This is the default model of Crystal Reports.
Push Method
• The push model involves code written by a developer that:
 * creates and calls a connection on the database,
 *executes the SQL commands,
 *creates a record set or dataset that matches the fields in the
  report, and then assigns the object to the report.



This model also allows the shaping and filtering of data before it
  reaches the report.
Steps to create a crystal report
• Create a new website and right click on solution explorer >
  add new Item > Select Crystal Report
  In the dialog box choose blank report.
• Now click on CrystalReports Menu in VS and select DataBase
  Expert
• In database expert dialog box expend create new connection
  > OLEDB(ADO) section
• Now select Microsoft OLE DB provider for sql server
• Connection information
• Selected data base you choose was selected
• In next screen Expend your database objects in left pane and
  add the tables you want to use in right pane
• Then after next step view the field explore shown like this
• Now design the report , drag and fields from Database fields
  in field explorer and which you want to show in report and
  drop them in Section3(Details), and preview the report, it
  should look like show below.
• Report preview look like this
Create a aspx page
• <form id="form1" runat="server">
  <div>
 <CR:CrystalReportViewer ID="CrystalReportViewer1"
  runat="server" AutoDataBind="True" Height="1039px"
  ReportSourceID="CrystalReportSource1" Width="901px" />
 <CR:CrystalReportSource ID="CrystalReportSource1"
  runat="server">
 <Report FileName="CrystalReport.rpt"> </Report>
  </CR:CrystalReportSource>
 </div>
 </form>
Code Behind
• Protected Sub Page_Load (ByVal sender As Object, ByVal e As
  EventArgs)
  Dim crystalReport As New ReportDocument()
  crystalReport.Load(Server.MapPath("CrystalReport.rpt"))
  crystalReport.SetDatabaseLogon ("amit", "password",
  "AMITSQLEXPRESS", "TestDB")
  CrystalReportViewer1.ReportSource = crystalReport End Sub
Thank you
Disclaimer: This presentation is prepared by trainees of baabtra as a part of
mentoring program. This is not official document of baabtra – Mentoring Partner
baabtra – Mentoring Partner is the mentoring division of baabte System Technologies Pvt. Ltd
Contact Us

More Related Content

What's hot

What's hot (20)

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Components of .NET Framework
Components of .NET FrameworkComponents of .NET Framework
Components of .NET Framework
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Advanced sql
Advanced sqlAdvanced sql
Advanced sql
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation Techniques
 
Component based software engineering
Component based software engineeringComponent based software engineering
Component based software engineering
 
Design notation
Design notationDesign notation
Design notation
 
Applets in java
Applets in javaApplets in java
Applets in java
 

Similar to Crystal report

Crystal Reports Review
Crystal Reports ReviewCrystal Reports Review
Crystal Reports Review
Justin R. Rue
 
Hitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BIHitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BI
Andrew Brust
 
SQL Server Reporting Services
SQL Server Reporting ServicesSQL Server Reporting Services
SQL Server Reporting Services
Ahmed Elbaz
 
Vb.net session 16
Vb.net session 16Vb.net session 16
Vb.net session 16
Niit Care
 

Similar to Crystal report (20)

crystal report
crystal reportcrystal report
crystal report
 
Rdlc (1)
Rdlc (1)Rdlc (1)
Rdlc (1)
 
crystalReport.pptx
crystalReport.pptxcrystalReport.pptx
crystalReport.pptx
 
Crystal Reports Review
Crystal Reports ReviewCrystal Reports Review
Crystal Reports Review
 
MSBI-SQL Server Reporting Services
MSBI-SQL Server Reporting ServicesMSBI-SQL Server Reporting Services
MSBI-SQL Server Reporting Services
 
Business Intelligence Technology Presentation
Business Intelligence Technology PresentationBusiness Intelligence Technology Presentation
Business Intelligence Technology Presentation
 
SQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 QuestionsSQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 Questions
 
Deliver Dynamic and Interactive Web Content in J2EE Applications
Deliver Dynamic and Interactive Web Content in J2EE ApplicationsDeliver Dynamic and Interactive Web Content in J2EE Applications
Deliver Dynamic and Interactive Web Content in J2EE Applications
 
Pnbhfl training final
Pnbhfl training finalPnbhfl training final
Pnbhfl training final
 
Ssrs 2008 R2 webinar
Ssrs 2008 R2   webinarSsrs 2008 R2   webinar
Ssrs 2008 R2 webinar
 
It ready dw_day4_rev00
It ready dw_day4_rev00It ready dw_day4_rev00
It ready dw_day4_rev00
 
Hitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BIHitchhiker’s Guide to SharePoint BI
Hitchhiker’s Guide to SharePoint BI
 
SAP Business Objects Trianing
SAP Business Objects TrianingSAP Business Objects Trianing
SAP Business Objects Trianing
 
Balamurugan msbi cv
Balamurugan msbi cvBalamurugan msbi cv
Balamurugan msbi cv
 
Azure Data Factory V2; The Data Flows
Azure Data Factory V2; The Data FlowsAzure Data Factory V2; The Data Flows
Azure Data Factory V2; The Data Flows
 
AhmedWasfi2015
AhmedWasfi2015AhmedWasfi2015
AhmedWasfi2015
 
SQL Server Reporting Services
SQL Server Reporting ServicesSQL Server Reporting Services
SQL Server Reporting Services
 
Vb.net session 16
Vb.net session 16Vb.net session 16
Vb.net session 16
 
Ssrs tutorial
Ssrs tutorialSsrs tutorial
Ssrs tutorial
 
how to move data from on premise to ssis in google cloud platform ,azure, sno...
how to move data from on premise to ssis in google cloud platform ,azure, sno...how to move data from on premise to ssis in google cloud platform ,azure, sno...
how to move data from on premise to ssis in google cloud platform ,azure, sno...
 

More from baabtra.com - No. 1 supplier of quality freshers

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 
Baabtra soft skills
Baabtra soft skillsBaabtra soft skills
Baabtra soft skills
 

Crystal report

  • 1.
  • 3. • What is crystal report? • How to implement using crystal report
  • 4. What is crystal report • Crystal Reports is a business intelligence application used to design and generate reports from a wide range of data sources. • Crystal Reports is the built-in report designing tool in Visual Studio .NET and it is fully integrated with windows and web applications.
  • 5. How data transferred • Imagine we are using ADO .NET to get a subset of data from SQL Server and store it in a DataSet. Then we conduct the data from dataset to CrystalReportViewer object to be displayed. • SQL Server -> SQLConnection -> SQLDataAdaptor -> DataSet - > CrystalReportDocument -> CrystalReportViewer -> ASP .NET web page. • In .NET application Crystal Report Document reads the data from dataset, NOT directly from data provider and this is the key point to Crystal Report integration with .NET.
  • 6. Crystal Report Advantages • major advantage of using crystal report for visual studio .NET are *Rapid report development *can extend it to complicated reports with interactive charts *can programmatically export the reports into widely used formats like .pdf,.doc,.xls,.html,and .rtf
  • 7. Publish Content Into Crystal Report • ***There are 2 ways to publish content into Crystal 1. Pull Method 2. Push Method * Crystal Reports, like many other applications, connects to a database by way of a database driver, where each driver is designed to handle a specific database type or method of data access. With Crystal Reports, you can use one of two models of accessing data: "Pull" and "Push."
  • 8. Pull Model • In this model, the report will connect to the database, using the parameters given to it a design time, to pull the data as needed. • In this mode, all of the work is done by the report: * connecting to the database and issuing the SQL commands; *These are all handled without any coding from the developer. *This is the default model of Crystal Reports.
  • 9. Push Method • The push model involves code written by a developer that: * creates and calls a connection on the database, *executes the SQL commands, *creates a record set or dataset that matches the fields in the report, and then assigns the object to the report. This model also allows the shaping and filtering of data before it reaches the report.
  • 10. Steps to create a crystal report
  • 11. • Create a new website and right click on solution explorer > add new Item > Select Crystal Report In the dialog box choose blank report.
  • 12. • Now click on CrystalReports Menu in VS and select DataBase Expert
  • 13. • In database expert dialog box expend create new connection > OLEDB(ADO) section
  • 14. • Now select Microsoft OLE DB provider for sql server
  • 16. • Selected data base you choose was selected
  • 17. • In next screen Expend your database objects in left pane and add the tables you want to use in right pane
  • 18. • Then after next step view the field explore shown like this
  • 19. • Now design the report , drag and fields from Database fields in field explorer and which you want to show in report and drop them in Section3(Details), and preview the report, it should look like show below.
  • 20. • Report preview look like this
  • 21.
  • 22. Create a aspx page • <form id="form1" runat="server"> <div> <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" Height="1039px" ReportSourceID="CrystalReportSource1" Width="901px" /> <CR:CrystalReportSource ID="CrystalReportSource1" runat="server"> <Report FileName="CrystalReport.rpt"> </Report> </CR:CrystalReportSource> </div> </form>
  • 23. Code Behind • Protected Sub Page_Load (ByVal sender As Object, ByVal e As EventArgs) Dim crystalReport As New ReportDocument() crystalReport.Load(Server.MapPath("CrystalReport.rpt")) crystalReport.SetDatabaseLogon ("amit", "password", "AMITSQLEXPRESS", "TestDB") CrystalReportViewer1.ReportSource = crystalReport End Sub
  • 25. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra – Mentoring Partner baabtra – Mentoring Partner is the mentoring division of baabte System Technologies Pvt. Ltd