[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Datawindow to PDF in Powerbuilder 8

Posted on 2004-11-01
Medium Priority
Last Modified: 2013-12-26

I am trying to find a way to export a report(DataWindow) to a PDF, but all solutions that I can find on the web is in Powerbuilder 9 or 10. Anybody know if it can be done in Powerbuilder 8, and how?

- Roar
Question by:RoarEngen
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3

Expert Comment

ID: 12465695
In 8 you need to print to a PDF driver.  Many people use Amyuni, CutePDF, or Acrobat.  Change your printer to the PDF "printer", print the dw, then change the printer back.

LVL 33

Expert Comment

ID: 12469872
Check out the printer at http://www.powerwhizz.com/
We've used it in many places wherev'r the clinet required pdf printing ( prior to pb9)
You need to install pdf driver.

Also you can try the below code
// to print without user intervn you need to do some changes in registry
String ls_reg
ls_reg = "HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter"
RegistrySet(ls_reg, "PDFFileName", RegString!, "C:\printmypdf.pdf")
RegistrySet(ls_reg, "bDocInfo", RegString!, "0")
After that,
dw_main.object.datawindow.printer = "Acrobat PDFWriter"

Thats it, The example above assumes you've Acrobat PDFWrite as the printer name and adobe installed, the full version
If you purchase amyuni,pdf995,cutepdf you can change the name to the corresponding printer.
You will alos have to change the default printer back as per req
LVL 33

Accepted Solution

sajuks earned 750 total points
ID: 12469893
The key to pdf printing from pb is to remember to've pdf driver installed and
to set the pdf printer.

dw_main.modify("Datawindow.printer = 'Adobe Acrobat writer')
LVL 33

Expert Comment

ID: 12831756
A split would be the proper response

Author Comment

ID: 12838064
Sorry, I missunderstod how it worked, I thought points were awarded automatically to those who responded. I have awarded the points to you sajuks because the combination of your two posts where the ones that solved the problem for me, thank you very much!

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question