unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Datasnap.DBClient, Vcl.Grids, Vcl.DBGrids, NxGridView6, NxColumns6,
  NxControls6, NxCustomGrid6, NxVirtualGrid6, NxDBGrid6, NxDBColumns6, Vcl.StdCtrls;

type
  TForm1 = class(TForm)
    PersonsDataSet: TClientDataSet;
    PersonsDataSetFirstName: TStringField;
    PersonsDataSetLastName: TStringField;
    PersonsDataSetNotes: TMemoField;
    AgeCategoriesDataSet: TClientDataSet;
    PersonsDataSetAgeCategory: TStringField;
    AgeCategoriesDataSetAgeKey: TStringField;
    AgeCategoriesDataSetDescription: TStringField;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    DataSource2: TDataSource;
    NextDBGrid61: TNextDBGrid6;
    NxReportGridView61: TNxReportGridView6;
    NxDBTextColumn61: TNxDBTextColumn6;
    NxDBTextColumn62: TNxDBTextColumn6;
    NxDBMemoColumn61: TNxDBMemoColumn6;
    NxDBLookupColumn63: TNxDBLookupColumn6;
    NxDBTextColumn63: TNxDBTextColumn6;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  AgeCategoriesDataSet.Append;
  AgeCategoriesDataSet.Fields[0].AsString := 'CLD';
  AgeCategoriesDataSet.Fields[1].AsString := 'Child';
  AgeCategoriesDataSet.Post;

  AgeCategoriesDataSet.Append;
  AgeCategoriesDataSet.Fields[0].AsString := 'TEE';
  AgeCategoriesDataSet.Fields[1].AsString := 'Teenager';
  AgeCategoriesDataSet.Post;

  AgeCategoriesDataSet.Append;
  AgeCategoriesDataSet.Fields[0].AsString := 'YAD';
  AgeCategoriesDataSet.Fields[1].AsString := 'Yound Adult';
  AgeCategoriesDataSet.Post;

  AgeCategoriesDataSet.Append;
  AgeCategoriesDataSet.Fields[0].AsString := 'ADL';
  AgeCategoriesDataSet.Fields[1].AsString := 'Adult';
  AgeCategoriesDataSet.Post;

  AgeCategoriesDataSet.Append;
  AgeCategoriesDataSet.Fields[0].AsString := 'SEN';
  AgeCategoriesDataSet.Fields[1].AsString := 'Senior';
  AgeCategoriesDataSet.Post;

  PersonsDataSet.Append;
  PersonsDataSet.FieldByName('FirstName').AsString := 'Michael';
  PersonsDataSet.FieldByName('LastName').AsString := 'Johnson';
  PersonsDataSet.FieldByName('AgeCategory').AsString := 'ADL';
  PersonsDataSet.Post;

  PersonsDataSet.Append;
  PersonsDataSet.FieldByName('FirstName').AsString := 'Eve';
  PersonsDataSet.FieldByName('LastName').AsString := 'Doris';
  PersonsDataSet.FieldByName('AgeCategory').AsString := 'TEE';
  PersonsDataSet.Post;

  PersonsDataSet.Append;
  PersonsDataSet.FieldByName('FirstName').AsString := 'Ann';
  PersonsDataSet.FieldByName('LastName').AsString := 'Ericson';
  PersonsDataSet.FieldByName('AgeCategory').AsString := 'SEN';
  PersonsDataSet.Post;
end;

end.
