Google News
logo
Crystal Reports Interview Questions
Crystal Reports can be integrated into different types of applications, including those running on Windows operating systems. In a Windows-based application, Crystal Reports can be seamlessly integrated to generate and display reports within the application's user interface.

Crystal Reports can access data from various databases and can synchronize data from multiple databases into a single report.

The integration typically involves embedding a Crystal Report viewer component within a window or form of the application. This viewer component allows users to view, navigate, and interact with the reports directly within the application's interface. The reports can be designed and generated using Crystal Reports designer, and then rendered and displayed within the application using the viewer.

The integration may involve passing data from the application to Crystal Reports, handling parameters, controlling report navigation, and exporting reports to various formats. The exact implementation may vary depending on the development platform or framework used for the Windows application, such as WinForms, WPF, or UWP.
Here are some of the new features available in SAP Crystal:

Native 64-bit application : This allows you to run the latest version of Windows and benefit from the latest security improvements.

64-bit data connectors and 64-bit Data Direct ODBC drivers : This allows you to leverage greater data processing for faster performing reports.

Freeze panel in DHTML viewer : This feature has been requested for quite some time to ensure better visibility of your report details.

Page based XLSX exporting : This allows you to export your reports to XLSX format, page by page.

64-bit Geomap engine : This allows you to create more interactive and visually appealing geomaps.

Enhanced conditional formatting : This allows you to create more complex and sophisticated conditional formatting rules.

Support for new data sources : SAP Crystal now supports a wider range of data sources, including SAP HANA, SAP S/4HANA, and Amazon Redshift.

Improved performance : SAP Crystal has been optimized for performance, so you can create and run reports faster than ever before.
While Crystal Reports is a powerful reporting tool, it does have some limitations. Here are a few notable limitations of Crystal Reports :

Steep Learning Curve : Crystal Reports has a relatively complex learning curve, especially for users who are new to the tool or don't have experience with report design and SQL querying. Mastering its features and understanding its functionalities may require significant time and effort.

Lack of Compatibility with Modern Web Technologies : Crystal Reports has limited compatibility with modern web technologies and frameworks. While it can be integrated into web applications, it may require additional workarounds or custom development to achieve seamless integration and responsiveness.

Limited Interactive and Dynamic Reporting : Crystal Reports is primarily designed for static reporting and lacks advanced interactive capabilities. While it supports drill-down functionality and parameter fields, it may not provide the same level of interactivity and real-time data manipulation as some other reporting tools.

Performance and Scalability Issues : Crystal Reports can experience performance issues when dealing with large datasets or complex reports. Generating and rendering reports with extensive calculations or multiple subreports can be time-consuming and resource-intensive. Additionally, Crystal Reports may not scale well for high-volume reporting requirements.

Limited Support for Mobile Devices : Crystal Reports is not optimized for mobile devices. While reports can be viewed on mobile devices through a web browser or by utilizing third-party tools, the user experience may be compromised, and the reports may not be fully responsive or optimized for mobile display.

Limited Data Visualization Options : While Crystal Reports offers basic charting and graphing capabilities, it may not provide the same breadth and depth of data visualization options as specialized visualization tools. Advanced visualizations and interactive dashboards may require additional customization or integration with other tools.

Lack of Active Development and Updates : Crystal Reports has seen limited updates and enhancements in recent years. Its development and support have been relatively stagnant compared to some other reporting tools in the market. This lack of active development may lead to fewer bug fixes, slower adaptation to new technologies, and limited compatibility with newer database versions.

etc,.
* 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 has several options while SSRS does not have any
* Crystal report has a client-side report creation API, that allows the client to modify and create new reports
* SSRS uses expressions while Crystal Report uses a 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
Crystal Reports organizes the report layout into various sections, each serving a specific purpose. Here are the different sections available in Crystal Reports:

1. Report Header : The Report Header section appears at the beginning of the report and is typically used to display information such as the report title, company logo, or introductory text. The content in this section is displayed only once at the start of the report.

2. Page Header : The Page Header section is repeated at the top of each page of the report. It commonly contains information like column headers, report parameters, or summary data that should appear at the top of every page.

3. Group Header : The Group Header section appears at the start of each group in the report. It displays group-specific information or labels. This section can be used to provide a hierarchical structure to the data and to summarize data within each group.

