[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-03-07
8
Medium Priority
?
331 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
  • 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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

865 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