Dear all,
I have few questions about the Data Export components, (e.g. TCSVExporter). I create a database at runtime, then I create queries and I would like to save the resulting datasets.
Is it possible to save the datasets using as field headers something different than the field names? Have I to use the ExportedName property? How can I set it during runtime?
Is it possible to define a mask to save float fields? e.g If I would like to save a float number with only two decimal digits, how can I do that? Thanks to all,
andrea
Mailing lists / lazarus / 2009-05
data export components
8 messages · 3 people · –
- AAndrea Mauri 4
- MMichael Van Canneyt 3
- MMattias Gaertner 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Andrea Mauri wrote 7 lines
Yes, ExportedName is what should be used.
You should populate the ExportFields collection, and set the ExportedName property of each item.
Is it possible to define a mask to save float fields? e.g If I would like to save a float number with only two decimal digits, how can I do that?
I would think that the displaymask of the field component can be used to do so ?
Michael.
Show quoted text 9 lines
Show quoted text 13 lines
I will try it.
Show quoted text 8 lines
Do you mean the DisplayFormat of the field? If so, it does not work. If I set the DisplayFormat of the fields, the fields are shown correctly on a dbgrid but when I save them using TCSVExporter they are saved without formatting.
andrea
Andrea Mauri wrote 26 lines
Hm. I'll have a you please enter a bug report and assign it to me ?
Michael.
Dear Michael,
I entered a bug report (ID 0013837 [Packages] Database). How can I assign it to you?
Another question related to the exporter, both demoes do not work. I get these error messages:
C:\Programmi\Lazarus_svn\components\dbexport\demo\gendata.pp(127,32) Error: Identifier not found "UTF8ToSys"
C:\Programmi\Lazarus_svn\components\dbexport\demo\gendata.pp(130,34) Error: Identifier not found "UTF8ToSys"
C:\Programmi\Lazarus_svn\components\dbexport\demo\gendata.pp(186) Fatal: There were 2 errors compiling module, stopping
Any suggestion?
Thanks,
Andrea
Show quoted text 11 lines
Andrea Mauri wrote 13 lines
That has something to do with the lazarus version; Make sure you have the last one ? I'm not sure how to advise in this case, I think someone of the lazarus team should confirm this.
Michael.
Show quoted text 18 lines
I use Lazarus 0.9.27 r20243 FPC 2.2.4 i386-win32-win32/win64. Best regards,
Andrea
Michael Van Canneyt ha scritto:
Show quoted text 49 lines
That has something to do with the lazarus version; Make sure you have the last one ? I'm…
Show quoted text 21 lines
Fixed in svn r20247.
Mattias
