Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-03-07
8
Medium Priority
?
330 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
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 
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

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.

Question has a verified solution.

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

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 …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

618 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