Want to pass sql query to rystal report

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.
LVL 1
pak_slmAsked:
Who is Participating?
 
dhanushConnect With a Mentor Commented:
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
 
pak_slmAuthor Commented:
i use three ado for report. how i can pass three different recordset for different ado
0
 
pak_slmAuthor Commented:
i need to change query because i change two fiels data and where condition each time i call report
0
 
pak_slmAuthor Commented:
please answer the question to solve my problem.
0
 
pak_slmAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.