Crystal Reports Interview Preparation Guide
Download PDF

Crystal Reports frequently Asked Questions by expert members with experience in Crystal Reports. So get preparation for the Crystal Reports job interview

22 Crystal Reports Questions and Answers:

Table of Contents

Crystal Reports Interview Questions and Answers
Crystal Reports Interview Questions and Answers

1 :: How to print two details fields at the bottom of the page?

Add a new Details section to the report and place the two
fields in it and by selecting the format option for this
Details1 section you can find the option like Print at bottom
of the page

2 :: Is there a way to be able to change an image(company logo) dynamically in a report? Example if you have 100 reports, and with the market uncertainty if you anticipate that the company logo might change, how can you change the image just in one place and have this reflected in all the reports at run time?

Yes,there is a way.User may create a word document,embed
the required image as a picture object in it and then embed
this word document inturn into Crystal reports(as a linked
OLE object).

Any change in the word document would reflect in all he
reports using this word doc.

3 :: What are field expressions and what are the diff types? (I looked this up in the internet and never found anything with regards to types of field expressions)?

This was to confuse you further.There are formula
fields,database fields,sql expression fields,paramter
fileds etc and nothing like expression fields.
I use window.open (javascript) to open my report in a new
window. What I prefer to do now is to export the report
right away and open it in portable document format.

5 :: Where is the image located, after youve placed it on the report?

1.actually it depends on the type of ole implementation u r
doing i.e. static , embedded or linked. (refer 3)
2. An OLE object is, a presentation of data that was
created in another application and that maintains a
relationship with the application that was used to create
it. A bitmap created in Paint, an Excel
spreadsheet, or a graph from MS Graph may all be OLE
objects if they are inserted in the receiving document as
OLE objects. If they are not inserted as OLE objects, they
retain no relationship with the original application.

3.
Static object
A static OLE object is a picture of an object that can be
displayed and
printed, but not edited in place. It does not have a
connection to a server
application. There are two kinds of static objects: static
bitmaps and static
metafiles.
• Embedded object
An embedded object contains a representation of the object,
as well as
information that defines the content. It does not have a
connection to the
original object in the server document. As a general rule,
use embedded
objects when you need to edit the object independently of
the original
server document.
• Linked object
A linked object contains a representation of the data and a
link to the file
where it originated. As a general rule, use linked objects
when the data in
the server document is changing and you want the object in
your report to
be updated when you open the report.

8 :: When looking at the join types in Crystal - what does it mean when you coose Enforce and Enforce To or Enforce From?

Version 10 introduced the capability to enforce link created in report. Enforcing a link between two tables ensures that the report's respective SQL uses this link, regardless of whether fields are required from one or both the involved tables.
The default setting is unenforced links, meaning that Crystal Reports uses the link only if the report's respective SELECT statement requires it.
You can access the different enforcement option by right-clicking on a link and selecting the link Options menu item.

9 :: How to create crystal reports in .net?

Select new item add Crystareport.rpt.report page will be
generated.In asp page u need to add crystal report viewer
control.
In aspx page follow the below code.....
ReportDocument rpt=new ReportDocument()
....
.....
..Fill the type dataset with ur required data.
.......
.....
rpt.Load(server.mappath("crystareport name"))
rpt.SetDataSource(objds);
CRV10.ReportSource = rpt;
.................
.............
after that switch to crystal report form and add dataset to
the report using databse expert......

10 :: Suppose I have a crystal report with a linked subreport as well. is there any way not to print the current record on the main report if no records are returned from the subreport?

yes, we can achieve that using shared variables as
mentioned already. however, should also make sure that the
subreport values should come to the primary report before
the section you have records on..

11 :: Can we call or add subreport within subreport?

If you create report with subreport and save it. Create
another report and add the first report as an subreport.

If you try to create a subreport after it's inserted it's
dificult. I think the limit on all subreports is 256.

12 :: Where can we find the log file generated when we run a crystal report?

When the reports run, a log file is created and each
report's output will placed the specified output directory
with the output file name specified. If only a prefix is
specified, the output name will also have a date and time
stamp making it easy to archive reports for later viewing.

13 :: HOW TO USE 5 CRYSTAL REPORT OR SUBREPORT ON DIFFERENT CONDITIONS IN ONE VB PROGRAM?

different 5 condition is a=1,2,3,4,5

in button click
we write

if a=1 then
Dim report as new cr_1
cr_1.show
else
Dim report as new cr_2
cr_2.show
else
Dim report as new cr_3
cr_3.show
else
Dim report as new cr_4
cr_4.show
else
Dim report as new cr_5
cr_5.show
end
Yes we can change the value of report footer depending on
the page number contents.

Create a formula '@formula'

towords(pagenumber,0)

plcae it in RF which will show the last page number in
words.

suppose total number of page is 24 then 'Twenty Four'.
if total pages are 5 then 'Five'.

16 :: Why is Excel Report preferred over crystal reports?

As every Windows OS has Microsoft Excel reports and as it is simple, people are familiar with it.
It has formula field in it to do calculations.

17 :: I am developing reports using crystal reports in VS2005 in windows application. I have two crystalreports name called "studentReport" and "familyReport". I have a form with a button. If I click the button I need to show up the two
reports in one report like page1, and page2. The page1 consists the "studentReport" and the page2 contains the "familyReport". The "familyReport" contains different header and footer.
How to show up the two crystal reports in single crystalreportviewer?

If I am not mistaken then this can be achieved by make
Student report as main report and your other report
familyreport as subreport of the main report opening in new
page.

For different page header of both report what you can do is
in main report dont put any thing in PageHeader or Footer
create a blank group in that create page header for main
report and in group footer create main report page footer
data and on group select option repeat on each page.

May be this will help to solve your problem if I have
understand what you are looking for.

18 :: How can we improve the performance of a crystal report? OR What all performance improvement techniques used in crystal reports? (particularly CR XI)?

There are multiple ways to do that...


1. Using Report bursting indexes.
2. and Sub reports degrade the performance, So avoid using
sub reports

19 :: How to add Crystal Reports(Standalone) to my VB.NET project?

There are 2 versions of crystal reports available

1. standalone reports like Crystal Reports 10,XI,XI R2

2. Crystal Reports which comes with Visual Studio .Net like
Crystal Reports for Visual Studio-Embedded Reports

if want to add reports, then go to Add Existing Item (right
click on the project name in the solution explorer), browse
to the .rpt file and select it or Add New Item an select
Crystal Reports from the Templates.

if you want to display reports, you should use Crystal
Repors Viewer

coding:

private ReportDocument hierarchicalGroupingReport;

protected void Page_Init(object sender,eventargs e)
{
configurecrystalreports();
}
private void configurecrystalreports()
{
hierarchicalGroupingReport=new ReportDocument();
string reportPath=server.mappath("Hierarchical
Grouping.rpt");
hierarchicalGroupingReport.Load(reportPath);
CrystalReportViewer1.ReportSource=hierarchicalGroupingReport
;
}

20 :: How many Sub Reports added in One MainReport?

The correct answer is,

At most you can add 255 sub reports in the main report. so
the total count is 256 reports are allowed for a standalone
report.

You can not add a sub report inside a sub report. This is
one of the important question as far as for interview point.

21 :: Is it possible to export crystal report with linked subreports in one excel sheet? If yes,then how?

Yes, Create a main Report, and sub report seperately.
Open the Main Report and in Insert menu, select subreport
option, and in that "select an existing report",select the
sub report which is already created, and pt the link
between Main report and sub report with the required
fields. Now Export the report to Excel format.......