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

Master Detail linking doesn't work well with MBCS key field

edited September 2012 in General
Hi,

I found a problem using TppDBPipeline's MasterFieldLinks to link two
TClientDataSet instances as master detail relation that contain MBCS
string. The report doesn't show all rows.

To replay the problem:

1. Extract the attached zip file.
2. Change the OS's Language for non-Unicode programs to "Chinese
(Simplified, PRC) (require restart).
3. Use Delphi XE2 to compile the project.
4. Run the project, you should see master grid contain rows in the
following sequence: "?", "ANT", "ANT", "BOM".
5. Click Preview button but report shows one row only: "?".

This is due to the collation sorting order in TppDBPipeline is different
than TClientDataSet AnsiString MBCS field. If ReportBuilder could
handle the AnsiString MBCS field, then the problem should solve.

Note: attachment send to support@digital-metaphors.com.

--
Best regards,
Chau Chee Yang

Comments

  • edited September 2012
    Since you emailed support@, this is being handled via support@

    Please post to single destination only. :)

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2012

    After research, a couple of modifications to the example project resolved
    the issue:

    1. ClientDataSet: fields need to be defined as ftWideString rather than
    ftString

    2. Report layout: master/detail report needs to use a main report with a
    subreport


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2012
    Thanks for the reply. In practical, the data in TClientDataSet instance
    is fetched from TDataSetProvider + TSQLDataset. I have no control over
    the fielddefs structure.




    --
    Best regards,
    Chau Chee Yang

    E Stream Software Sdn Bhd
    URL: www.sql.com.my
    SQL Financial Accounting
  • edited September 2012

    The TClientDataSet does not collate the data correctly when the field type
    is ftString. The modified example I sent you a few days ago can be used to
    illustrate that point.


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

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