Solved

Want to pass sql query to rystal report

Posted on 2002-03-27
5
149 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now