http://forums.livecode.com/viewtopic.ph ... er#p161392
This issue is also related to bug # 20770.
Maybe this will add a little more information to the known problem. But until the problem is resolved I would like a work around. The work around listed in the forum post did not work for me.
Here is my story.
I have two different stack files that function very similarly. The software creates a list of items used to build something then prints the list to pdf. The part I am interested in is printing.
Here is the section of code that is causing problems.
Code: Select all
open stack "PRT2" go cd 1 of stack "PRT2" put TBL1 into fld "f1" put TBL2 into fld "f2" put GT into fld "grndtot" put LT into fld "info" set printScale to .85 set printMargins to 36,36,36,36 open printing set the height of stack "PRT2" to 900 set the height of fld "f2" of card 1 of stack "PRT2" to 578 print card close printing close stack "PRT2"
What it actually does is create a card that looks "blacked out" when printed. See attachment "bad report".
So, I went looking for differences between the stack that works and the one that does not, that sort of thing.
I looked at the stack file that was working and found a difference so I changed it. The last line "close stack "PRT2"" was changed to "pop cd".
This created a mess. The script debugger stopped in a livecode stack called "revStartCenter" at the line before the "else" which sets the backgroundColor with this error: "button "Behavior Script": execution error at line 50 (Function: error in function handler) near "uiColor", char 64"
Code: Select all
setprop dgHilite pBoolean -- Example: if pBoolean then set the foregroundColor of widget "icon" of me to 255,255,255 set the textColor of field "stackLabel" of me to 255,255,255 set the textColor of field "stackPath" of me to 255,255,255 set the backgroundColor of graphic "background" of me to uiColor("edition") else set the foregroundColor of widget "icon" of me to uiColor("edition") set the textColor of field "stackLabel" of me to empty set the textColor of field "stackPath" of me to uiColor("mid grey") set the backgroundColor of graphic "background" of me to uiColor("recentFilesBackground") end if end dgHilite
But this DOES NOT MAKE SENSE because I have no idea WHY revStartCenter is failing.
I have added "on openstack" to the PRT2 stack as mentioned in the forum discussion noted at the beginning but that did not work for me.
The card that is being printed is good. The pdf is bad.
So, what can I do to get this report to print nicely?