View Issue Details

IDProjectCategoryView StatusLast Update
0005534JEDI VCL00 JVCL Componentspublic2011-04-01 21:03
ReporterdcabaleAssigned Tojfudickar 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0005534: [TJvCustomCsvDataSet]: create calculated /lookup fields at run-time
DescriptionHi,
it seems impossible to create calculated /lookup fields at run-time, because CsvFieldDef property contains a string with only fkData FieldKind fields.
Am I right?
Additional InformationAs a workaround, I suggest adding a (public) procedure CreateFields; override;

Content is as follow:
procedure TJvCustomCsvDataSet.CreateFields;
begin
  InternalInitFieldDefs;
  inherited CreateFields;
end;

Use is as follow:
   aJvCsvDataSet.CsvFieldDef := 'xxxxx';
   CreateCalculatedFieldDefs; //create the calculated /lookup fields you want
   aJvCsvDataSet.CreateFields; //proposed procedure
   aJvCsvDataSet.LoadFromFile(xxxxx);
TagsCreateFields, run-time, TJvCsvDataSet

Activities

jfudickar

2011-03-31 21:53

developer   ~0018497

Could you create a sample based on csvdataset sample?

2011-04-01 12:13

 

CsvMasterDetail.zip (4,219 bytes)

dcabale

2011-04-01 12:14

reporter   ~0018500

The attached sample project is pretty self explanatory ..

jfudickar

2011-04-01 21:03

developer   ~0018504

Added to svn.

Thanks for your solutions.

Issue History

Date Modified Username Field Change
2011-03-30 11:39 dcabale New Issue
2011-03-30 11:43 dcabale Tag Attached: TJvCsvDataSet
2011-03-30 11:43 dcabale Tag Attached: CreateFields
2011-03-30 11:43 dcabale Tag Attached: run-time
2011-03-31 21:53 jfudickar Note Added: 0018497
2011-03-31 21:53 jfudickar Status new => feedback
2011-04-01 12:13 dcabale File Added: CsvMasterDetail.zip
2011-04-01 12:14 dcabale Note Added: 0018500
2011-04-01 21:03 jfudickar Note Added: 0018504
2011-04-01 21:03 jfudickar Status feedback => resolved
2011-04-01 21:03 jfudickar Resolution open => fixed
2011-04-01 21:03 jfudickar Assigned To => jfudickar