SAP 7090310 Datový list Strana 490

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 706
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 489
21.12.11.1 To add dynamic grouping using parameter fields
1.
Create a report using the sample data, Xtreme.mdb, and place the following fields from left to right
in the Details section:
{Customer.Customer Name}
{Customer.Country}
{Orders.Order ID}
{Orders.Order Date}
{Orders.Order Amount}
2.
Create a new parameter field and call it GroupBy.
3.
Select String from the Type list.
4.
Add the following values to your parameter:
Customer
Country
Order
5.
Select Editable from the Show on (Viewer) Panel list, and click OK.
6.
Create a new formula field and call it GroupField.
7.
Type the following formula into the Formula text box.
If {?GroupBy} = 'Customer' then
{Customer.Customer Name}
Else if {?GroupBy} = 'Country' then
{Customer.Country}
Else if {?GroupBy} = 'Order' then
ToText({Orders.Order ID})
Note:
Crystal Reports formulas do not allow conditions to return different data types. Both the Customer
Name and Country fields return strings, so the ToText function must be used to convert the Order
ID from a number to a string as well.
8.
Save your formula and close the Formula Workshop.
9.
In the Group Expert, select the GroupField formula as your group field, and click OK.
10.
Customize summary fields and section formatting as you like.
Users can now change the grouping presentation of the report by modifying the GroupBy parameter
value on the Parameter Panel.
Note:
Changing parameter values will not cause a database refresh as long as the parameter is a non-data
parameter.
Related Topics
Data and non-data parameters
2011-05-16490
Parameter Fields and Prompts
Zobrazit stránku 489
1 2 ... 485 486 487 488 489 490 491 492 493 494 495 ... 705 706

Komentáře k této Příručce

Vikixwk 04 Jan 2024 | 13:20:14

urenrjrjkvnm

Viktorihon 14 Jan 2024 | 00:44:53

Cinema