?
Solved

Maintain the order of the static Parameter List in the output of the report

Posted on 2011-03-07
8
Medium Priority
?
328 Views
Last Modified: 2012-05-11
Hello,
This is a simple report where a driver enters his Invoice #s into the Static Parameter List. The report then outputs them.
The datasource is a SQL Command.
My need is to have the report print them in the order that they are entered. Does this require a formula? Does anyone have any ideas?
Thank you.
ROUTINGSHEET-US.rpt
0
Comment
Question by:leason2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 18

Expert Comment

by:UnifiedIS
ID: 35060147
Find your icon that looks like an A and Z with circular arrows (sort expert).  Select your field: Command.ESCINO
0
 
LVL 18

Expert Comment

by:UnifiedIS
ID: 35060151
Oh, sorry, misunderstood, don't they print in the order they were entered when you don't do anything?
0
 

Author Comment

by:leason2
ID: 35060171
No, for some reason they don't...sometimes they will, but not always.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 35060351
They will print in the order they are found in the database.

So you want the user to enter invoice numbers and then have the report show them in that order?

If the user enters this for one run
X101, D301, R401

Next run
D301, X101, R401

And you want the order to be different in the report?

mlmcc
0
 

Author Comment

by:leason2
ID: 35060535
That's correct. Someone is manually figuring out the most efficient route for the driver to stop by each Vendor to collect the Invoices. That user will enter the Invoices in that order.
If it will print this order out,  the driver just goes down the list to pick up. Eventually, it will show the Vendor Details, ie. Address, City and so forth.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35060655
Try this idea

Add a formula to the report, substitute your parameter field for ?Names and your field for Table2.Field3

Local NumberVar index;
Local NumberVar ans;

For index := 1 to UBound({?Names}) do
   If {Table2.Field3} = {?Names}[index] then
      ans := index;
ans

Make this the primary sort for the report

mlmcc
0
 

Author Closing Comment

by:leason2
ID: 35061197
That worked like a charm! Thank you very much. Would you care to explain what it's doing? I noticed it doesn't use the WhilePrintingRecords or 'Reading...'. So, this is purely for the Sorting mechanism?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35061533
Multiple value parameters are treated as an array in Crystal so the idea was to search the array for the field and save the index.

Since you wanted it as a sort it can't use the WhilePrintingRecords but relies on Crystal to evaluate it when it is needed.

mlmcc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question