on 06-16-2015 5:24 PM
Hello,
I am using vb.net and my report is using 1 dataset and it has 2 tables in it. Tbl1 is the parent table, Tbl2 is the Child table and My sql statements are something like this..
1stSelect = "Select * from Tbl1 where status = 'A' and ID > 10"
myDa.Fill(myDS, "Tbl1")
2ndSelect = "Select * from Tbl2 "
myDa.Fill(myDS, "Tbl2")
The tables are linked in the dataset by column "ID" (Both tables have ID as common key field).
I do see my dataset myDS has records in it. When I placed the fields from the Dataset (Tbl2) on the report in Detail Section of the Crystal report, I can see all the fields from Tbl1 on the report, Also I see only 1 record from the Tbl2, why the other records from Tbl2 are not showing on the report?
Is there anything wrong in my SQL statements, I am not manually joining them here however I expect crystal report engine to join them when managing the relationship.
Also another question, I am only selecting a subset of records from the Database in my 1stSelect statement, however I am selecting everything in my 2ndSelect, how does crystal report group Tbl1 with matching Tbl2 records for the report? Do I need to change the 2ndSelect statement to extract only records matching with my 1stSelect? That way both tables will have matching conditions?
Please help. Thanks.
JS
Hi JS,
One thing to note is you are using the Push model with CR, that means you are pushing the data to the report and CR is simply showing whatever you pass him to.
In this case CR would not perform any internal manupulations on the data unless you have designed the report to do so. Thus, pass the exzact data to the report which you would want to see in report.
Thanks,
Bhushan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.