Hi,
I have a CrystalReport which has one field from a second table and all the other fields from the first table.
If I only choose valut_id from the first table which should be a foreign key of the second table which primary key is id, it displays correct values. But if I put valut from the second table (the second field in the second table) I don't get the correct values in the report.
When I first open the report with the valut field chosen, it doubles the rows, but if I make a formula for not doubling, I get all the values for the field valut equal, which is not correct.
It acts as if the bothb tables are not connected.
Could anybody help me please?
Loading
Prabhu RajaPosted Sep 6, 2011, 3:46 AM
NelPosted Sep 6, 2011, 4:12 AM
NelPosted Sep 6, 2011, 3:15 AM
I am talking about my CrystalReport. I have grouping by one field "VP". And there are only two values for "VP". So I have two groups in the CrystalReport, by the first value of VP ("ISP"), and by the second ("UPL") . I get them from the form depending of whether the radio button is selected for ISP or not (i.e. depending of which radio button is selected).
In the report, in the first group (for the value "ISP" of the field VP) I have all the records that have that value, but in the second group of the report (for the value "UPL") I always miss the first recordf entered in the database with that value for the VP. I can see in the report all the rest records, but not the first, eventhough the sum fields that I have for the grouping have correct value for the first group and for the second. And it looks as if the second is not correct, since the first record from the group "UPL" doesn't show in the report.
And about the database, everything is OK with it.
Thanks
Prabhu RajaPosted Sep 6, 2011, 2:58 AM
We can Classify tables as two Categories. parent table and child table . Parenet table will have an identity column and child table will have the column that refers the identity column of parent table as a foreign-key reference.
But Here We Can not say the number of rows in child table will equal to number of rows in parent table. In your case, your Second table is a child table and first table is parent table. your Child table may have or may not have any rows. We can solve this issue by using triggers in Database. Use Trigger, to advice Child table to add a row immediatly after parent row insertion.
NelPosted Sep 6, 2011, 2:46 AM
In my crystalreport in the second group only (not a case for the first group), the first record of that group doesn't show, and the sum is correct, it calculates that record as well. But it seams as if it was not correct, because the first record is not shown.
Do you have an idea what could be the problem?
Thanks in advance.
NelPosted Sep 6, 2011, 2:38 AM
Prabhu RajaPosted Sep 5, 2011, 5:48 AM
NelPosted Sep 5, 2011, 5:06 AM
Prabhu RajaPosted Sep 5, 2011, 4:52 AM
In the
Field Explorer ->right click Database Fields ->Select Database Expert .
you will get a window with data and Link Tap.
you can check the link between the two tables in the Link Tap.