Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Never print the last line!!!
Message
From
26/01/1997 10:08:53
F Joseph
Xinjiang Electric Power Company
Urumqi, China
 
 
To
26/01/1997 02:35:15
Kevin Wang
Ministry of Water Resources
Beijing, China
General information
Forum:
Visual FoxPro
Category:
User groups
Miscellaneous
Thread ID:
00018383
Message ID:
00018425
Views:
35
> Thank you! I create a button named 'Print' and put my program into its' > click event. I run the form and click the button but the printer print > nothing, until I click the button again the printer begin to print it and > finish it successful with two copies of my table. > So, if I want to print my table I must run my print program twice and it > print two copies of my table. I only want it print one copy of my table > with click the 'Print' button ONCE! not twice!!! can you help me? > > Thanks in avidance > > > kevin > Dear Kevin, give me your click code , I will try it. joseph (net0040@public.wl.xj.cn) > > > > > > > > > > >
> >>My eviroment is VFP3.0. I use an program file(.prg) to
> >>finish my printing work. the whole file is here:
> >>
> >>*******  BEGIN  *************
> >>SET COMPATIBLE OFF
> >>SET DEVICE TO PRINTER
> >>SET PRINTER TO LPT1
> >>??? CHR(27)+CHR(48)
> >>??? CHR(27)+CHR(67)+CHR(68)
> >>??? chr(27)+chr(14)
> >>
> >>IF !USED(sq_bq)
> >>  USE sq_bq
> >> ELSE
> >>  select sq_bq
> >>ENDIF
> >>
> >>max_line_NUM=20
> >>page_no=1
> >>go top
> >>do while .not.eof()
> >>    line_no=6
> >>        @2,0  say                "

>   ·ç  ±©  ³±  ±í"
> >>        @4,0  say
>
"©°©¤©¤©¤©¤©Ð©¤©¤©¤©¤©Ð©¤©¤©¤©¤©Ð©¤©¤©¤©Ð©¤©¤©¤©Ð©¤©¤©¤©¤©¤©¤©Ð©¤©¤©¤©Ð©¤©¤©


> ¤©Ð©¤©¤©¤©¤©Ð©¤©¤©¤©¤©´"
> >>        @5,0  say                "©¦ Õ¾  ºÅ ©¦ Õ¾  Ãû ©¦ ºÓ  Ãû ©¦  Ê¡

> ©¦µØ¡¢ÊЩ¦  ʱ    ¼ä  ©¦ ³±Î» ©¦ Æøѹ ©¦ÈÕ¾ù¸ß³±©¦ÈÕ¾ùµÍ³±©¦"
> >>    do while line_no<=2*max_line_num+5)
> >>        if eof()
> >>            @line_no,0   say
>
"©À©¤©¤©¤©¤©à©¤©¤©¤©¤©à©¤©¤©¤©¤©à©¤©¤©¤©à©¤©¤©¤©à©¤©¤©¤©¤©¤©¤©à©¤©¤©¤©à©¤©¤©


> ¤©à©¤©¤©¤©¤©à©¤©¤©¤©¤©È"
> >>            @line_no+1,0 say     "©¦        ©¦        ©¦        ©¦

> ©¦      ©¦            ©¦      ©¦      ©¦        ©¦        ©¦"
> >>        else
> >>            @line_no,0 say
>
"©À©¤©¤©¤©¤©à©¤©¤©¤©¤©à©¤©¤©¤©¤©à©¤©¤©¤©à©¤©¤©¤©à©¤©¤©¤©¤©¤©¤©à©¤©¤©¤©à©¤©¤©


> ¤©à©¤©¤©¤©¤©à©¤©¤©¤©¤©È"
> >>            @line_no+1,0 say     "©¦"+stcd+"©¦" +zm+ "©¦" +hl+
> "©¦"+sm+"©¦"+dd+"©¦"
>
+ymdhm+"©¦"+str(zt,6,3)+"©¦"+str(p,6)+"©¦"+str(dayhz,8,3)+"©¦"+str(daylz,8,3


> )+"©¦"
> >>        endif
> >>        line_no=line_no+2
> >>        if .not.eof()
> >>            skip
> >>        endif
> >>    enddo
> >>    @line_no,0 say
>
"©¸©¤©¤©¤©¤©Ø©¤©¤©¤©¤©Ø©¤©¤©¤©¤©Ø©¤©¤©¤©Ø©¤©¤©¤©Ø©¤©¤©¤©¤©¤©¤©Ø©¤©¤©¤©Ø©¤©¤©


> ¤©Ø©¤©¤©¤©¤©Ø©¤©¤©¤©¤©¼"
> >>    @line_no+1,60 say "µÚ"+str(page_no,2)+"Ò³"
> >>    page_no=page_no+1
> >>    eject page
> >>enddo
> >>??? CHR(27)+CHR(64)
> >>SET DEVICE TO SCREEN
> >>SET COMPATIBLE ON
> >>CLEAR
> >>RETURN
> >>***************  THE END   ********************
> >>
> >>When I run the program, the printer begin to print the table,but it never > print the last line and the page number of the last page. So the report is > not entire! I don't know how to solve the problem. > >> wait your help. >
--------------------------------------------------------------------
Best regards,
f.joseph
xinjiang electric power company
Tele : 86-0991-2920415
E-Mail : net0040@public.wl.xj.cn
mail address: jian she lu st. 10
urumqi,xinjiang province,republic of china
zip: 830002
--------------------------------------------------------------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform