Solved

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

Posted on 2011-03-07
8
322 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
 
LVL 100

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 100

Accepted Solution

by:
mlmcc earned 500 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 100

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

932 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now