[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: HTML Table of Contents examples



I will recommand you to use visualsqribe or to upgrade your
visualsqribe.
It is a feature that it does by just clicking on the mouse.

franck,

!--------------------------------------------------------------------------------
! Generated on Mon Jul 05 08:32:49 1999 by VisualSQRIBE 4.4.0.17
!
! Filename: C:\sqribe\VisualSQRIBE\PROGRAM\sans.sqr
! Format  : Tabular
! Username: S
!--------------------------------------------------------------------------------

Begin-Setup
 Declare-Layout Default
  Orientation = Portrait
  Paper-Size = (Letter)
  Top-Margin    = 0.50
  Bottom-Margin = 0.50
  Left-Margin   = 0.50
  Right-Margin  = 0.50
  Line-Height = 1
  Char-Width  = 1
 End-Declare

 Declare-TOC Default
  Entry = VS_TOC_Proc
 End-Declare

End-Setup

Begin-Heading 22 For-Tocs=(default)
 Graphic (21,1,540) Horz-Line 20
 Alter-Printer Font=4 Point-Size=16
 Print 'Table of Contents' (15,415,17)
   Print-Direct printer=html '%%TOC-Title Table of Contents'
 Alter-Printer Font=5 Point-Size=10
End-Heading

Begin-Procedure VS_TOC_Proc
 Alter-Printer Font=4 Point-Size=10
 Let #indent-size = 24
 Let #indentation = 1 + (#indent-size * (#sqr-toc-level - 1))
 Print $sqr-toc-text (12,#indentation)
 Print #sqr-toc-page (12,523)
 Next-Listing Skiplines=4 Need=14
End-Procedure

Begin-Program
 Do Main
End-Program

Begin-Procedure Main
 Position (1,1)
 Do CreateCSV_Main
   Print-Direct printer=html '%%ResetColor'
   Print-Direct printer=html '%%ResetBorder'
Begin-Select
 Alter-Printer Font=4 Point-Size=10
ENAME (10,1,10)
 Toc-Entry text=&ename level=1
COMM (10,128) Edit 9999999999999999na
SAL (10,288) Edit 99999.99na
 let $COMM_num = to_char(&COMM)
 let $COMM_num_tmp =
edit(&COMM,'999999999999999999999999999999999999999')
 let $COMM_num = ltrim($COMM_num_tmp,' ')
 let $SAL_num = to_char(&SAL)
 let $SAL_num_tmp = edit(&SAL,'99999.99')
 let $SAL_num = ltrim($SAL_num_tmp,' ')
 write 1 from  '"' &ENAME '"' ',' $COMM_num ',' $SAL_num
 Next-Listing  SkipLines=2 Need=12
>From  EMP
End-Select
 Next-Listing
End-Procedure

Begin-Procedure CreateCSV_Main
 Add 1 To #_CSVINDEX_Main
 Let $_CSVFILE_Main='C:/sqribe/VisualSQRIBE/PROGRAM/html/sans_Main_' ||
to_char(#_CSVINDEX_Main) || '.csv'
 Open $_CSVFILE_Main as 1 for-writing record=255:vary
 write 1 from  '"ENAME"' ',' '"COMM"' ',' '"SAL"'
End-Procedure

Begin-Heading 45
   Print-Direct printer=html '%%ResetColor'
   Print-Direct printer=html '%%ResetBorder'
 Alter-Printer Font=5 Point-Size=10
 Print $current-date (10,1) edit 'MM/DD/YY'
 Page-Number (10,523)
 Alter-Printer Font=4 Point-Size=10
 Print 'Ename' (33,1,5) Underline  Bold
 Print 'Comm' (33,128,4) Underline  Bold
 Print 'Sal' (33,288,3) Underline  Bold
End-Heading

Tonie Salzano wrote:
>
> Does anyone have an example of an SQR that creates a
> Table of Contents that shows a link on a data item,
> e.g. deptid, instead of page?
>
> We have a check distribution report that we need
> to make available to our remote campuses.
>
> Thanks
> Tonie Salzano
> Maricopa Community College District