Part 1:
What is SAP Crystal Reports?
SAP Crystal Reports is a BI tool for generating analytical reports from SAP and other non-SAP data sources like Oracle, SQL Server, MySQL, XML Data Source, Microsoft Excel, etc. The knowledge of this tool helps businesses to develop advanced level reports and take accurate and profitable business decisions based on these reports.
History of Crystal Reports
- Terry Cunningham and his peers created the software in 1991
- In 1994, Crystal Services was acquired by Seagate Technology.
- Crystal Decisions software was acquired in December 2003 by BusinessObjects.
- In the year 2004, version 11 released.
- SAP acquired BusinessObjects on October 8, 2007
- Crystal Reports Version 14.0 released in 2011
- Version 14.1 released in 2013
- Version 14.2 released in 2016
Components of Crystal Reports
Now in this Crystal Reports Tutorial, we will learn about components of Crystal reports:
The Report Design Canvas helps you to design the structure of your report. You can include different elements like charts, test, data objects in the reports.
Rules:
Rules option displays a rule above the report canvas. However, the tool allows you to change the unit of measurement by changing the unit option on the design canvas tab.
Structure mode:
Structure mode and Page mode helps you to define the layout of the reports. Each object in the structure mode is represented by a frame.
Important components of structure mode are given below:
Structure mode Components
Component Name | Details |
Report Header | It is used for adding Report title at the top or any other information you want to add at the starting of the report. |
Page Header | Page header is used to present information at the top of each page. Header section generally includes document heading, chapter name, etc. |
Page Footer | Use to present page numbers or any other information at the end of each page. |
Body | This section displays the body of the report. All report data should be included in this section. |
Page Mode | Page mode view represents the actual data in the report when the report will be published or printed. |
Data Sources
Crystal Report helps you to connect to multiple data sources, which include:
- HANA view
- Relational Connection
- SAP BEx Query
- Excel Spreadsheets
Step 1) How to connect to the Data source,
Go to File -> New -> From Data Source
To select a data source, you must connect to the SAP Business Objects platform server.
File -> New -> From Data Source -> Choose a data source connection dialogue box appears -> Browse Repository -> Data Source Type list -> Select data source you want to connect -> Next.
Features of Crystal Reports
Following are the features of SAP Crystal Reports:
- Allows you to interact with various data sources
- It can avoid the intervention of middle layers like Universes
- Easy interaction with SAP HANA
- Powerful report design
- Flexible application development
- Report management and delivery
- Administration via Web Interface
- Easy navigation system
- Tracks information and keep our data organized
- Live Connection to External Data
- Multi-Data Source Reporting
- OLAP (Pre-processed cube representation)
- ROLAP (SQL-layer querying)
Uses of Crystal Report
SAP Crystal Reports is used to extract custom analytical reports from various data sources. Crystal Reports also help businesses for creating a database reporting environment to access data, format data, view the data, and integrate the reports with various applications to make it available for all the users in the organization.
Crystal Reports – GUI Navigation
Crystal Reports for enterprise offers an interface which allows you to create, format, and publish effective reports. The menu bar of crystal reports provides wide ranges of features shown in the following image.
The insert tab helps you to insert an object into your reports like text, line, box, groups, sections, pictures, and charts.
The Format tab helps you to use functions for formatting the selected file like changing the size or font and background color, alignment of text to center, left, right, etc.
Crystal reports support conditional formatting, like highlighting values above or below a particular value in the report.
When selecting a conditional formatting option at the top right corner, select the formatting box. In this box, you can give condition under which you want conditional formatting to appear.
What are the Benefits of Crystal Report?
Here are benefits/advantages of using SAP Crystal Reports:
- Allows you to create highly pixel-perfect reports using SAP crystal report with easy design interface and efficient workflows.
- Helps you to build personalized reports in your preferred language and format.
- You can connect to information sources directly, which include: Native data, OLE DB, ODBC, JDBC connectivity to relational DB, OLAP, web services, etc.
- Helps you to export more data to a single worksheet, without extending it to multiple sheets.
- Crystal report tool allows you to open interactive reports through your mobile devices.
- Helps you to produce a report from virtually any data source.
- Allows you to analyze and interpret important information.
- Data connection procedures are straight forward.
- Helps you to access the trusted data
- Allows you to navigate to the lowest level of data granularity
- Helps you to create a customized reporting view you need for your business.
What are the Disadvantages of Crystal Reports?
Here are the drawbacks/cons of using SAP Crystal Reports:
- Crystal report is not a very user-friendly tool for learning as error decryption is tedious and hard to figure out.
- Using sub-reports, which are embedded with main reports for different views of the same data sourced from different tables, makes the entire process very slow.
- Security is a big concern at times while accessing data.
- Crystal reports a new version doesn’t work with older engines.
- Incorporating reports to webpages sometimes crashes.
- A stable internet connection is always needed for the software to function well.
- The company does not offer any free trial plan.
Part 2 :
1) Explain what is Crystal Reports?
Crystal report is a window based report writer that enables the programmer to make reports from different data sources with a minimum of written code. Crystal report can access data from various data-bases and can synchronize data from multiple databases into a single report.
2) Explain how can you connect crystal report to the databases?
To connect crystal report to the databases, there are two ways
- Use crystal report built in query
- Use the tool “Crystal SQL Designer” given by crystal report
3) Explain whether it is possible to create our own formulas in crystal reports?
Yes, it is possible to create your own formulas in Crystal reports. For that from insert menu item choose “Formula Field”. Write the formula in “Formula Editor”, here you will see “Function Tree” , “Field Tree” , “Operator Tree” which will show the report fields, functions supported by crystal reports, operators etc.
4) Is it possible to edit SQL made by Crystal Reports?
No, it is not possible to edit SQL made by crystal reports, however you can view the SQL.
5) Explain how can you enhance the performance of Crystal Reports?
To improve the performance of Crystal Reports
- Avoid using sub-reports as it hampers the performance
- Use report bursting indexes
6) Mention what all new features available in SAP Crystal?
In SAP Crystal, you have following features
- Streamlines report design
- Improvement to data sources
- Mobile and viewer support
- OEM and developer features
7) Mention what are the data source that SAP business one supports for Crystal reports?
For crystal reports the data-source that SAP business one supports are
- SAP Business One
- OLE DB (ADO)
8) List out some of the key difference between SSRS and Crystal Report?
- SSRS has table base design pattern while in CR you can place objects anywhere
- Export to Excel in SSRS is easy than Crystal Report
- To manage your data crystal report have several options while SSRS does not have any
- Crystal report has client side report creation API, that allows the client to modify and create new reports
- SSRS uses expressions while Crystal Report uses formula in C and basic
- SSRS is compatible with Share-point list and can generate reports based on lists
- Both of them support OLAP connections
9) Mention what is the general syntax for creating SAP business one token?
To create SAP business token the general syntax includes
<Parameter Name>@ SELECT….FROM…..WHERE, the SELECT command is not necessary for all tables.
10) Explain how you can edit crystal reports layout in SAP business one?
To edit crystal reports layout in the SAP business one
- Go to the main menu of the SAP business one -> choose administration -> set up -> General -> Report & Layout Manager
- In Report & Layout Manager window, in the navigation panel on the left, scroll down to the document type of the layout you need to edit
- In the work space on the right, select the crystal reports layout you need to edit and select edit
11) Explain how can you create a bar-code in crystal reports?
To create a bar-code in crystal reports, you have to follow the following steps
- In crystal report, from the main menu -> Click on View -> Design -> Field Explorer
- Choose formula field and click on New icon on the top of the menu bar
- Enter the name for the new formula like MYUPCEANBarcode and click OK
- Now enter the name and argument into the editor UPCA ({items.item_barcode}). The item_barcode is the table name and field name from data source. Click on Save and Close. The function names may be listed under any one of the locations, either in “Functions>additional functions> Visual basic UFLs (u2lcom.dll)” or in “Functions>Additional Functions>COM and.NET UFLs (u212com.dll)”
- The new function will appear in Field Explorer now, to use it drag/drop it onto the report
- Drag the field onto the report and configure its font properties
- Report is ready, click on the preview to see or print
12) Mention how many sub-reports can be added in the MainReport?
In the MainReport, you can add 255 sub reports, and you cannot add sub-report under a sub-report.
13) Explain how can you export crystal report with linked sub-reports into one excel sheet?
- First create a main report and sub report discretely
- Now open the main report and in the insert menu, choose sub-report option
- In sub-report option, “select an existing report”
- Choose the sub-report that is already created
- Place the link between the Main report and Sub report with the fields required
- Now, export the report to Excel Format.
14) Explain how can you burst crystal reports by e-mail?
There are traditionally three methods to burst crystal reports by e-mail
- Using a PDF tool
- Using Crystal Reports Scheduler such as CRD
- Data driven publishing method
15) Mention if there are any limitation of crystal report?
Limitation of crystal report includes
- If database is having field whose length is more than 255 characters then you cannot make formula using that field
- Formatting is lost while exporting data
- By right clicking on the field you can browse data that is in the database and not the data selected by the query
16) Mention whether we can use our own SQL for creating a report?
You can create your own query by using tool “Crystal SQL Designer”. You can insert your own SQL statement, it will save your file as “.qry”. Also, while creating a report instead of using “Database” button use “Crystal SQL Statement” button.
17) Explain what does it mean when you choose Enforce to, Enforce and or Enforce from in Crystal Report?
Enforce and, Enforce to or Enforce from in crystal reports are chose to enforce link created in report. Enforcing a link between tables make sure that the report’s respective SQL uses this link, regardless of whether fields are required from one or both the involved tables. The default function is unenforced links, which means that the crystal report uses the link only if the report’s respective SELECT statement needs it.
Part 3 :
- Can we use Crystal report as a stand-alone application?
Generally we use Crystal Reports with VB6. However we can make crystal report stand-alone application also. But for that limitation is for viewing the report user should have crystal reports installed on his/her PC.
- How do we format field?
For formatting any field just right click on it and you will get many options like ‘Format Field.’ ‘Browse field data’ etc. Click on ‘Format Field.’ You can align data, suppress, make it multi-line, change the font size, style, and type, make it hyperlink etc.
If it is an amount field then you can display currency symbol also. Right click on the field select ‘Format Field’.
- Can we give parameters to the report?
We can very well give parameters to the report. For creating parameters select ‘Parameter Field’ in Insert menu item. ‘Create Parameter Field’ dialog box will popped up, it will ask for the name of parameter, prompting text and datatype. Now when you run the report it will prompt for these parameters.
- Can we create our own formulas in reports?
We can create our own formulas in reports. Select ‘Formula Field’ in Insert menu item. Write the formula in ‘Formula Editor’. Here you will get ‘Field Tree’, ‘Function Tree’, and ‘Operator Tree’, which will display the report fields, functions that are supported by crystal reports (like CDATE () etc.), operators (arithmetic, strings etc.) respectively.
- Can we create report using more than one database?
We can create report using more than one database like Oracle, Access. Create data source name for both the databases. Select tables from them and create the report. Only restriction is if you use two databases then you cannot see the SQL generated by crystal reports.
- Can we export data of reports into other format like in world doc etc?
Generated data can be exported to word doc, or in rich text format. Just click on ‘Export’ icon in the menu. Export dialog box will be popped up. It will ask for the ‘Format’ like comma-separated value (csv) etc and the ‘Destination’ like disk, application etc. After that it will ask for the file name and save the data.
Only restriction is formatting of data will be lost, but crystal report will try to maintain as much formatting as it can.
- Can we use our own SQL for creating a report?
We can also make our own query using ‘Crystal SQL Designer’ tool provided by SQL. Here you can insert your SQL statement as such. It will save this file as ‘.qry’ and when you create a report instead of using ‘Database’ button use ‘Crystal SQL Statement’ button.
- Can we edit SQL made by Crystal reports?
We cannot edit the SQL made by crystal reports. However we can view the SQL. For that select ‘Show SQL Query’ in Database menu item. Limitation is if you are using only one database. If you use two databases then you can’t even view the SQL prepared by crystal report.
- Can we suppress printing in crystal reports if 0 records are fetched?
Yes, we can suppress printing if no records are fetched. Select ‘Report Options’ in File menu item. ‘Report Options’ dialog box will pop up. In that there is one option ‘ Suppress printing if no records’ Check this option. If no records are found then nothing will be printed on the report.
- What are the sections that we have in Crystal reports?
Report has got standard sections like ‘Page Header’, ‘Page Footer’, ‘Report Header’, ‘Report Footer’, and ‘Details’. However you can add other sections also. Select ‘Sections’ in the Insert menu item. You can insert group sections also. If you don’t want to show any section just right click on that section and suppress that.
- Can we add any database field once we have chosen ‘Close’ button?
Yes, we can add any database field afterwards also. Select ‘Database Field’ in Insert menu item. If you are using crystal report built in query then it will display the tables that you have selected. And you can select whichever field you want to display on the report. But if you are using ‘.qry’ file then it will display Query and you can select only those field, which are there in the query.
- Does Crystal Report support all the functions that we have in Oracle?
No, Crystal report does not support all the functions. Like Decode function is there in SQL but not there is crystal report. You need to convert that in crystal report format (in if and else etc.).
However if you use ‘.qry’ files then it take the SQL as such. There is no need of changing any syntax.
- Can we use stored procedure for creating the report?
Yes, we can use stored procedure.
- Is there any feature like summing total in crystal report?
Crystal reports provide features like grand total, sub-total, running total etc. You can select any of these features in Insert menu item. You can sum up records on the basis of each record or on change of group using ‘Running Total ‘ option in Insert menu item.
- I am using two tables one is of access database and other is of oracle database, I am getting an error saying that ‘SQL odbc error’ what should I do?
If you are getting such an error then click the icon for ‘Report Expert’. It will give a warning saying that formatting will be lost. Ignore this you will get ‘Standard Report Expert’ dialog box. Reverse the links of access database table and it will work.
- How do we access crystal reports in .NET?
Crystal reports comes with Visual studio setup itself. Right click the solution explorer a add new item and you can see a crystal report template as shown in figure ‘Crystal report template’. You can add an ‘.rpt’ file using this template.
- What are the various components in crystal reports?
There are four major components in crystal reports Report designer, Reports engine, Report viewer and object models.
Report designer gives a graphical interface to create and modify reports.
Reports engine does the formatting and conversion part of crystal reports. It helps convert the contents of reports in word, excel, PDF, HTML and other formats.
Report viewers are controls which you can see on the visual studio tool box; you can drag and drop those controls on an ASPX page or windows application to view reports made using crystal.
Object models help us manage crystal reports objects during design time and run time.
- What basic steps are needed to display a simple report in crystal?
To understand this sample let display a simple report using crystal.
Step 1:- Create a web application project.
Step 2:- Add new item and select crystal report from the template. This adds a new RPT file in your solution explorer.
Step 3 :- Double click on the RPT file click on Crystal reports
Step 4:- a Right click on ‘Database fields’ on the field explorer a then click on database expert a Expand create new connection a Expand OLE DB ADO a Select Microsoft OLEDB provider for SQL Server ( this depends on what kind of data you want to connect ) a Give the server credentials a Click finish and done.
Step 5:- a Right click on ‘Database fields’ on the field explorer a then click on database expert a Expand the server , database and select table which you want to add to the report
Step 6:- a Expand database fields a table ( in this case it is ‘FactCurrencyRate’ table). Now you can drag and drop the fields on the report.
Step 7:- a We now need to display the report on the ASPX page. For that we need the ‘CrystalReportViewer’ control. So expand the crystal reports section of the toolbar and drag the component on the ASPX page
Step 8:- Now we need to go to code behind and specify the report source. That’s it now compile and run the project you can see your report live in action.
- Can crystal reports be published as a web service?
Right click on the ‘RPT’ file and click ‘Publish as web service’
- How do we invoke the crystal report web service?
We can consume the web service as a normal web service in .NET. The easiest way is by using the ‘ReportViewerControl’ and specifying the ASMX URL in the report source property.
- How do we add formulas using crystal reports?
To add any formula in crystal report is a three step procedure. Below figure ‘Add formula in crystal report’ shows the three steps in a pictorial format. Step 1 a Go to field explorer and right click and click new formula. Step 2 a Give and name to the formulae and click on ‘Use Editor’. Step 3 a You will be presented with UI which has all the formulas and function.
- How do we pass parameters to crystal reports?
Some times we want to accept input parameter and the report works according to the parameter. To add a input parameter go to field explorer , go to parameter fields , right click , create parameter and you should be popped with a dialog box as shown in the figure ‘Parameter field’. Give a name to the parameter , type and that’s it you are in action
- How do we export from crystal reports?
There are two way of using the export option one is when we display a report using crystal report viewer you can see a export icon as shown in figure ‘Export’ below. You can the select in which format you want to export.
Second option is through coding. Below is a simple code snippet which shows how we can export a report. Create a object of the crystal report and call the ‘ExportToDisk’ method specifying in which format you want to export. Dim Report as New CrystalReport1
Report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows, “c:\my.doc”)
- How do we print to printer using crystal?
In print we have two ways by which we can print one is when you display the report using crystal report viewer you have a print option and second is by code. Below is a simple code snippet which shows how we have created a object called as report from the rpt file , specified the printer name, paper size and then called the ‘PrintToPrinter’ method.
- Report.PrintOptions.PrinterName = “MyPrinter”
- Report.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4
- Report.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape
- Report.PrintToPrinter(1, True, 1, 3)
- How do we generate cross tab reports?
When we go for creating a new report you can see the cross –tab option.
- How can we do grouping in crystal?
For grouping in crystal you need to use the group expert wizard.
- Can you explain three-pass reporting which crystal report uses?
Crystal report uses the three pass method for parsing reports. Before we understand what does it means lets define what is a pass ?. Pass is a process used by crystal reports to read and manipulate data as per the report format. Below figure ‘Three pass method’ shows how the parsing happens. Let’s understand the same step by step. In Pre-Pass1 crystal report engine evaluates constants like x=1 and pie=3.14 for a report. Pass 1 does two important things get data from the database and sort records with given conditions. Once this is done it’s saved in memory and given to pre-pass2 for further parsing and manipulation. Pre-pass2 is all about grouping and sorting the records according to conditions specified in the crystal report. Pass 2 formats a report, applies condition and groups them. Pass 3 is the final tunnel it just counts the pages and generates reports.
Part 3:
Q1. Can We Export Data Of Reports Into Other Format Like In World Doc Etc?
Generated data can be exported to word doc, or in rich text format. Just click on ‘Export’ icon in the menu. Export dialog box will be popped up. It will ask for the ‘Format’ like comma-separated value (csv) etc and the ‘Destination’ like disk, application etc. After that it will ask for the file name and save the data.
Only restriction is formatting of data will be lost, but crystal report will try to maintain as much formatting as it can.
Q2. Is There A Way To Export The Report Formulas, Like Totals To Excel?
Yeah we can do that using crystal report.
Q3. Mention What Are The Data Source That Sap Business One Supports For Crystal Reports?
For crystal reports the data-source that SAP business one supports are
- SAP Business One
- OLE DB (ADO)
Q4. Can We Use Crystal Report As A Stand-alone Application?
Generally we use Crystal Reports with VB@However we can make crystal report stand-alone application also. But for that limitation is for viewing the report user should have crystal reports installed on his/her PC.
Q5. How To Conditionally Suppress A Field Based On Whether A Page Number Is Odd Or Even?
Select the field –>Click FORMAT–>Click FORMAT FIELD–>Select the COMMON tab–>Click the FORMULA BUTTON to the right of SUPPRESS (Don’t click the suppress check box)To suppress a field on odd numbered pages PageNumber MOD 2 = 1To suppress a field on even numebred pages PageNumber MOD 2 = 0 –>Click SAVE Icon–>Close the formula editor–>Click OK on the FORMAT screen
Q6. How Do We Format Field?
For formatting any field just right click on it and you will get many options like ‘Format Field.’ ‘Browse field data’ etc. Click on ‘Format Field.’ You can align data, suppress, make it multiline, change the font size, style, and type, make it hyperlink etc.
If it is an amount field then you can display currency symbol also. Right click on the field select ‘Format Field’.
Q7. Can We Give Parameters To The Report?
We can very well give parameters to the report. For creating parameters select ‘Parameter Field’ in Insert menu item. ‘Create Parameter Field’ dialog box will popped up, it will ask for the name of parameter, prompting text and datatype. Now when you run the report it will prompt for these parameters.
Q8. Mention What All New Features Available In Sap Crystal?
In SAP Crystal, you have following features:
- Streamlines report design
- Improvement to data sources
- Mobile and viewer support
- OEM and developer features
Q9. What Is Crystal Report?
Crystal report is a report generation tool. Generally have interface with VB@Crystal report basically generates dynamic data. You can format the data in whichever way you feel like.
Q10. What Are Crystal Reports And Crystal Reports Explorer?
With Crystal reports explorer one can quickly create and modify reports on the web, and since its built on the trusted Business object enterprise platform, it can easily manage massive user loads, individual access, and application customization.
Q11. Mention What Is The General Syntax For Creating Sap Business One Token?
To create SAP business token the general syntax includes
<Parameter Name>@ SELECT….FROM…..WHERE, the SELECT command is not necessary for all tables.
Q12. Can We Create Our Own Formulas In Reports?
We can create our own formulas in reports. Select ‘Formula Field’ in Insert menu item. Write the formula in ‘Formula Editor’. Here you will get ‘Field Tree’, ‘Function Tree’, and ‘Operator Tree’, which will display the report fields, functions that are supported by crystal reports (like CDATE () etc.), operators (arithmetic, strings etc.) respectively.
Q13. Can We Create Report Using More Than One Database?
We can create report using more than one database like Oracle, Access. Create data source name for both the databases. Select tables from them and create the report.
Only restriction is if you use two databases then you cannot see the SQL generated by crystal reports.
Q14. Does Crystal Report Support All The Functions That We Have In Oracle?
No, Crystal report does not support all the functions. Like Decode function is there in SQL but not there is crystal report. You need to convert that in crystal report format (in if and else etc.). However if you use ‘.qry’ files then it take the SQL as such. There is no need of changing any syntax.
Q15. Are There Any Limitations In Crystal Reports?
There are certain limitations in crystal reports. They are: –
If database is having field whose length is more than 255 characters, then you cannot make formula using that field.
While exporting data formatting is lost.
When you browse data just by right clicking on the field then it displays that is there in the database not the data selected by the query.
Q16. Can We Suppress Printing In Crystal Reports If 0 Records Are Fetched?
Yes, we can suppress printing if no records are fetched. Select ‘Report Options’ in File menu item. ‘Report Options’ dialog box will pop up. In that there is one option ‘ Suppress printing if no records’ Check this option. If no records are found then nothing will be printed on the report.
Q17. How Many Sub-reports Can Report Can Have?
0-256
Q18. Is There A Way To Export A Report Definition Without Writing Code?
Yes. The following steps work assuming you have Crystal Reports on the machine and the appropriate export dlls loaded.
- Open the report
- Preview it
- Click the EXPORT envelope
- Select REPORT DEFINITION for the format
- Select DISK FILE
- Click OK
- Enter a file name or accept the default
- Click SAVE. The file is a text file and can be viewed with NOTEPAD.
Q19. What Are The Sections That We Have In Crystal Reports?
Report has got standard sections like ‘Page Header’, ‘Page Footer’, ‘Report Header’, ‘Report Footer’, and ‘Details’.
However you can add other sections also. Select ‘Sections’ in the Insert menu item. You can insert group sections also.
If you don’t want to show any section just right click on that section and suppress that.
Q20. How To Write A Formula To Change A Font Based Upon Data?
- Select the field
- Click FORMAT
- Click FORMAT FIELD
- Select the FONT tab
- Click the FORMULA BUTTON to the right of FONTif ({YourField} = Value) then “Arial”else “Times New Roman
- Click SAVE Icon
- Close the formula editor
- Click OK on the FORMAT screen
Q21. How To Refresh The Crystal Report From The Application?
calling crystalreportcontrolname.reset (by selecting Report menu under Refresh the report menu item at design time) will refresh the report[crystalreport1.DiscardSavedData=True]
Q22. Explain How You Can Edit Crystal Reports Layout In Sap Business One?
To edit crystal reports layout in the SAP business one
Go to the main menu of the SAP business one -> choose administration ->set up -> General -> Report & Layout Manager
In Report & Layout Manager window, in the navigation panel on the left, scroll down to the document type of the layout you need to edit
In the work space on the right, select the crystal reports layout you need to edit and select edit.
Q23. Explain Whether It Is Possible To Create Our Own Formulas In Crystal Reports?
Yes, it is possible to create your own formulas in Crystal reports. For that from insert menu item choose “Formula Field”. Write the formula in “Formula Editor”, here you will see “Function Tree” , “Field Tree” , “Operator Tree” which will show the report fields, functions supported by crystal reports, operators etc.
Q24. Explain How Can You Connect Crystal Report To The Databases?
To connect crystal report to the databases, there are two ways
1) Use crystal report built in query
2) Use the tool “Crystal SQL Designer” given by crystal report
Q25. How To Pass Stored Procedure Parameters To The Report?
Choose File–>Options menu.
In the Options dialog box –>Click the Database tab and ensure that Stored Procedures is selected. Selecting “”Stored Procedures”” automatically displays any available stored procedures when you log on to an SQL database.–>Click OK to exit the Options dialog box. –>On the Start Page, click Blank Report.–>Locate and select the SQL Server data source that contains the stored procedure you want to use.–>Click Next to go to the Connection Information dialog box–>Enter the required information to log in.–>Click Finish–>Highlight an SQL stored procedure in the Stored Procedures folder, and click the–>arrow to add it to the Selected Tables list.–>The Enter Parameter Values dialog box appears.–>Highlight a parameter in the Parameter Fields list–>Assign a value by typing into the Discrete Value box and then click OK–>You are returned to the Database Expert–>Click OK and create your report using the fields in the stored procedure.
Q26. What Are The Advantages Or Disadvantages Of Using Crystal?
Reports in a Windows Forms application as opposed to say rolling our own reports as HTML and displaying them in the Internet Explorer control
Advantages
(1) Secure as End user cannot modify the data which is appear in the report if we use crystal report to show the report but in HTML, user can modify the report data
(2) Report layout is not transparent, so that end user will not know about how we design the report. But in HTML, anybody can study the report layout and can copy the technology
(3) Can export into different format like PDF, HTML, XML, etc, and many more.
Disadvantages :
(1) End user need to have the crystal report viewer in his PC in order to see the crystal report output. But this can be overcome if you export the report as PDF/HTML
(2) You need to buy Crystal Report license for each pc you are used to design the crystal report.
(3) Must buy the version which allows you to install run time components in end user PC
(4) Crystal Report is slow as compare to Active Reports
(5) If we have 100 pages report then crystal will need to process all pages and then it shows the output. and many more.
Q27. Can We Use Our Own Sql For Creating A Report?
We can also make our own query using ‘Crystal SQL Designer’ tool provided by SQL. Here you can insert your SQL statement as such. It will save this file as ‘.qry’ . And when you create a report instead of using ‘Database’ button use ‘Crystal SQL Statement’ button.
Q28. List Out Some Of The Key Difference Between Ssrs And Crystal Report?
- SSRS has table base design pattern while in CR you can place objects anywhere
- Export to Excel in SSRS is easy than Crystal Report
- To manage your data crystal report have several options while SSRS does not have any
- Crystal report has client side report creation API, that allows the client to modify and create new reports
- SSRS uses expressions while Crystal Report uses formula in C and basic
- SSRS is compatible with Share-point list and can generate reports based on lists
- Both of them support OLAP connections
Q29. Can We Use Stored Procedure For Creating The Report?
Yes, we can use stored procedure.
Q30. Is There Any Feature Like Summing Total In Crystal Report?
Crystal reports provide features like grand total, sub-total, running total etc. You can select any of these features in Insert menu item.
You can sum up records on the basis of each record or on change of group using ‘Running Total ‘ option in Insert menu item.
Q31. Can We Edit Sql Made By Crystal Reports?
We cannot edit the SQL made by crystal reports. However we can view the SQL. For that select ‘Show SQL Query’ in Database menu item. Limitation is if you are using only one database. If you use two databases then you can’t even view the SQL prepared by crystal report.