SQLQuery in Crystal Report 4.6 : NOT FILTERING DATA (HELP) 
Author Message
 SQLQuery in Crystal Report 4.6 : NOT FILTERING DATA (HELP)

On VB5.0, depends of some choices of the user, I must retrieve some data
from my database. I put the command CrystalReport1.SQLQuery="SELECT..."
depending of the situation, but every time I get all the results of the
database with no filter. Why is that so?

here is the code:
CrystalReport1.ReportSource = crptReport
 CrystalReport1.ReportFileName = App.Path & "\exp.rpt"
CrystalReport1.SQLQuery = "SELECT..."
CrystalReport1.DiscardSavedData = True
CrystalReport1.DataFiles(0) = path_to_database
 CrystalReport1.Connect = ";pwd=" & PASSWORD & ";"
CrystalReport1.Action=1

thanks...



Mon, 01 Jan 2001 03:00:00 GMT  
 SQLQuery in Crystal Report 4.6 : NOT FILTERING DATA (HELP)
You need to include in your Crystal Report a selection formula or add one at
runtime.  The selection formula needs to match the WHERE clause in your
select statment.  At runtime you use object.SelectionFormula =
"{table.field} = " + varialbe.  Then your WHERE clause would be WHERE
table.field = xxxxx.


Tue, 02 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem refreshing report data in crystal reports 4.6

2. Crystal Report 4.6 in Crystal Report 6.0

3. Help !!! Problem with Crystal report 4.6

4. Help !!! Crystal Report 4.6 with database in Excel

5. Printer ports problem in Crystal reports 4.6 - Please Help

6. Crystal Report 4.6 NEED HELP!!!

7. Need help with SelectionFormula in Crystal Reports 4.6

8. Crystal Reports 4.6 Question - Please Help!?!

9. crystal reports 4.6 help PLEASE!!!!!!!

10. Crystal Reports 4.6 help

11. Crystal Reports 4.6 / VB5 Tables in Report

12. Crystal Report 4.6 and Sub report

 

 
Powered by phpBB® Forum Software