Solved

Want to pass sql query to rystal report

Posted on 2002-03-27
5
153 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
[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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determine Range to Select 5 64
VB6 - Convert HH:MM into Decimal 8 76
Spell Check in VB6 13 148
Set WorkSheet  not Working 9 62
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

751 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