dBASE Programming - Form.print()

This is Interesting: Free IT Magazines  
Home > Archive > dBASE Programming > June 2007 > Form.print()





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Form.print()
evilaro

2007-05-28, 7:16 am

To all:

I have a form, and I have put only one
button, if I click it does Form.Print()

Besides printing the button, it also prints a blue line
at the bottom of the page (if it is landscape or at the
right if portrait.)

Anybody knows what is this line and how to get rid of it ??


Thanks

Emilio


Mervyn Bick

2007-05-28, 7:16 am

On Mon, 28 May 2007 12:45:56 +0200, evilaro <"buzon[NO]"@evilfoto.es>
wrote:

> To all:
>
> I have a form, and I have put only one
> button, if I click it does Form.Print()
>
> Besides printing the button, it also prints a blue line
> at the bottom of the page (if it is landscape or at the
> right if portrait.)
>
> Anybody knows what is this line and how to get rid of it ??


Setting the button's printable property is supposed to prevent it being
printed but this doesn't work on my copy. (V 2.6.0.1) but setting its
visible property false before the form.print() and then setting it true
after does the trick although there is a flicker on the screen.

The blue line is visible on the screen as well and it is there to give the
form an apperance of thickness. I have no idea of how to get rid of it!

Mervyn.




evilaro

2007-05-28, 1:17 pm

Mervyn:

No problem on the button, I can just send it to -300000
or make it invisible, but the blue line.... I do not see
it on the screen, only on the printed paper ????

If you see it .... what is it ??

Thanks

Emilio


"Mervyn Bick" <invalid@invalid.invalid> escribió en el mensaje
news:op.ts1ao5m8380wm4@mervyn1...
> On Mon, 28 May 2007 12:45:56 +0200, evilaro <"buzon[NO]"@evilfoto.es>
> wrote:
>
>
> Setting the button's printable property is supposed to prevent it being
> printed but this doesn't work on my copy. (V 2.6.0.1) but setting its
> visible property false before the form.print() and then setting it true
> after does the trick although there is a flicker on the screen.
>
> The blue line is visible on the screen as well and it is there to give the
> form an apperance of thickness. I have no idea of how to get rid of it!
>
> Mervyn.
>
>
>
>



Mervyn Bick

2007-05-28, 1:17 pm

On Mon, 28 May 2007 16:21:39 +0200, evilaro <"buzon[NO]"@evilfoto.es>
wrote:

> Mervyn:
>
> No problem on the button, I can just send it to -300000
> or make it invisible, but the blue line.... I do not see
> it on the screen, only on the printed paper ????
>
> If you see it .... what is it ??


Emilio

Here is a screenshot of a form I made the other day to illustrate a
problem I was having and the blue line to the right and at the bottom is
clearly visible. I think it is there to represent the shadow the form
would cast if it had "body".

http://img.photobucket.com/albums/v...n/Blue_line.jpg

Mervyn.

evilaro

2007-05-28, 1:17 pm

Mervyn:


I see a small form....

But no blue line ???

Emilio



"Mervyn Bick" <invalid@invalid.invalid> escribió en el mensaje
news:op.ts1ka80k380wm4@mervyn1...
> On Mon, 28 May 2007 16:21:39 +0200, evilaro <"buzon[NO]"@evilfoto.es>
> wrote:
>
>
> Emilio
>
> Here is a screenshot of a form I made the other day to illustrate a
> problem I was having and the blue line to the right and at the bottom is
> clearly visible. I think it is there to represent the shadow the form
> would cast if it had "body".
>
> http://img.photobucket.com/albums/v...n/Blue_line.jpg
>
> Mervyn.
>



Mervyn Bick

2007-05-29, 1:18 pm

On Mon, 28 May 2007 17:35:05 +0200, evilaro <"buzon[NO]"@evilfoto.es>
wrote:

> Mervyn:
>
>
> I see a small form....
>
> But no blue line ???


As some of us get older the eyesight gets worse. <g> It's not a blue line
but a black line. The following was scanned from a printed form.

http://img.photobucket.com/albums/v...ormoutline1.jpg

Mervyn.
evilaro

2007-05-29, 1:18 pm

Mervyn:

I feel I did not made myself understood...
Lets say I put a button on a form
and do the form.print()

Theoretically I should get the button ... which is what I want
but no more .. but I get a blue line on the bottom


---------------------------------------- /// paper a4

[ button ]




------------------------------------ // blue linethat shows at the botton
of a A4 sheet
---------------------------------------- /// paper a4

Does it happends to you ??

Emilio



"Mervyn Bick" <invalid@invalid.invalid> escribió en el mensaje
news:op.ts291bx2380wm4@mervyn1...
> On Mon, 28 May 2007 17:35:05 +0200, evilaro <"buzon[NO]"@evilfoto.es>
> wrote:
>
>
> As some of us get older the eyesight gets worse. <g> It's not a blue line
> but a black line. The following was scanned from a printed form.
>
> http://img.photobucket.com/albums/v...ormoutline1.jpg
>
> Mervyn.



