Problems printing a field copied from a datagrid [SOLVED]

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
karmacomposer
Posts: 355
Joined: Wed Apr 27, 2011 2:12 pm

Problems printing a field copied from a datagrid [SOLVED]

Post by karmacomposer » Wed Sep 10, 2014 4:54 am

I have a weird problem that perhaps someone can help me solve.

I have a perfectly working datagrid and I can load in data to all columns

I created a print button and a save button.

The save button, which works 100%, I copy the highlighted datagrid data to a hidden table field and then save that data.

So far so good.

Same routine with the print button, when it prints (using the code: revPrintField the name of field "fldPrintText") it prints,
but ALL the text prints with a black background. I am assuming that it is printing the blue highlight of the datagrid, which is
visual feedback to the user for what is selected (but not printing as blue, it's printing it as black).

I have tried defining the table field with a white background, black text, opaque, etc. in the inspector and it still prints black on black.

Very annoying and very not useable. If I choose to print to a pdf using a pdf print driver, I get the same result (which is good because I
don't waste so much ink).

How can I change the text background to white and the font color to black so it prints properly and reliably?

Mike
Last edited by karmacomposer on Mon Sep 15, 2014 8:04 pm, edited 1 time in total.

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: Problems printing a field copied from a datagrid

Post by keram » Wed Sep 10, 2014 5:20 am

Hi Mike,

Try this:
DG properties.png
In the DG properties under the Colors & Patterns chose:
Hilited Text - black
Background - white
Alternate rows - white
Selection hilites - white

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

karmacomposer
Posts: 355
Joined: Wed Apr 27, 2011 2:12 pm

Re: Problems printing a field copied from a datagrid

Post by karmacomposer » Wed Sep 10, 2014 6:01 am

That did not work.

I don't think it's the datagrid, per se. I think it's the grabbing of all the column data from the datagrid and putting the highlighted rows into the table field.

I just don't know how to strip out the formatting of the text and make a print-ready version?

Mike

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5607
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Problems printing a field copied from a datagrid

Post by jacque » Wed Sep 10, 2014 4:18 pm

You are printing the field, not the datagrid, so set the colors of the field. In particular, set the background color to white and the opaque to true.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Klaus
Posts: 12008
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Problems printing a field copied from a datagrid

Post by Klaus » Thu Sep 11, 2014 1:46 pm

Hi friends,

we sorted this out and it looks like an evil (hardly reproducable :-/ ) bug.

There is definitively a printing problem if you have showlines and or GRID activated for a field.
In Mikes case it was the fact, that he checked TABLE FIELD for his printing field and that also showed this bug.

See attachment, all fields on the card are copies of the field in the top left corner!
In the printout we have nice black bars, just like we know from TOP SECRET FBI/CIA files :D

For some fields I unchecked "showlines" and that solved the problem!


Best

Klaus
Attachments
print_showlines.jpg

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Re: Problems printing a field copied from a datagrid [SOLVED

Post by gmccarthy » Mon Jul 13, 2015 2:15 am

Has the printing of black areas (when vertical and horizontal lines are shown in a table field) been reported or fixed.
I am still experiencing this problem in livecode 7.0.6
Having to turn off the showlines is a temporary workaround, but I really need the lines in the printout.
gmcrev

galina
Posts: 14
Joined: Sun Dec 14, 2014 6:16 pm

Re: Problems printing a field copied from a datagrid [SOLVED

Post by galina » Fri Oct 21, 2016 9:40 pm

Hi!
Seems to me this bug is not fixed yet! I see how long ago this message has been posted. I have developed an app on OS X 10.11.6 but now I adjust it to Windows 10. Everything is more or less ok, but a few forms which are using the "Basic Table Field" look like on the picture of this post.
The fields are filled up with the data from MySQL query, there is nothing to do with the DG.
I am using LiveCode Community 7.1.4 and I don't want to switch to 8.*.* version - no time for this now, I have to finish my project.
Can someone suggest me something, please? :)
Thanks,
Galina

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Re: Problems printing a field with grid lines

Post by gmccarthy » Sun Dec 18, 2016 8:57 pm

I submitted a bug report at http://quality.livecode.com/show_bug.cgi?id=19016
v or h grid lines causes the bug.
A table is filled in with black when printed.
Curiously, printing to pdf is normal, although printing to the adobe pdf printer causes the same issue.
gmcrev

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”