Juan Antonio Gonzalez Ramos wrote:
> I need write tab ( \t ) characters in my detail line of my report (written
> for CA-Report Writer).
>
> Can I do it ?
>
> Anybody can help me ?
We are using some odd character seqence in the output from the Report Writer. We then run a sed script to replace this odd character sequence with the \t character.
We use the same technique to trim the trailing spaces on the line.
In our c-program this will look like this:
#define UNIQUE_PADDING "`??`"
#define LINE_END_PADDING "`!!`"
sprintf(h_string, "/bin/sed -e 's/[ ]*%s[ ]*/%s/g' -e 's/%s[ ]*$//' < %s > %s",
UNIQUE_PADDING, "\t",
LINE_END_PADDING,
tmp_report_file_name,
output_file_name);
system(h_string);
Our detail part of the Report Writer script will look like this:
.DETAIL
.PR varchar(col_1) (c0) .PR "`??`"
.PR varchar(col_2) (c0) .PR "`??`"
.PR varchar(last_col) (c0)
.PR "`!!`"
.NL
Kind regards
Rolf
-
vvvvvvvvv --------------------------------------------------------
vvvvvvv Rolf Cohn Tel.: +47 2263 7658
vvvvv Alcatel Telecom Mail: Postbox 310 Økern, N-0511 Oslo
v -------------------------------------------------------------
At 10:28 AM 3/3/98 +0000, Roy Hann wrote:
>Someone wrote:
>>I need write tab ( \t ) characters in my detail line of my report (written
>>for CA-Report Writer). Can I do it ?
>
>This is covered in the Ingres FAQ (available from http://www.naiua.org).
>No one has yet worked out how to do this, though the last time I tried was
>several major releases ago, so things may have changed. I'd be glad to
>hear if anyone has cracked this because it is a FAQ.
> ...
I am pleased to report that the workarounds suggest in the Ingres FAQ do
indeed work now, at least on Solaris with OpenIngres 2.0/9712. I have
not tried other OpenIngres versions.
In particular I tried:
.QUERY
SELECT ...,xx=CHAR(x'09'),...
.DETAIL
.PRINT ..., xx(q0), ...
and got a tab in the output file.
FAQ maintainer(s), take note!
Karl R. Schendel, Jr.
K/B Computer Associates schendel@kbcomputer.com
Ingres and Unix Expertise
Ingres Q & A
Back to William's Home Page
© William Yuan 2000
Email William