Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Purpose of enforce From n enforce to Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 May 2009 at 8:23am
Yes there is a difference and I think Lockwelle explained it pretty well. I assume you are asking because your "query" is still not working. However I am confused as to where you are using this query. Since you are seeing the enforce to / from options it means you added the two tables to the report and joined them in the table expert. BY doing that Crystal writes it's own SQL expression that would be similar to what you are trying to write. Given this why are you trying to use a query at all? Are you trying to write a select statement in crystal?
The Select expert in crystal is used to filter down the data not recreate your SQL statement. With the select statement you do not redefined the tables, joins and fields you want to include in the report, you just limit that data down (e.g. you only want the department of "ABC" in the report you put {dep.depname}="ABC" in the select statement).
Am I missing something here?


Edited by DBlank - 25 May 2009 at 8:25am
IP IP Logged
nani2020nani
Newbie
Newbie


Joined: 13 May 2009
Online Status: Offline
Posts: 14
Quote nani2020nani Replybullet Posted: 25 May 2009 at 8:40pm

ya tnx buddy i got it now

 

tnx a ton

avsr
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Aug 2009 at 12:06pm

For those of you that once followed this post or are interested I accidently figured the ENFORCE options out a bit more.

Table_A inner join to table_B set as "NOT ENFORCED"
and there are 20 records in table_A and only 10 matching records in table_B (say linked on a primary PrimaryID#=PrimaryID#)
There is no select statement.
If you do not use any field from Table_B in ANY capacity and do use any field from table_A the report will return all 20 rows and ignore the join (e.g. not enforced).
If you change it to "Enforced To" (A to B) it still will return 20 rows.
If you change it to "Enforced From" (A toB) or "Enforced Both" it will return only the 10 rows (matching records).
If you use ANY field in any capacity from Table_B it will enforce the join and return only the 10 mathcing records regardless of the Enforce join selection.
Hope this helps someone in the future.
IP IP Logged
<< Prev  Page  of 2
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum