?
Solved

Send a dynamic SQL Statement to CR 8.5 From VB

Posted on 2003-03-17
6
Medium Priority
?
134 Views
Last Modified: 2010-05-03
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
Comment
Question by:kalihto
[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
  • 2
6 Comments
 
LVL 1

Expert Comment

by:hmadhur
ID: 8157623
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
 
LVL 1

Accepted Solution

by:
hmadhur earned 80 total points
ID: 8157651
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
 
LVL 1

Expert Comment

by:hmadhur
ID: 8157660
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Expert Comment

by:CleanupPing
ID: 8532114
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
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8982896
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
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9033979
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

801 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