Master Detail linking doesn't work well with MBCS key field
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
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
This discussion has been closed.
Comments
Please post to single destination only.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
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
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
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