Mervyn Bick

2007-05-29, 1:18 pm

On Tue, 29 May 2007 17:22:39 +0200, evilaro <"buzon[NO]"@evilfoto.es>
wrote:

> Mervyn:
>
> I feel I did not made myself understood...
> Lets say I put a button on a form
> and do the form.print()
>
> Theoretically I should get the button ... which is what I want
> but no more .. but I get a blue line on the bottom
>
>
> ---------------------------------------- /// paper a4
>
> [ button ]
>
>
>
>
> ------------------------------------ // blue linethat shows at the
> botton
> of a A4 sheet
> ---------------------------------------- /// paper a4
>
> Does it happends to you ??


No. Here is the full A4 sheet scanned in.

http://img.photobucket.com/albums/v...printedform.jpg

Mervyn.
evilaro

2007-05-29, 1:18 pm

Mervyn:

You do not get the line ... but you get the form.... I only need
the button..

This form has only one button and this is the only thing it should
show ...

I get the button and at the bottom a blue line

What do you get?.

Thanks for the patience
Emilio


** END HEADER -- do not remove this line
//
// Generated on 2007/05/28
//
parameter bModal
local f
f = new gggggForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class gggggForm of FORM
with (this)
onOpen = class::FORM_ONOPEN
metric = 6 // Pixels
colorNormal = "white"
height = 1183.0
left = -101.0
top = 98.0
width = 1928.0
text = ""
topMost = true
windowState = 2 // Maximized
showTaskBarButton = false
sizeable = false
moveable = false
minimize = false
enabled = true
endwith

this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
printable = false
height = 44.0
left = 56.0
top = 715.0
width = 84.0
text = "Pushbutton1"
endwith


function form_onOpen
form.windowstate=2
return

function PUSHBUTTON1_onClick
form.print()
return

endclass



Mervyn Bick

2007-05-29, 1:18 pm

On Tue, 29 May 2007 18:08:38 +0200, evilaro <"buzon[NO]"@evilfoto.es>
wrote:

> Mervyn:
>
> You do not get the line ... but you get the form.... I only need
> the button..
>
> This form has only one button and this is the only thing it should
> show ...
>
> I get the button and at the bottom a blue line
>
> What do you get?.



The scanned A4 sheet.

http://img.photobucket.com/albums/v...rintedform2.jpg

We obviously have different screen resolutins set as I couldn't see the
button at all until I clicked on the resize button.

dBASE v 2.6.0.1 XP Pro SP2 Screen resolution 1024 X 768
HP 935C

Mervyn.
evilaro

2007-05-29, 7:17 pm

Mervyn:

Yes.... 1920 x1200 grrrrrrrrrrrrrrrrr
Sorry to put sooo low the button.

Well I feel you are getting the bars which I do not get
It could be the blue line part of the borders of the form...
I really do not know how to get rid of everything but
what I want.... in this example th button.

Thanks ... for the effors.

Emilio


>
> The scanned A4 sheet.
>
> http://img.photobucket.com/albums/v...rintedform2.jpg
>
> We obviously have different screen resolutins set as I couldn't see the
> button at all until I clicked on the resize button.
>
> dBASE v 2.6.0.1 XP Pro SP2 Screen resolution 1024 X 768
> HP 935C
>
> Mervyn.



Mervyn Bick

2007-05-30, 1:20 pm

On Tue, 29 May 2007 18:08:38 +0200, evilaro <"buzon[NO]"@evilfoto.es> =

wrote:

> Mervyn:
>
> You do not get the line ... but you get the form.... I only need
> the button..
>
> This form has only one button and this is the only thing it should
> show ...
>
> I get the button and at the bottom a blue line
>
> What do you get?.


I rebuilt the form from scratch so that the button would appear on scree=
n =

without having to resize the form. Bingo! The scanned A4 is at the UR=
L =

below with no blue lines, no scroll bars - nada except the button.

http://img.photobucket.com/albums/v...rintedform3.jpg

The form I used is below and, except for the dimensions, is identical to=
=

yours.

Mervyn.


** END HEADER -- do not remove this line
//
// Generated on 2007/05/30
//
parameter bModal
local f
f =3D new _z5Form()
if (bModal)
f.mdi =3D false // ensure not MDI
f.readModal()
else
f.open()
endif

class _z5Form of FORM
with (this)
metric =3D 6 // Pixels
colorNormal =3D "white"
height =3D 680.0
left =3D 319.0
top =3D 164.0
width =3D 1032.0
text =3D ""
clientEdge =3D false
topMost =3D true
windowState =3D 2 // Maximized
mdi =3D true
showTaskBarButton =3D false
sizeable =3D false
moveable =3D false
sysMenu =3D false
minimize =3D false
enabled =3D true
endwith

this.PUSHBUTTON1 =3D new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick =3D class::PUSHBUTTON1_ONCLICK
height =3D 25.0
left =3D 74.0
top =3D 81.0
width =3D 106.0
text =3D "Pushbutton1"
endwith


