Re: Report Footnotes

From: Luis Cabral <cabral_at_merconet.com.br>
Date: 1998/01/07
Message-ID: <01bd1ab9$60180220$2210f6c8_at_lcdc>#1/1


Hi JSeeman,

I had a problem similar to that and this was my solution:

  • Create a formula column at the level of the query, char(1): footnoteindex, that will hold the footnote index (A,B...)
  • Create a placeholder column at the report level, number(1): currentindex, that will hold the ascii code of then current index (65=A, 66=B ...)
  • Create a placeholder column of type string very big, char(2000), at the level above footnoteindex (or wherever): footnotes , that will hold all the footnotes and its indexes so far (A - Blablabla B - Bla Bla Bla ...)
  • In footnoteindex formula, put the following code:

        // verify if the text of the footnote (footnotetext) is already on the string

	p := instr(:footnotes, :footnotetext);
	if p = 0 then	//no, it is not: take the next index (A,B...) and concatenes
all
		if :currentindex is null then
			:currentindex := 65;	// ascii code for letter A
 else
			:currentindex := :currentindex + 1;
		end if;
		// you put chr(10) to break the line
		:footnotes := :footnotes || chr(10) || chr(:currentindex) || ' - ' ||
:footnotetext;
		// return the calculated index
		return chr(:currentindex);
	else
		// it is already in the string: take the index four positions back
		return substr(:footnotes, p - 4, 1);
	end if;

See, it is not a trick, it is a valid implementation.

Espero ter ajudado ;)

-- 
Luis Cabral
cabral_at_merconet.com.br


JSeeman102 <jseeman102_at_aol.com> escreveu no artigo
<19980105210500.QAA20229_at_ladder01.news.aol.com>...
> I have a complex report that I am currently doing on a batch basis using
 Pro*C
> 2.2.3 in Unix.  What I would like to do is to move it into the
 client-server
> arena using Dev. 2000 Reports 2.5.  Here is the tricky part:
> 
> Many different fields can have footnotes attached to them.  Although
 these
> footnotes are assigned numbers, which can then be looked up in a table,
 the
> report will show the footnote as a sequential letter, i.e., the first
 footnote,
> although it may be 327, will be labeled 'A', the second footnote,
 although it
> may be 7, will be labeled 'B', and so on.  If a footnote repeats, say
 footnote
> 7 ('B'), it will, of course, be referred to as 'B' again.
> 
> In the batch program I am populating a temporary table with the footnote
 number
> and its corresponding sequential letter reference.  Everytime a new
 footnote is
> encountered, it is looked up in the temporary table.  If it has been used
> before, the same letter reference is used; if it is new, than the next
> sequential letter is assigned to it.  After the detail report prints all
 the
> data with any footnotes found, the batch program prints out the footnotes
 and
> their descriptions (really they are end notes rather than footnotes).
> 
> I want to be able to do the same thing using the Report Writer that I
 currently
> am doing in the batch program.  Can anyone think of a way?  Thanks for
 any
> help. 
> 
Received on Wed Jan 07 1998 - 00:00:00 CET

Original text of this message