TOPIC: Report: GridFormat printing troubles...
#502
Report: GridFormat printing troubles... 3 Years, 8 Months ago
Hi, I had problems in printing elements inside a GridFormat...
Let's take this example from User's Manual:

Code:

Params.On_Preview(#(Grid (
    ((Text hello) (Image 'windowsbubbles.bmp') (Text)) 
    ((Number 123) (ShortDate #20010909) (Text text))
    ((Text g font: (name: Arial size: 20)) (Text g font: (name: Arial size: 40)) (Text))
    ), border: 1))



In the preview it is all right, but in the paper printed out from a printer there is something wrong... Many horizontal and vertical lines are missing. It is the same thing when you print out to a PDF virtual print: some lines are missing.

Then I tried to do a search in the old forum and I have discovered this post from September 2005: 64.27.116.78/forum/topic.asp?TOPIC_ID=1648

In this post the user 'poematrix' had the same problem of mine and it was resolved by this mod in the GridFormat code (line 102) from 'Joshua' user:

Code:

item.Print(x + .lead/2 + 2, yi + .lead/2 + 2, width, height)


It appears to resolve the problem, but why this mod (that is very important to anyone use the GridControl with borders) was not included in the next Suneido releases?
 
 
Mauro
 
#518
Re:Report: GridFormat printing troubles... 3 Years, 7 Months ago
I am not sure why this fix did not get added to stdlib - sorry about that.

In the latest code we have:

Code:

item.Print(x + .border, yi, width, height)


I assume this was to fix similar problems, although it only handles x, not y.

Joshua's fix looks better. I will test.

Post edited by: andrew, at: 2007/01/02 22:39
 
 
andrew
 
#533
Re:Report: GridFormat printing troubles... 3 Years, 7 Months ago
I was not sure what the "+ 2" was for so I left it out:

Code:

item.Print(x + .lead / 2, yi + .lead / 2, width, height)


Let me know if this works for you. There are still potential problems if border > lead.
 
 
andrew
 
#535
Re:Report: GridFormat printing troubles... 3 Years, 7 Months ago
I don't know what is it for that "+ 2". I have tried to print with & without the "+ 2" (using Adobe PDF virtual printer): with it the objects inside the grid are slightly moved down and to the right, so maybe it's better without the "+ 2".

Post edited by: Mauro, at: 2007/01/05 18:27
 
 
Mauro