Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

Why Group band isn't work ?

edited July 2004 in Subreports
I have 3 tables ( master detail / detail ) (DADE )
Table 1 (master )
Table 2 (detail 1 ) ====> linked table 1
Table 3 (detail of Table 2) ====> linked table 2

My report schema is ;

main report (Table 1)
Header
Detail
(subreport : Table 2)

subreport :(table2) report is
Title
Group Header ( this band isnt work )
Detail
(subreport : Table 2)
Group Footer
Summary

(subreport : Table 3)
Title
Detail

I want to make a group on Table2 (detail 1) .I set group field and sort my
table as this field but
its not work. While grup criteria is same of two record, report can't
combine those records on the same group.
Sometimes its work (on some records) but often don't.

Any idea ?

Thaks ,



Rb.7.04 enterprise / D7 / XP Prof.

Comments

  • edited July 2004

    The Grouping feature requires that the data is sorted on the grouping
    datafield value. When the datafield changes, a group break is generated.

    If you are grouping on data field of type String, be aware that the
    comparison to determine a group break is case sensitive. You can use the
    Group.OnGetBreakValue method to override this behavior.

    If you are using ReportBuilder DataPipeline linking feature to define the
    master/detail relationships and are linking on a string field value, then
    that could be causing an issue with the linking logic that has nothing to do
    with grouping. Please see the article below. I notice your email address is
    turkish, one turkish customer had to modify our source code to get the data
    linking logic to work. He modifed our code to use VarCompareValue rather
    than CompareStr, AnsiCompareStr etc. For the next major release we are going
    to add a Variant collation type.

    -------------------------------------------
    Tech Tip: Database Collation and Linking
    -------------------------------------------

    Overview
    ---------

    Linking DataViews in the ReportBuilder Data workspace (DADE), requires that
    the detail data be sorted by the linking fields. When DataViews are linked,
    DADE generates special linking SQL for the detail DataView. The linking SQL
    (Magic SQL) can be viewed by positioning the mouse over the DataView window
    and pressing Ctrl + Left Mouse button. The results of the Magic SQL query
    can be viewed by pressing Shift + Left Mouse button.

    ReportBuilder's DataPipeline architecture includes support for linked data
    traversal. Whenver the record position of the master data changes, the
    traversal logic compares the master and detail field link values and then
    determines where to locate the record position for the related detail data.
    The linking logic will only work properly if the Database engine's collation
    of the detail query result set is in sync with ReportBuilder's internaly
    field link comparison logic.

    Typically the database engine can be configured to use various language
    drivers which control the collation order used to sort query results.

    ReportBuilder contains the two properties that can be configured to control
    the internal field link comparison:

    Designer.DataSettings.CollationType (ctASCII or ctANSI) and
    Designer.DataSettings.IsCaseSensitive (True/False). Using these properties
    results in one of 4 Delphi string comparison routines being used to compare
    string data:

    1. ctASCII

    a. IsCaseSensitive = True --> CompareStr
    b. IsCaseSensitive = False --> CompareText

    2. ctANSI

    a. IsCaseSensitive = True --> AnsiCompareStr
    b. IsCaseSensitive = False -->AnsiCompareText


    The current values for the Designer.DataSettings are used to create new
    DataViews. The DataView's internal TdaSQL object saves the
    Designer.DataSettings as part of the dataview's definition. The
    CollationType and IsCaseSensitive values are assigned any DataPipeline field
    links created for the dataview.


    Designer.DataSettings -----> QueryDataView
    |_ SQL object
    |_ DataPipeline.Links[]: TppMasterFieldLInk


    Therefore to modify the DataSettings once a query has been modified requires
    that the SQL object and the DataPipeline.Links be updated.




    --


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.