Solved

crystal report 9 filtering records with visual basic 6

Posted on 2004-08-08
5
344 Views
Last Modified: 2010-08-05
I have made a report in crystal report 9 and then I added that report in my visual basic application using the add crystal report from the project menu. My report also contains a sub report. Both the report and sub report return all the records from the tables or view they are connected. I want to filter both the report and sub report to give me the limited result e.g all record from a particular month. How will I do this please help. I am using visual basic 6 with service pack 6, crystal report 9 and sql server 2000
0
Comment
Question by:ShakeelAhmed
5 Comments
 
LVL 2

Accepted Solution

by:
Parsi earned 168 total points
ID: 11749879
You shall set 'SQLQuery'.
For example:
cr1.SQLQuert = "Select * from Q Where Condition"
In which cr1 is your CrystalReport Object, and Q is the name of the query which your report is using, and ofcourse Condition is your Criteria.

Good Luck.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 166 total points
ID: 11757058
0
 
LVL 1

Assisted Solution

by:keijerjh
keijerjh earned 166 total points
ID: 11788009
Hi,

I've had the same problem.
You should create a parameterized query in your subreport.

Query:
SELECT * FROM ITEM WHERE ITEM_ID='{?ITEM_ID}'
Parameter:
ITEM_ID

Link the parameter ITEM_ID to a field in your main report.
This should do it.

Good luck.
Yelle...
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 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

21 Experts available now in Live!

Get 1:1 Help Now