SET FILTER TO report_1 = printorder.global
INSTEAD OF
gcChartIndex = RTRIM(report_1)
printorder.global = 400
SET FILTER TO gcChartIndex = ALLTRIM(STR(printorder.global))
You would think it would be that easy.
>Consider using a paramterized view
>
>OR
>
>SET FILTER TO gcChartIndex = ALLTRIM(STR(printorder.global))
>
>OR
>
>SET KEY TO ALLTRIM(STR(printorder.global))
>
>>Hello all!
>>
>>I need some assistance with a form that I created. First to let you know, I created a chart.dbf which houses a field called chart_index C(25). In this field are various words which I am trying to tie to an index structure. In my form, I have the user selecting the name of a particular table to open. The system puts the fields of chart.dbf into a global variable. chart_index is set into gcChartIndex.
>>
>>Since all the structures and tables are different in the chart.dbf, none of the same fields or instances are going to be the same. One part of the form requires a filter being set.
>>
>>So I have the form open another table which houses this information to be retrieved. I need to set an order and a filter to this table. Thus I attempt:
>>
>>
>>SELECT datatable1
>>SET ORDER TO gcChartIndex (Using the variable as a index solution)
>>SET FILTER TO gcChartIndex = printorder.global (this is generally a numeric because the field structure is numeric)
>>
>>
>>I however end up getting an error. I can convert the printorder.global to STR(printorder.global), but it does not return a result. If I change gcChartIndex to VAL(gcChartIndex) - I blow a function argument error.
>>
>>Would anyone have any clue as how I would accomplish this?? Thanks!