hi all,
i m a new user of crystal Reports. till now i know how to show data in Crystal report from one table by simply adding the fields into the crystal report. but i want to learn how can i open crystal report with selected Data only.
Suppose i have a Table Named Table1 and i have added it to crystal report and shows all the data of the table. but i want to use this query to show data.
i want to see only one record whose id is 1Code:SELECT * FROM Table1 Where id=1
or
please tell me how can i achieve this? im too much disappointedCode:select * from table1 where doj=#01-01-1990#
im using this code to acheive this
but it shows me all the data in the table. please fix this problem and also i want to learnCode:Private Sub Command1_Click() CR.DataFiles(0) = App.Path & "\db1.mdb" CR.SQLQuery = "SELECT * FROM table1 WHERE id=4" CR.ReportFileName = App.Path & "\report1.rpt" CR.Action = 1 End Sub
_____________________
(2)
What steps i have to perform if i have to show data in the report from two or more tables? and i have to use WHERE clause in the SQL.
please help
what im think for my second task is.
1) i will add those tables into the Crystal report which are needed (two or more tables)
2) then i will put their FIELDS into the proper place of the Report where they should be displayed
3) I need to run the SQL command for SELECTED records ( i dont know how to run SQL i asked about that in my first problem )
4) then i will show the report.
will it work? fine please tell me the Steps only for my second task i will try those steps to achieve the task
please do help



Reply With Quote