4. Details : The Details section displays the individual records or rows of data retrieved from the data source. It is repeated for each record in the dataset and is the main content area of the report.

5. Group Footer : The Group Footer section appears at the end of each group in the report. It is used to display summary information or calculations specific to each group. Commonly used summary functions like sums, averages, or counts are placed in this section.

6. Page Footer : The Page Footer section appears at the bottom of each page of the report. It typically contains information such as page numbers, report footer notes, or copyright statements. The content in this section is repeated on every page.

7. Report Footer : The Report Footer section appears at the end of the report and is used to display overall summary information or calculations for the entire report. It can contain grand totals, aggregate values, or other concluding details.

8. Report Summary : The Report Summary section appears after the Report Footer section. It is used to display additional summary information or calculations, often displayed on the last page of the report.
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
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
To link multiple database tables in Crystal Reports, you can follow these steps :

1. Open Crystal Reports and create a new report or open an existing report.
2. Go to the "Database" menu and select "Database Expert." This will open the Database Expert window.
3. In the Database Expert window, you'll see a list of available data sources. Choose the appropriate data source or create a new connection to the database containing the tables you want to link.
4. Once you have selected the data source, you'll see the tables or views available in that database.
5. Select the first table you want to link and drag it to the "Links" tab.
6. Select the second table you want to link and drag it to the "Links" tab. Crystal Reports will automatically create a link between the two tables based on the common fields or keys.
7. If the link created by Crystal Reports is not accurate or if you need to customize the linking conditions, you can modify the link by clicking on the link line in the "Links" tab and selecting "Edit Link...".
8. In the "Edit Link" dialog box, you can specify the join type (e.g., inner join, left outer join, etc.) and customize the linking conditions by adding or modifying the join criteria.
9. If you need to link more tables, repeat steps 5 to 8 for each additional table, dragging them to the "Links" tab and adjusting the link conditions as needed.
10. Once you have linked all the desired tables, click "OK" to close the Database Expert window and return to the report design view.
11. You can now access fields from the linked tables and use them in your report design by dragging and dropping them onto the report canvas.
Parameters in Crystal Reports serve the purpose of allowing users to dynamically filter and customize the data displayed in a report. They provide a way to prompt users for input at runtime, enabling them to specify criteria for data retrieval and report generation. Here are some key purposes and benefits of using parameters in Crystal Reports:

Dynamic Filtering : Parameters enable users to define filter criteria to selectively retrieve data from the underlying database. By setting up parameters, users can specify conditions such as date ranges, specific values, or text patterns to filter the data displayed in the report. This allows for dynamic and ad-hoc data filtering without modifying the report design.

User Interactivity : Parameters enhance user interactivity by allowing users to input values at runtime. Users can enter parameters through input fields, drop-down lists, or calendars, providing a way to customize the report output based on their specific requirements. This interactive approach empowers users to explore data in different ways and retrieve personalized reports.

Flexible Report Output : With parameters, Crystal Reports can generate different report outputs based on the user's input. By adjusting parameter values, users can retrieve different subsets of data, filter records, or apply different calculations and aggregations. This flexibility enables the generation of customized reports tailored to specific needs or varying scenarios.
Report Reusability : Parameters enhance report reusability by allowing the same report template to be used with different input parameters. Rather than creating multiple reports for each specific scenario, parameters enable users to modify the behavior of a report by providing different input values. This saves time and effort by reusing the same report design with varying data criteria.

Prompts and Documentation : Parameters in Crystal Reports can be configured with prompts, which provide instructions or explanations to the user about the expected input. Prompts can include text, examples, or guidelines, ensuring that users understand the purpose and format of the parameter values. This aids in user guidance and improves the usability of the report.

Report Automation : Parameters also play a role in report automation. By programmatically setting parameter values through application code or scheduling tools, reports can be generated automatically with predefined criteria. This enables scheduled or batch report generation, reducing manual intervention and ensuring consistent and timely report delivery.
Crystal Reports supports several types of joins that can be used to link tables or views in a report. Here are the different types of joins available in Crystal Reports:

1. Inner Join : An inner join returns only the rows that have matching values in both tables being joined. It retrieves records where the joining condition is satisfied in both the primary and secondary tables. This type of join excludes unmatched records from both tables.

