Home End User

Bug in Data Designer DADE

edited September 2002 in End User
I've encoutered a weird behavior in your Data Designer (DADE). I've set the
Data Dictionary correctly and working just right. When I create a DataView,
sometimes it makes the master-detail join to another DataView, sometimes it
just does not. I've trace the problem that if you create a DataView from a
natural table in the beginning and later create (natural/join table)
DataView, the master-detail link will be drawn. If you create join table
DataView first and create a (natural/join table) DataView later, it do not
draw the master-detail relationship. Why is such behavior implementated and
is there a work around this inconsistency??

I'm using Delphi 6 Report Builder 7.0 Enterprise.

Comments

  • edited September 2002
    If the tables are already joined, then it won't try to link because the link
    would most likely be undesired if the join already existed in a dataview.

    Autolinking is the default behavior if AutoJoin is set to true when using
    the data dictionary. If there is a join relationship, it will try to link
    the dataviews based upon the best join information from the datadictionary.
    There is no AutoLinking property to turn this off. You can turn it off if
    you set AutoJoin to False.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    It would appear to be inconsistent, but it is working as it was designed.
    The reason it works the way you have found is that there can only be one
    entry for the two tables on that join field in the join table of the data
    dictionary. Autolinking is order dependent. When you create dataview B and
    then create A, it will link based on the join information in that order in
    the data dictionary. If there is a join entry for B to A then it will
    autolink. If there is a join entry for A to B, then it will not auto link.

    What can happen is that it is not known whether you want to use the dataview
    as a lookup or as the master. Let's say we have a dataview for customers
    and another datview which is orders and items joined. It could be that
    customer could be a master for the order-items dataview, or that customer
    could be a lookup for the orders-items dataview. This is why the order is
    important. It should create an autolink based on the join order of the entry
    in the join table. Since there is only one entry in the dataview, it will
    only create the autolink in one direction when those dataviews are created
    when autojoin is in effect.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    AutoJoin prooperty is set to True.
    From how I see it, it's not a desirable reaction from it. It actually show
    inconsistency. Let's look at it in a different scenario:
    you are designing 2 dataview, A is a join table and B is from a single table
    scene 1:
    you create table A then you create table B. No join.
    scene 2:
    you create table B then you create table A. join established.

    Don't you think it is inconsistent? Will there be a fix to this problem?
    I'll ask my superior should we shut the AutoJoin feature.

  • edited October 2002
    I see the problem you are describing.

    If there are two tables in a master dataview, then RB won't allow this to be
    an auto linked master dataview. Open up daQueryDataview.pas in your copy of
    the source and change TdaQueryDataView.CreateAutoLink to remove the check to
    see if lDataView.SQL.SelectTableCount = 1.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    But this is not really the issue here. I've tried what you are claiming
    here. I have 2 tables and I assign 1 join entry in the join table:
    table A
    table B
    (table A is master to table B)
    Scenario1:
    I drop table A then drop table B. Join established.
    Scenario2:
    I drop table B then drop table A. Join established.
    Conclusion, the order of DataView creation do not affect the join creation.

    New Case: I add one more table C and 1 join entry to table B being B as
    master:
    Scenario 3:
    I drop DataView table A then drop DataView table B & C. Join established.
    Scenario 4:
    I drop DataView table B & C then drop DataView table A. No join established.

    The issue is no longer relate to the join entry. On Scenario 1 & 2 it proved
    that no matter the order of when the DataView is created, the join will be
    established. For Scenario 4, clearly it is a bug or inconsistency in design.
    their difference is just the order creation but Scenario 4 fails.

    ----- Original Message -----
  • edited October 2002
    It should work. The problem is that you can link to the dataview by
    dragging the field to link manually, but it won't autolink when it is
    created. Now it will autolink in addition to letting you link manually as
    it did before. There should be no problem by changing this code. We are
    going to leave our design the way it is in order to force the user to choose
    if the dataview is going to be the master or a lookup. In future releases,
    you'll have maintian your change in our source. Be sure that you do NOT
    change the interface section of any of the RB source uints if you are using
    RAP, otherwise, the RAP dcus won't work.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    Okay. The problem is fixed. Apparently, this is not a bug and is really part
    of a design. I just want to ask, Why? I might be afraid that if I make this
    change, a more serious problem will occur.

This discussion has been closed.