Print Preview

This forum is for eXpress++ general support.
Message
Author
Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Print Preview

#1 Post by Victorio »

Hi,
I have several problems with printing, then my questions :

1. If I print report (database table or other source) to file with DCPRINT ON OUTFILE &myfile TEXTONLY, and next I use DC_PRINTFILE, Preview show spaces as dots (underline) , Why ?
In text file is spaces, this only Preview make, and If I print this file from preview, also dots

2. Where I can set rows for Preview ? My text file has good position for EJECT on 66row, but Preview show next page on 62 row. It look as Preview has own row, col parameters but not identic with generating print file

3. How can I more efective generating print reports ? In old CLipper program I have SET PRINTER TO File...
TEXT
fjdsjflkdjfljsdl
fsdjfjsdlk
ENDTEXT

now I have
DCPRINT ? dhsakhdksahk
DCPRINT ? dsljdlasjl

but for generating to OUTFILE it works only in TEXTONLY mode.

Has eXpress . Xbase some print report generator ? (to design frm files) ?

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Print Preview

#2 Post by rdonnay »

OUTFILE does not only work with TEXTONLY.

If you don't use the TEXTONLY clause the OUTFILE will contain all the codes that would be sent to the printer.

Example:

DCPRINT ON OUTFILE 'printjob.prn'

Copy printjob.prn \\mycomputer\myprinter

To better understand your problem, show me what your Clipper printout looks like and what your eXpress++ printout looks like.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Print Preview

#3 Post by Victorio »

Here is source ,and attach how look reports, one with set to oem, second ansi, and third how look in notepad view
I am try many combinations, but once is good our country letters, but dots, or bad country letters and without dots. and too is little problem with dialogs (DC_Langset SLOVAK).
Look at this please, I am sure, it is my mistake, :oops:

FUNCTION tic

LOCAL oPrinter,aOptions,cDialog,nChoice
LOCAL ccp,pgp,phla,spg

* file to output print report
ntsp="TIC.TXT"
answtlac=asktlac(ntsp,"SÚPIS C-PARCIEL",1)
nts=cestatlac+ntsp

DCPRINT ON OUTFILE &nts TEXTONLY

*... some row, page counters, date time headers

DCPRINT ? den+", "+cas+space(50)+"Strana "+spg
DCPRINT ? "********************************************************************************"
DCPRINT ? "* INFOKAT - SÚPIS PARCIEL REGISTRA C EVIDOVANÝCH NA KATASTRÁLNEJ MAPE *"
DCPRINT ? "********************************************************************************"
DCPRINT ? "* Katastrálne územie "+nazku+" - "+cku+"aác蚊ŤŽÝČ"
DCPRINT ? "********************************************************************************"
DCPRINT ?"| Parcela | Výmera | Druh pozemku |Um.p.|Čís.LV |Čís.EL | Súp.č. |"
DCPRINT ? "------------------------------------------------------------------------------"

* reading from database table
t1=CPAU
t2=str(KN_VYM)
t3=zistidrp(KN_DRP,1)
*...

* print table fields
DCPRINT ? " "+t1+" "+t2+" "+t3+" "+t4+" "+t5+" "+t6+" "+t7

DCPRINT EJECT

DCPRINT OFF

SET CHARSET TO OEM

* if only preview
if answtlac=1
DCPRINT OPTIONS TO aOptions FONT "10.Arial CE" ;
FONTBUTTON FINDBUTTON PREVIEW HIDE ;
BUSYMESSAGE "Generujem tlačovú zostavu" ;
SIZE 66,80 NOSTOP NOPRINTBUTTON
DC_PRINTFILE(nts,.T.,nil,aOptions)
* if only to file
elseif answtlac=2
* only info, because file was generated
nChoice:=DC_ALERT( "Textový súbor je už vytvorený",{'OK'})
* if preview and print to printer
elseif answtlac=3
DCPRINT OPTIONS HIDE BUSYMESSAGE "Generujem tlačovú zostavu" ;
SIZE 66,80 NOSTOP FONTBUTTON ;
FINDBUTTON to aOptions
* druhý parameter je font, default je 8.Courier NEW
DC_PRINTFILE(nts,.T.,nil,aOptions)
endif

