Page 1 of 1

print hilited lines of tablefield

Posted: Sun Jul 22, 2007 8:25 pm
by haribo
hi,
i have a tablefield with data from database, i want select line 5- 10 or line 20- 50 , print Printcommand with selectedLines or hilitedLines dont work. need a howto
Ralle

Posted: Mon Jul 23, 2007 7:50 am
by Janschenkel
Hi Ralle,

You're going to have to explicitly combine the data yourself. Here's something to get you started:

Code: Select all

on mouseUp
  -- get the comma-separated list of the hilited lines
  put the hilitedLines of field "MyTable" into tHilitedLines
  -- append the text of the hilited lines to a new variable
  repeat for each item tLineNumber in tHilitedLines
    put line tLineNumber of field "MyTable" & return after tSelectedData
  end repeat
  -- remove the trailing return
  delete char -1 of tSelectedData
  -- now ask the user for the printing information
  revShowPrintDialog true, true
  revPrintText tSelectedData
end mouseUp
Also important to note is that the 'print' command is meant for printing the contents of cards, not individual fields or a chunk of text. The following commands are your friends for text printing: 'revShowPrintDialog', 'revPrintText', revPrintField'.

Hope this helped,

Jan Schenkel.

Posted: Mon Jul 23, 2007 7:40 pm
by haribo
works fine, thanks
Ralle