Subject Re: [IBO] Calculated field / IB_Grid
Author Steven Beames
Or..... as long as FieldsIndex is still blank...can't you just change the
order that you select your fields in your SQL statement?
It seems that you don't have to select a column BEFORE using it, eg

SELECT J.JOBNO
, (SELECT C.FULL_NAME FROM CLIENTS C
WHERE J.CLIENTNO=C.CLIENTNO) AS CLIENT_NAME
, J.CLIENTNO
FROM JOBS J

gives me a different order to :

SELECT J.JOBNO
, J.CLIENTNO
, (SELECT C.FULL_NAME FROM CLIENTS C
WHERE J.CLIENTNO=C.CLIENTNO) AS CLIENT_NAME
FROM JOBS J

Cheers,
Steve

"Lucas Franzen" <luc@...> wrote in message
news:3AE4138D.6C89BBEF@......
>
>
> Nico Callewaert schrieb:
> >
> > Hi Markus,
> >
> > I'm using TIB_Query, not IBOQuery. I tried already before to
drag
> > things there, doesn't seem to work ...
>
> Me too.
>
> Just what Markus said: Open the QueryEditor, prepare the Query and open
> the dataset.
> Now you'll see the calculated field added at the end.
> Drag it to the position you like and APPLY the changes.
>
> If you open the FieldsIndex-TIB_StringList in the ObjectInspector,
> you'll see that there are entries for all fields now, including your
> calculated field and the position of all fields within this stringlist
> will be according to the position you did within the grid.
>
> For example if you have a query like:
> SELECT
> CUST_NR, CUST_NAME, CUST_LASTNAME, CUST_STREET,
> CUST_ZIP, CUST_TOWN
> FROM CUSTOMER
>
> and you add a Calculated field CUST_FULLNAME and you want to show this
> calculated as the first column in your grid, then move it there. In the
> FieldIndex you'll see:
>
> CUST_FULLNAME
> CUST_NR
> CUST_NAME
> ...
>
> afterwards.
> Just as long as you don't change any index-order this list will be
> empty.
> As soon as you do, it will be filled according to what you did in the
> grid.
>
> This is valid for e.g. the FieldsDisplayWidth, too - if you change the
> width of a field in the QueryEditor you'll get entries for every changed
> field width.
>
> (By the way: these are a perfect properties to save/load the settings of
> a grid as the user left it.)
>
> Luc.
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>