PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD20]TablePrint to PDF without preview
[WD20]TablePrint to PDF without preview
Iniciado por guest, 12,nov. 2015 15:50 - 6 respuestas
Publicado el 12,noviembre 2015 - 15:50
Hi all,
I was wondering if there's a method that i've missed from the online help of windev where i can take data from a table and insert them directly into a PDF.
I know there's the function TablePrint, but the preview pane pops out everytime, no matter which combinations of printing function i used before that (such as ipreview(iprinter),iConfigure(iInfoPrinter("NameOfMyPDFCreator"),iDestination(igenericPDF,MyDirectory, and so on)
Any help would be a blessing
Publicado el 12,noviembre 2015 - 20:02
Hi Yaku,

iDestination(iGenericPDF,MyPahtName,...)
iPrintReport(MyReport)

should do the trick. Without iPreview.
Publicado el 13,noviembre 2015 - 09:23
Hi Stefan,
the problem with that solution is that i have to create a report for the table in order to print it, which i can't, based on the requirements i've been imposed...
Publicado el 13,noviembre 2015 - 10:33
I think that Yaku is not using a report (that can be a solution), but the code is similar to print from a table:

iDestination(iGenericPDF, "./table.pdf")
iParameter(iOrientation, iOrientation_Portrait)

// Print the table (without option, everything is displayed)
TablePrint(TABLE_MyTable)

A print preview should not be displayed. It should only be displayed a message the informs the user that It is being printed. After that (tableprint) you can use shellexecute to open the document.

Bruno
Publicado el 13,noviembre 2015 - 10:48
Hi Yaku,

I see what you mean. In WinDev19 there's more that goes wrong with TablePrint(). I have a table with 22 lines. When I print this table with:

iDestination(iGenericPDF, "./table.pdf") iParameter(iOrientation, iOrientation_Landscape) // Print the table (without option, everything is displayed) TablePrint(TABLE_Koppels)
I got the preview (where I didn't ask for) with 52 pages, a first page with 19 lines, then one page with the last part of the 19 lines (doesn't fit on one page), then 48 pages with only a header and after that one page with the last 3 lines and one page with the last part of the 3 lines because it doesn't fit on one page. Strange.

I think you best can send a request to PCSoft, imho it's a bug (and not a feature :angry:).
Publicado el 14,noviembre 2015 - 19:49
Why can't you make a report? If you can make a table I can see no reason why you couldnot make a report??

regards

Allard
Publicado el 15,noviembre 2015 - 01:21
For sure he can. The point maybe was not skipping the embedded one-click-function you can reuse for any table. Didn't it?
I found buggy the print without preview too.