OIPI Gurus ... (OpenInsight 32-bit Specific)
At 16 JUN 2002 10:51:06AM [email protected] wrote:
1) How can I change cell size of the table to be 2 (or more) 'lines'. I know that you can allow 'wrapping' but isn't there a way to size. Padding a bunch of spaces (how many is the right amount etc) doesn't *seem* like a good answer.
2) How can I print the results of a cell in a color .. say red if it is negative.
I have looked in the book for these and as for color it *seems* that there is no way to do this cell by cell .. i hope I just missed it
I will cross post this to the other group in case tony has any ideas ..
thanks
[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 503-639-4240
At 18 JUN 2002 11:56AM Tony Splaver wrote:
Hi David,
1) You can control the height of the cells by inserting extra CRLFs, and you can also adjust the vertical alignment too (_ and + settings) (see my example below). You can also embed tabs to pad on the left of right.
2) The only way to control font properties within a cell is to use RTF (see my example below). RTF reference at http://msdn.microsoft.com/library/?url=/library/en-us/dnrtfspec/html/rtfspec.asp?frame=true.
Function oipi_test_table7(d)
Declare Function Set_Printer
x=Set_Printer("INIT", "", "", "", "", 4)
header=Date,Amount"
* Use CRLF to pad an extra line above and below the cell text
table=1/1/2001,1.23|2/2/2002,":Char(13):Char(10):"-2.44":Char(13):Char(10)
convert "|" to @FM in table
convert "," to @VM in table
convert "," to @VM in header
Stat=Set_Printer("ADDTABLE", "1440", header, table, "", "", "", 7)
* This is the raw RTF codes copied from a Word doc saved as RTF.
rtf={\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}}"
rtf=rtf : "{\colortbl ;\red255\green0\blue0;} \viewkind4\uc1\trowd\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 "
rtf=rtf : "\trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs "
rtf=rtf : "\cellx1332\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx2772\pard\intbl\f0\fs24 Date\cell Amount\cell\row "
rtf=rtf : "\intbl 1/1/2001\cell 1.23\cell\row \intbl 2/2/2002\cell\cf1 -2.44\cell\cf0\row \pard \par }"
x=Set_Printer("TEXT", @FM)
x=Set_Printer("TEXTRTF", rtf)
x=Set_Printer("TERM", 1)
Return 1
Tony
At 18 JUN 2002 12:09PM [email protected] wrote:
Tony,
Thanks for the reply.
I have tried enablertf and the sample from the help file and got a printout with the codes all included .. no change to printout.
Oystein did try the example for me and assures me that even though it did not have a enablertf (which I included) it did work.
So I will check the version and try to figure out what was going on
Thanks
[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 503-639-4240
At 18 JUN 2002 03:42PM Tony Splaver wrote:
David,
Don't forget to call Set_Printer("START32") first to enable the OIPI32. The ENABLERTF is not needed if you are using TEXTRTF, and it will slow down the printing/rendering process. I would also check the version of the VSVIEW OCX control to make sure it is the latest.
Tony
At 18 JUN 2002 11:08PM [email protected] wrote:
ts]Don't forget to call Set_Printer("START32") first to enable the OIPI32.
Yep .. couldn't do the other stuff without it. I am right is thinking that you only have to do the start32 once .. right?
ts]The ENABLERTF is not needed if you are using TEXTRTF, and it will slow down the printing/rendering process.
I was just trying the example from the help … it does not work on this system.
ts]I would also check the version of the VSVIEW OCX control to make sure it is the latest.
I tried get_printer("Version") and got nothing in return .. i then d-click on oipi.exe and got Version: 4.10 Professional revision: 4.10.0028
Don't know if this is the latest but I believe it is.
Oystein tried the help code and it worked. He also sent some test code and it works IF i do a debug. If I don't do the debug i get error -4
Not sure why this behaving this way
[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 503-639-4240
At 18 JUN 2002 11:35PM [email protected] wrote:
Tony,
I tried your sample code .. and it worked as advertised. The example in the help file still doesn't work.
I also tried some code from Oystein on the other side .. his code only works if there is a debug in the code. Else I get nothing .. except an error -4 and then a -999. WIth the debug after the f5 the printing works correctly.
ts] (sample code snippet)
* This is the raw RTF codes copied from a Word doc saved as RTF.
rtf={\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}}"
rtf=rtf : "{\colortbl ;\red255\green0\blue0;} \viewkind4\uc1\trowd\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 "
rtf=rtf : "\trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs "
rtf=rtf : "\cellx1332\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx2772\pard\intbl\f0\fs24 Date\cell Amount\cell\row "
rtf=rtf : "\intbl 1/1/2001\cell 1.23\cell\row \intbl 2/2/2002\cell\cf1 -2.44\cell\cf0\row \pard \par }"
.. oh my .. this makes writing a system easier
Not sure why i get inconsistent results .. but will try to find a pattern.
[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 503-639-4240
At 19 JUN 2002 05:58PM Matthew Crozier wrote:
David,
only works if there is a debug in the code
What happens if you put in a Delay(t) call instead of a breakpoint? Maybe experiment with the value for t.
M@