Solved

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

Posted on 2003-10-30
5
484 Views
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

0
Comment
Question by:rchandr3
[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
  • 2
  • 2
5 Comments
 
LVL 22

Accepted Solution

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

Cheers,
- Ido

0
 
LVL 100

Expert Comment

by:mlmcc
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.

mlmcc
0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 9654751
mlmcc,

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.

Cheers,
- Ido

0
 
LVL 100

Expert Comment

by:mlmcc
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
http://www.experts-exchange.com/Databases/Crystal_Reports/Q_20772691.html

mlmcc
0
 

Author Comment

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

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
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 a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

740 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