2. Left Outer Join : A left outer join returns all the rows from the primary (left) table and the matching rows from the secondary (right) table. If there is no match in the secondary table, null values are returned for the corresponding fields. Left outer joins are commonly used to retrieve all records from the primary table, even if there are no matches in the secondary table.

3. Right Outer Join : A right outer join returns all the rows from the secondary (right) table and the matching rows from the primary (left) table. If there is no match in the primary table, null values are returned for the corresponding fields. Right outer joins are less commonly used in Crystal Reports, as most databases support left outer joins and provide equivalent functionality.
4. Full Outer Join : A full outer join returns all the rows from both the primary and secondary tables. It includes all records from both tables, whether they have matching values or not. If there is no match, null values are returned for the fields from the non-matching table. Full outer joins are less common in Crystal Reports as they are not directly supported. However, they can be achieved through workarounds like using union queries.

5. Cross Join : A cross join, also known as a Cartesian join, returns the Cartesian product of the two tables being joined. It combines each row from the primary table with every row from the secondary table. Cross joins can result in a large number of records, so they should be used cautiously and with appropriate filtering conditions.

The choice of join type depends on the relationship between the tables and the desired result. Inner joins are commonly used when there is a one-to-one or one-to-many relationship between the tables. Left outer joins are useful when all records from the primary table should be included, even if there are no matches in the secondary table. Cross joins are typically used when you want to combine every row from one table with every row from another table.

Crystal Reports provides a graphical interface for creating and modifying joins, allowing users to define the join type and the joining condition between tables.
Exporting Crystal Reports with linked subreports into one Excel sheet can be achieved by following these steps:

1. Open your Crystal Report that contains the main report and linked sub-reports in Crystal Reports Designer.

2. Ensure that the subreports are properly linked to the main report using the appropriate linking fields.

3. Preview the report to verify that all the sub-reports are displaying correctly within the main report.

4. Go to the "File" menu and choose "Export" -> "Export Report."

5. In the "Export Report" dialog box, select "Microsoft Excel" as the export format and click on the "OK" button.

6. In the "Export Excel" dialog box, choose the desired options for exporting the report. Make sure to select the option to "Export Page Headers and Page Footers."
7. Specify the destination file path and name for the exported Excel file and click on the "Save" button.

8. Crystal Reports will begin exporting the report to Excel. Depending on the size and complexity of the report, this process may take some time.

9. Once the export is complete, you can open the exported Excel file to view the report.

By following these steps, Crystal Reports will export the main report and its linked subreports into a single Excel file, with each subreport appearing in a separate worksheet within the workbook. The export process will retain the formatting, layout, and data of the report, allowing you to view and analyze the information in Excel.

Note : It's important to ensure that the subreports are properly linked within the main report and that they display correctly in the Crystal Reports preview before exporting. Also, keep in mind that the complexity and size of the report, including the number of subreports, may affect the performance and file size of the exported Excel file.
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.
Crystal Reports provides the flexibility to use your own SQL queries for creating reports. Crystal Reports allows you to use SQL commands directly to retrieve data from your database, giving you more control over the data retrieval process and the ability to leverage the full power of SQL.

Here's how you can use your own SQL for creating a report in Crystal Reports :

1. Open Crystal Reports and create a new report or open an existing report.
2. Go to the "Database" menu and select "Database Expert." This will open the Database Expert window.
3. In the Database Expert window, select the appropriate data source or create a new connection to the database.
4. Once you have selected the data source, click on the "Add Command" button. This will open the SQL Editor.
5. In the SQL Editor, you can write your own SQL query to retrieve the required data for your report. You can use any valid SQL syntax and functions supported by your database.
6. After writing the SQL query, click on the "OK" button to close the SQL Editor.
7. Crystal Reports will now treat the SQL query as a virtual table or view, and you can use it like any other table in your report.
8. Drag and drop fields from the SQL query onto the report canvas to include them in your report design.
9. Customize the layout, formatting, grouping, and calculations as needed.
10. Preview and run the report to see the data retrieved from your database using your own SQL query.

By using your own SQL in Crystal Reports, you have the flexibility to write complex queries, join multiple tables, apply custom filters, aggregate data, and perform advanced calculations as per your specific reporting requirements. This feature allows you to tailor the data retrieval process to suit your needs and utilize the full capabilities of your database's SQL language.
To add dynamic images in Crystal Reports, you can follow these steps:

