Solved

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

Posted on 2011-03-07
8
319 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
Comment Utility
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
Comment Utility
Oh, sorry, misunderstood, don't they print in the order they were entered when you don't do anything?
0
 

Author Comment

by:leason2
Comment Utility
No, for some reason they don't...sometimes they will, but not always.
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:leason2
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

18 Experts available now in Live!

Get 1:1 Help Now