?
Solved

crystal report 9 filtering records with visual basic 6

Posted on 2004-08-08
5
Medium Priority
?
358 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
[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
5 Comments
 
LVL 2

Accepted Solution

by:
Parsi earned 672 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 101

Assisted Solution

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

Assisted Solution

by:keijerjh
keijerjh earned 664 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This is about my first experience with programming Arduino.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…
Suggested Courses

800 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