What are you looking for ?
Home » » SAP- Lesson 3

SAP- Lesson 3

{[['']]}

Adding tables
After selecting the data source, you can add one or more tables to base your report on.

To add a table
1. Choose Database Expert from the Database menu.
2. On the Data tab, search for the database you want to use in your report.
3. In the Available Data Sources list, select the table you want to add to your report
Note:
You can insert more than one table at a time by selecting multiple tables, right-clicking, and choosing
Add to Report. You can also drag and drop tables to the Selected Tables list.

To add and link multiple tables
1. Choose Database Expert from the Database menu.
2. On the Data tab, select the tables you want to add to your report
3. Click the Links tab to display the databases currently available for linking. Crystal Reports automatically links tables by name or key when possible.
4. To create links manually, drag a field from one table to a field in another table. If successful, a link line is created. If unsuccessful, a message is issued.
5. If you've deleted links and you want to recreate them automatically, click Link.
6. Click OK when finished.

Formula fields
To display data that is a calculated value, you need to create a formula field and place that formula field on the report.

i.e.: The birth date is stored in the database and you need to display the age, you must create a formula field that will calculate the different between the birth date & the current date to get the age

Typical uses for formulas
There are many uses for formulas. If you have a need for specialized data manipulation, you can do it with a formula.

Creating calculated fields to add to your report
To calculate a price discounted 15%:
{Orders_Detail.Unit Price}*.85
Formatting text on a report
To change all the values in the Customer Name field to uppercase:
UpperCase ({Customer.Customer Name})

Pulling out a portion, or portions, of a text string
To extract the first letter of the customer name:
{Customer.Customer Name} [1]

Extracting parts of a date
To determine what month an order was placed:
Month ({Orders.Order Date})

Convert a number to words
To convert down payment from U.S. currency to text:
ToWords ({COMP_BILLING.Down_Payment })

SQL Expression fields
SQL expressions are like formulas, but they are written in Structured Query Language (SQL), not in the Crystal Reports formula language. An SQL expression can be used to query the database for specific sets of data. You can sort, group, and select based on SQL expression fields.
Share this article :

Post a Comment

Flag Counter

Social Profile

 
Copyright x 2011. By Wael Medhat - All Rights Reserved