Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-05

data export components

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrea Mauri

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

Reply by email

Michael Van Canneyt
to Andrea Mauri
Andrea Mauri wrote 7 lines
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?

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
Thanks to all, andrea _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Andrea Mauri
to Michael Van Canneyt
Show quoted text 13 lines
> 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? Yes, ExportedName is what should be used. You should populate the ExportFields collection, and set the ExportedName property of each item.

I will try it.

Show quoted text 8 lines
> 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 ?

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

Reply by email

Michael Van Canneyt
to Andrea Mauri
Andrea Mauri wrote 26 lines
>> 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? > > Yes, ExportedName is what should be used. > > You should populate the ExportFields collection, and set the ExportedName > property of each item. > I will try it. >> 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 ? > 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.

Hm. I'll have a you please enter a bug report and assign it to me ?

Michael.

Reply by email

Andrea Mauri
to Michael Van Canneyt

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
> > 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. Hm. I'll have a you please enter a bug report and assign it to me ? Michael.

Reply by email

Michael Van Canneyt
to Andrea Mauri
Andrea Mauri wrote 13 lines
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?

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
Thanks, Andrea >> >> 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. > > Hm. I'll have a you please enter a bug report and assign it > to me ? > > Michael. _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Andrea Mauri
to Michael Van Canneyt

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
On Tue, 26 May 2009, Andrea Mauri wrote: > 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? 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. > Thanks, > Andrea >>> >>> 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. >> >> Hm. I'll have a you please enter a bug report and >> assign it >> to me ? >> >> Michael. > > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gaertner
to Michael Van Canneyt: That has something to do with the lazarus version; Make sure you have the last one ? I'm…
Show quoted text 21 lines
On Tue, 26 May 2009, Andrea Mauri wrote: > 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? 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.

Fixed in svn r20247.

Mattias

Reply by email