Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to display certain item first before others

Status
Not open for further replies.

HRHK

Programmer
Jun 5, 2005
83
US
I display list of items in the CR. The item_description field is in the detail section.
I would like to display a certain item (i.e. Orange) always
on top in the report. How would I able to do this?

eg. my item list has:
apple, orange, peach, mango, strawberry
In the report, I would like it to appear as: orange, ....

Also, I would like to format a number to display with mask.
eg. 12345, would like to display as 123-45.
How can I do this in CR? Thanks a lot.
 
Create a formula like:

if {table.field} = "Orange" then "" else
{table.field}

Use this as your sort formula or insert a group on it, but display the actual table field instead as the group name or detail field.

If the "number" field is of numeric datatype, then create a formula like:

left(totext({table.number},0,""), 3) + "-" + mid(totext({table.number},0,""),4)

-LB
 
An item list means a list of values in a table, or?

Crystal doesn't have item lists, so please use real technical terms.

What does on top of the report mean, on the first page only or at the top of each page?

If it's a field, group by the field, and select in specified order and list them out.

To formayt a 5 digit number use:

left(totext({table.field},0,""),2) &"-"& mid({table.field},3)

Again, take the time to use real terms, and you'll probably be better served to post the following due to the language barrier:

Crystal version
Database/connectivity
Example data
Expected output

-k

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top