Re: Order By in 4GL Report
Posted in 1997
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Bryan Tonnet wrote: } } Anyone know of a decent (decent = not recopying the entire report block) way } to include a dynamic "order by" in a 4GL report? } } That is, if my report driver is; } } LET sql_stmt_l = "SELECT a,b,c FROM z" } } IF something THEN } LET sql_stmt_l = sql_stmt_l clipped, " ORDER BY a" } ELSE } LET sql_stmt_l = sql_stmt_l clipped, " ORDER BY b" } END IF } } ; can the report be told of a variable "order by", or am I stuck with } a different report block for each possibility? } } Thanks in advance } } Bryan Tonnet } batonnet@zeta.org.au Try to use ORDER EXTERNAL BY a,b in the report and set to null b when ORDER BY a and viceversa. I think this is a decent way :-) -- ------------------------- Luis M. Agudelo Jimenez luismi@cot.es