Can I pass the Order By clause from VB 6.0 to Crystal 8.5 OCX?

Posted on 2003-10-30
Last Modified: 2008-03-04
Can I pass the Order By clause from VB 6.0 to Crystal 8.5 OCX? Some one help me please....

Thanks in Advance

Question by:rchandr3
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
  • 2
  • 2
LVL 23

Accepted Solution

Ido Millet earned 250 total points
ID: 9652270
Pass a parameter value to control what a formula returns.  Sort on that formula.

- Ido

LVL 100

Expert Comment

ID: 9654698
You don't pass an order by clause but sort fields.

Public WithEvents cr_Generic_Report As CrystalReport

cr_Generic_Report.SortFields(1) = "{View.Field1}"
cr_Generic_Report.SortFields(2) = "{View.Field2}"

I believe you can pass as many as needed.  I have passed as many as 6.

LVL 23

Expert Comment

by:Ido Millet
ID: 9654751

The problem with the direct approach is that there is no graceful way to recover from an incorrect value being passed in.

With the parameter approach, the formula can have a default field used if the parameter value makes no sense.

- Ido

LVL 100

Expert Comment

ID: 9655287
Agree until I need to sort on two fields or then someone want 4 fields.  I have to keep changing the report.

You still haven't added a comment to


Author Comment

ID: 9660146
Thanks a lot mlmcc and ofcourse Ido...

Ido's idea was tried and it worked very well.... Thanks

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

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…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 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