Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Want to pass sql query to rystal report

Posted on 2002-03-27
5
Medium Priority
?
157 Views
Last Modified: 2010-05-02
I design a report on base of a three sql query using ado.
Now i want that the fields and design of report remain same but i pass a new query to the report because a field amount calculation vary on the base of the requirement.

How it is possible or any other way to solve the problem.
0
Comment
Question by:pak_slm
  • 4
5 Comments
 

Accepted Solution

by:
dhanush earned 150 total points
ID: 6902369
If you are using ado for the crystal reports then you can pass the recordset created based on your query using "Setdatasource" method .

Dim cryRept As CRAXDRT.Report
cryrept.database.setdatasource <recordset>
0
 
LVL 1

Author Comment

by:pak_slm
ID: 6906452
i use three ado for report. how i can pass three different recordset for different ado
0
 
LVL 1

Author Comment

by:pak_slm
ID: 6906460
i need to change query because i change two fiels data and where condition each time i call report
0
 
LVL 1

Author Comment

by:pak_slm
ID: 6925013
please answer the question to solve my problem.
0
 
LVL 1

Author Comment

by:pak_slm
ID: 6952583
Thanks
i use this code successfully

Dim cryRept As CRAXDRT.Report
cryrept.database.setdatasource <recordset>

one thing more if you can do favour

if is use this code second line as
cryrept.database.setdatasource(

then it require three parameter like data, data tag, tableNomber

what is meaning of these parameters. Can i use for more than one ado like
    Report.ParameterFields(1).AddCurrentValue HeadName

Please help me.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

916 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