* back charset because my menu is in ANSII coding ..
SET CHARSET TO ANSI

return(1)
Attachments
in notepad.jpg
in notepad.jpg (261.91 KiB) Viewed 13622 times
if OEM and FIXED.jpg
if OEM and FIXED.jpg (303.43 KiB) Viewed 13622 times
if ANSI and FIXED.jpg
if ANSI and FIXED.jpg (429.8 KiB) Viewed 13622 times

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Print Preview

#4 Post by rdonnay »

I need something that I can compile and run.

You have calls to functions that are not in the sample.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Print Preview

#5 Post by Victorio »

OK, I am sorry, I send only part of one function.
But I work on this to this time, and now it is OK. Problem was only with OEM/ANSI .
If I set in Alaska Xbase++ Workbench parameter for project Set character conversion to Ansti to Oem, and in program insert SET CHARSET TO OEM, everything is good, dialogs in preview, preview report, printed report on printer and too menus.
Little problem is with collation on indexes, because two characters is on top (Ž and Ť) and mus be on bottom,

But still problem with printing report from preview, mixing pages. I must make scan from paper , because in file and screen it look ok.
If I listing in preview, (file is created with DCPRINT ON OUTFILE &nts TEXTONLY), and click to Printer, select pages from 1 to any number fox example 5, then pages 1,2,3 printed ok, but 4 is printed as mix 3 and 4 to one page, and another 5 page is again ok.
Sometimes it is on page 4, other on page 6...


This works on HP LJ 3010 printer, but now I examine it on my home old HP LJ1200, here it is ok, but anoter side some country characters is bad, so, this is my problem, must control setting printer and any other things.

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Print Preview

#6 Post by rdonnay »

You may want to rewrite some of your reports using features of Xbase++ which were not in Clipper.

I recommend looking at \exp19\samples\printer\invoice.prg.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Print Preview

#7 Post by skiman »

If I listing in preview, (file is created with DCPRINT ON OUTFILE &nts TEXTONLY), and click to Printer, select pages from 1 to any number fox example 5, then pages 1,2,3 printed ok, but 4 is printed as mix 3 and 4 to one page, and another 5 page is again ok.
Sometimes it is on page 4, other on page 6...
This is something that is also sometimes reported by users. It is not frequently, but it happens. In the preview everything is fine and correct, when printing it looks as sometime a 'page eject' is not executed and there are two pages printed above each other.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Print Preview

#8 Post by rdonnay »

I have always admitted that the previewer is the weakest feature of the eXpress++ print system. It would have taken a lot of time to rewrite it and I wasn't sure that Xbase++ was powerful enough in the early days. Therefore I chose a different path and decided that win2pdf, bullzip, and XPS writer were a better solution. I have a customer with 350 workstations and they use the Microsoft XP'S writer, which is free, for all print previews.

If you can give me a sample that demonstrates your problem I will work on it.
I was planning to release build 261 today.
The eXpress train is coming - and it has more cars.

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: Print Preview

#9 Post by Koverhage »

This is something that is also sometimes reported by users. It is not frequently, but it happens. In the preview everything is fine and correct, when printing it looks as sometime a 'page eject' is not executed and there are two pages printed above each other.
In fact, we have seen this phenomenon only if the user click more or less uncontrolled with the mouse in the document preview.

So the best way is disable the mouse ;-)
But allow click on +, -, >, <, >>, << and the scroll button.
Klaus

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Print Preview

#10 Post by skiman »

Hi Roger,

I just mentioned it, because I saw that I'm not the only one with the problem. You don't have to spend time on it for me. As I said, it doesn't happen very much.

I use your DCPRINT very intensive, and I'm quite happy with it. I will check a sample to see how that 'xps' preview looks. I never used the PDF output as preview, because you have to create the complete report before you can have a preview. With the internal preview you can see page by page. If you see that the report is not what you expected, you can stop the execution. In a large database the build of all the pages of a report can take some time.
Best regards,

Chris.
www.aboservice.be

Post Reply