Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

1)How to add a Page Header to a Sub Report in Crystal

Reports?
Step 1: Create a Formula as following. I call my formula ShowPH:

WhileReadingRecords;
""
Step 2: Add a Group from Insert Menu-select Group and you will see Insert Group.
Select ShowPH formula there and click on Options tab.

On Options tab, select "Repeat Group Header on Each Page".

It will add a group to your sub report.

Step 3: Now add all text you want to display on the header of each page on the
Group section area.
2) Enforced From & Enforced To

They are in the Database Expert links, link options...


Here are the definitions from Help:

Enforced From: When you select this option, if the to table for the link is used, the link is enforced.
For example, if you create a link from TableA to TableB using Enforce From and select only a field
from TableB, the Select statement will still include the join to TableA because it is enforced.
Conversely, selecting only from TableA with the same join condition will not cause the join to TableB
to be enforced.

Enforced To: When you select this option, if the from table for the link is used, the link is
enforced. For example, if you create a link from TableA to TableB using Enforce To and select only a
field from TableA, the join to TableB will be enforced, and the Select statement that is generated
will include both tables.

If the 'Perform Grouping on Server' option is selected, how does it affect


your report?

Resolution

When the 'Perform Grouping on Server' option is selected, this allows a report to
request the database server to return data that is already grouped and aggregated.

When the 'Perform Grouping on Server' option is not selected, Crystal Reports returns
detailed records that still need to be grouped and summarized once they are
received by the report.

EXAMPLE:

Use the example of a report that is grouped by the Customer_ID field and has a
subtotal for that group in the Amount field. The only fields displayed on the report are
the Customer_ID field and the subtotal in the Amount field.

If the 'Perform Grouping on Server' option is not selected, the SQL query of the report
looks like the following example. This query causes the detailed customer records to
be returned by the server that will then have to be grouped and totaled by CR once it
receives the data.

TWO MAIN DIFFERENCES IN THE ABOVE EXAMPLES OF SQL QUERY

1. The second query example specifies a GROUP BY clause which will cause the
database server to only return a single row per unique Customer_ID.

2. The second query example specifies the SUM of the Amount field in the SELECT
clause that will cause the database server to perform the aggregation and only
return the sum value.

The two main differences result in the second query returning fewer records. This
allows for faster report processing especially for reports that normally return large
result sets.

REPORT REQUIREMENTS TO USE 'PERFORM GROUPING ON SERVER' OPTION IN


CRYSTAL REPORTS
1. From the menu 'File' | 'Report Options', select 'Perform Grouping on Server' so
there is a checkmark beside this option.

2. In the Details section, format by selecting 'Suppress (No Drill-Down)' or Hide (Drill-
Down OK)'.

==========

NOTE:

Hide the Details section for a report where the user is allowed to drill down to the
details of the group.

When the user drills down to the details of the group, this will cause Crystal Reports
to request the detail records from the database.

==========

3. In the report, create at least one group. This is required to generate the GROUP BY
clause in the SQL query.

4. In the report, display only fields that are summary values and group fields. SQL
syntax dictates that the only fields that you can list in the SELECT clause of a query
that has a GROUP BY clause are fields that were used in the GROUP BY clause or
aggregate values like SUM, COUNT, MAX, MIN, etc.

If all the above requirements are met, the report will generate the optimized type of
SQL query.

Report Bursting Indexes

Under 'Saved Data Indexes' there is a section for 'Auto', which will create indices for fields used in
Record Selection formulas. If you use stored procs to filter the data, the Bursting index doesn't
seem to help, but if you return lots of data and then use the Record Selection Formulas to filter the
data, it would appear that Crystal will create an index on its temp tables. This will speed up the
selection process as Crystal won't need to read each and every record, it will be able to select more
rapidly the records that it needs. The rest of the report (formatting) will proceed at the same
speed...once the data is retrieved (I'm guessing)

Tax report

1.Calculation ie Procedure was Complex


2.Excel Sheets will be given as the input
3.Color Formatting
4.Dill Down was there
5.No of records was to be limited .
6.Performance Tuning Such as Sub reports was there.I have made it On
Demand.
Query Tuning,Perform grouping in the server,Indexes.
7.Formatting that report was much more difficult as they need to export to
excel.
8.Moreover they need to see it as different sub report in different excel sheets.
We will be scheduling the rports via Central Management Console via
Business Objects.So we can use Report Package Booster .
To make it show 10 records per page do the following

1. Open the report in Design View

2. Right click on the Details section and select Section Expert

3. Make sure the Details section is selected in the Section Expert dialog box.
Check the box that says "New Page After"

4. Click the formula editor button to the right of the checkbox.

5. Enter the following formula

if Remainder (RecordNumber, 10) = 0 then true else false

6. Click Save and Close and then click OK.

If you run the report it should break after each 10 rows.

You might also like