1. Prepare the Image Field : Start by creating a field in your data source that will contain the file path or binary data of the images you want to display dynamically. Ensure that the field in the data source is compatible with the image data, such as a string field for file paths or a binary field for image data stored in the database.

2. Insert an Image Object : In Crystal Reports Designer, go to the "Insert" menu and choose "Picture." Click and drag on the report canvas to define the area where the image will be displayed.

3. Link the Image Object to the Data Source : Right-click on the inserted image object and select "Format Graphic." In the "Format Editor" window, navigate to the "Picture" tab. Under the "Graphic Location" section, choose the data source field that contains the image file path or binary data from the drop-down list or formula editor.

4. Set the Image Formatting : Adjust the image formatting options as desired, such as resizing, scaling, or alignment, using the options available in the "Format Editor" window. You can also apply conditional formatting to the image object based on other data fields if needed.

5. Preview and Verify : Preview the report to see the dynamically loaded images. Ensure that the images are displayed correctly based on the data retrieved from the data source.
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.
There are traditionally three methods to burst crystal reports by e-mail.

1. Using a PDF tool

2. Using Crystal Reports Scheduler such as CRD

3. Data-driven publishing method
the general syntax for creating SAP Business One tokens is:

<Parameter Name>@SELECT … FROM … WHERE …

The <Parameter Name> is the name of the parameter that you want to create. The SELECT command is not always mandatory for SAP Business One tables. For example, SELECT is not mandatory for the OCRD (business partners) and OACT (G/L accounts) tables. For an example where SELECT is not used, see Business Partner Selection Criteria.

The FROM clause specifies the table that the token will be based on. The WHERE clause specifies the filter criteria for the token.

Here are some examples of SAP Business One tokens :
* Country@SELECT distinct Country FROM OCST
* State@SELECT code, name FROM OCST WHERE (Country = '@Country')
* DocKey@

The Country@SELECT distinct Country FROM OCST token will create a parameter that lists all of the countries in the OCST table. The State@SELECT code, name FROM OCST WHERE (Country = '@Country')** token will create a parameter that lists the states for the country that is selected in the Country parameter. TheDocKey@` token is a special token that is used to identify the current active document.
Here are the steps on how to use running totals in Crystal Reports:

1. Open the Crystal Reports report that you want to add a running total to.
2. In the Design tab, click the Insert menu and select Running Total Field.
3. In the Create Running Total Field dialog box, specify the following settings:

* Running Total Name: Enter a name for the running total field.
* Field to summarize: Select the field that you want to summarize.
* Type of summary: Select the type of summary that you want to create. The most common type of summary is Sum.
* Evaluate: Select when you want the running total to be evaluated. You can choose to evaluate the running total On change of field, On change of group, or Never.
4. Click OK to create the running total field.
5. In the Design tab, drag and drop the running total field to the report where you want it to appear.
6. Format the running total field as desired.

Here are some additional tips for using running totals in Crystal Reports :

* You can create multiple running total fields in a single report.
* You can use running totals to summarize data in a variety of ways, including by group, by date, or by product.
* You can use running totals to create dynamic reports that update automatically as the data changes.
There are two ways to do this :

Using the Show SQL Query dialog box :
* Open the Crystal Reports report that you want to edit the SQL for.
* In the Database tab, right-click the query that you want to edit and select Show SQL Query.
* In the Show SQL Query dialog box, you can edit the SQL statement.
* Click OK to save the changes to the SQL statement.

Using the Add Command feature :
* Open the Crystal Reports report that you want to edit the SQL for.
* In the Database tab, click the Add Command button.
* In the Add Command dialog box, specify the following settings:

Command type : Select SQL.
Command text: Enter the SQL statement that you want to use.
Data source: Select the data source that you want to use.

* Click OK to create the command.
* In the Database tab, drag and drop the command to the report where you want it to appear.

Once you have edited the SQL statement, you can run the report to see the changes.

Here are some things to keep in mind when editing SQL made by Crystal Reports :
* The changes that you make to the SQL statement will affect all of the reports that use the same query.
* If you are not familiar with SQL, you should consult with a database administrator before making any changes to the SQL statement.