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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print order of items in Crystal Reports

Status
Not open for further replies.

sylunt1

MIS
Jan 9, 2002
21
US
Greetings,

I use crystal reports as the reporting interface to a program called Trackit - for POs and inventory and what not. The purchasing person wants the reports to print items in the order they were entered. They don't do that now. Is there some way to sort items on the order they were entered?


Thanks,

Chris
 
That depends on whether you can alter the data source for the report.

Crystal sorts rows only if it's specified in Report->Sort Records.

However the datasource may be a Stored Procedure or View, which would likely already be sorting the rows.

If you go under Database->Set Location, you can discover the data source.

-k kai@informeddatadecisions.com
 
I should amend that slightly, if the report is grouped, it will default to ascending sortation, you can change the group sorting by right clicking the group and select change group, you'll see the option "in original order" in the pull down below the column that's being grouped.

-k kai@informeddatadecisions.com
 
Thanks - that's kinda where I was going.

Here's how it is entered:

Product Suite 500.00
item 1 in suite 0.00
item 2 in suite 0.00

next suite 500.00
item 1 in suite 0.00

Thats how I want it to print but it comes out in some order that I can not make sense of. I don't know what it is keying the sort off of.
 
Are you trying to put the groups in order or the details in order within the group? Details will sometimes come up in random order, especially through ODBC if you have multiple tables.

Is there a field in the database that indicates the order that the items were entered, like maybe the primary key to the table? You could use that field as an invisible sort field. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
The items in the db don't seem to have an order - they are grouped only by PO number. I tried sorting the database filtered by PO (so I only see the ones from this specific PO) and no matter what I sorted by I could not get them in the order they printed out. I am thinking that because of the way the data is stored CR has no way to key off of anything - so getting them to print in the way I want is not going to happen. Any ideas?



Thanks,

Chris
 
Chris,

What do you want to sort by? That is the key question.

If the report is grouped by PO, then it will be sorted by PO. From your earlier post it seems you want to sort by Product Suite, and then by item within product suite, is that correct? And you have no interest in sorting by PO?

Please advise Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
It sounds like you are trying to sort the detailed records (items) within a group (PO). You would have to have a field available to sort on. I would be surprised if there was no unique identifier for the POitems table that you could sort on, but there may not be one. Without knowing the structure of the database it is hard to guess.

Are you able to rearrange the details at all by sorting on the fields you have tried, or does the detail order not change? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top