function PUSHBUTTON1_onClick
form.print()
return

endclass



evilaro

2007-05-30, 1:20 pm

Mervyn:

Sorry... still I get the line...
Either printing it in landscape or portrait
This is with a inkjet

I have tried a laserjet and the problem is the same.

Since when I used dB2k the line has not
appeared ....
I have printed YOUR form with db2k
and the line DOES NOT show up...
in either printer.

So I feel it must be a problem with this
latest version 2.6.1.3 b2059

Is there anybody that could confirm
if this form prints a line at the bottom
using version 2.6.1.3 b2059 ????

Thanks

Emilio



"Mervyn Bick" <invalid@invalid.invalid> escribió en el mensaje
news:op.ts4315sy380wm4@mervyn1...
On Tue, 29 May 2007 18:08:38 +0200, evilaro <"buzon[NO]"@evilfoto.es>
wrote:

> Mervyn:
>
> You do not get the line ... but you get the form.... I only need
> the button..
>
> This form has only one button and this is the only thing it should
> show ...
>
> I get the button and at the bottom a blue line
>
> What do you get?.


I rebuilt the form from scratch so that the button would appear on screen
without having to resize the form. Bingo! The scanned A4 is at the URL
below with no blue lines, no scroll bars - nada except the button.

http://img.photobucket.com/albums/v...rintedform3.jpg

The form I used is below and, except for the dimensions, is identical to
yours.

Mervyn.


** END HEADER -- do not remove this line
//
// Generated on 2007/05/30
//
parameter bModal
local f
f = new _z5Form()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class _z5Form of FORM
with (this)
metric = 6 // Pixels
colorNormal = "white"
height = 680.0
left = 319.0
top = 164.0
width = 1032.0
text = ""
clientEdge = false
topMost = true
windowState = 2 // Maximized
mdi = true
showTaskBarButton = false
sizeable = false
moveable = false
sysMenu = false
minimize = false
enabled = true
endwith

this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 25.0
left = 74.0
top = 81.0
width = 106.0
text = "Pushbutton1"
endwith


function PUSHBUTTON1_onClick
form.print()
return

endclass




Ken Mayer [dBVIPS]

2007-05-30, 7:17 pm

evilaro wrote:
> Mervyn:
>
> Sorry... still I get the line...
> Either printing it in landscape or portrait
> This is with a inkjet


Y'know, there just comes a time when maybe you should create a report. I
have written a whole book about doing reports in dBASE, in case you
missed it. <g>

The dBASE form was never meant to be used for printing reports, the
print ability was original assumed to be used by developers to get
"screen shots" ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/dbase/dBASEReportsBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Ron Watters

2007-05-31, 1:17 am

Ken Mayer [dBVIPS] wrote:

> Y'know, there just comes a time when maybe you should create a report. I
> have written a whole book about doing reports in dBASE, in case you
> missed it. <g>
>
> The dBASE form was never meant to be used for printing reports, the
> print ability was original assumed to be used by developers to get
> "screen shots" ...


I actually do quite well with Form.Print(). I'm able to print some very
complex multi-page invoices, billing statements and reports that include
graphics.

True, my use of it is the result of growing up with earlier versions of
dBase which did not have built-in report functions, but its importance
remains. It enables folks like me to retain hundreds of lines of
debugged and well tested code. And it gives programmers a viable
alternative should they need it. As we all know, in this business, good
programming software provides more than one way of doing things.

That being said, I intend to pick up your new report book. There's no
doubt that I will be using it extensively -- as I have your first fine work.

Ron Watters
Idaho State University

evilaro

2007-05-31, 7:17 am


Ken:

> Y'know, there just comes a time when maybe you should create a report. I
> have written a whole book about doing reports in dBASE, in case you
> missed it. <g>


No I do not miss important things ;)

I wonder if the reports will allo me to put a activex on it?

Emilio



Ken Mayer [dBVIPS]

2007-05-31, 1:17 pm

evilaro wrote:
> Ken:
>
>
>
>
> No I do not miss important things ;)
>
> I wonder if the reports will allo me to put a activex on it?


At this time, only on the PageTemplate, sadly enough. I spent some time
awhile back documenting that for R&D.

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/dbase/dBASEReportsBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
evilaro

2007-06-03, 1:17 pm

Ken:

Thank you very much for opening my eyes regarding
the reports.

I just did a small one and I have already integrated it to
my application. It is much better than Form.Print()
although not as easy ;)

But.... there are always buts...
But I wil put the buts in another message ;)

Emilio






"Ken Mayer [dBVIPS]" <dbase@_nospam_goldenstag.net> escribió en el mensaje
news:e186eP4oHHA.1848@news-server...
> evilaro wrote:
>
> At this time, only on the PageTemplate, sadly enough. I spent some time
> awhile back documenting that for R&D.
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/dbase/dBASEReportsBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com