Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 135
  • Last Modified:

Send a dynamic SQL Statement to CR 8.5 From VB

hi

i need to send a sql statement to a crystal report from vb at runtime. i am using crystal report control (OCX & not the viewer)

Kalihto
0
kalihto
Asked:
kalihto
  • 3
  • 2
1 Solution
 
hmadhurCommented:
How have you generated the RPT file? Have you used SQL/ODBC option or Active Data?

If you have used Active Data there is a better option of assigning a recordset directly to the report (Which is better)
0
 
hmadhurCommented:
You can use the SQL Query property of the ActiveX Control. I dont have CR 8.5. I am working on CR 7.

But beware, you should not change the columns in the select statements. For eg. your report extracts the Employee Code and Employee Name from Employee Table then your select statement should be

Select EmpCode, EmpName from Employee **where -----

You can only change the part after **. The SQL statement should remain unchanged.
0
 
hmadhurCommented:
You can use the SQL Query property of the ActiveX Control. I dont have CR 8.5. I am working on CR 7.

But beware, you should not change the columns in the select statements. For eg. your report extracts the Employee Code and Employee Name from Employee Table then your select statement should be

Select EmpCode, EmpName from Employee **where -----

You can only change the part after **. The SQL statement should remain unchanged.

Hope this helps.

Good Luck

If you have any more qs or things to clarify you can ask

Madhur
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
CleanupPingCommented:
Hi kalihto,
This old question (QID 20554360) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
GPrentice00Commented:
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I would appreciate any comments by the experts that would help me in making a recommendation.
It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp

GPrentice00
Cleanup Volunteer
0
 
GPrentice00Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Accept hmadhur's comment as Answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now