?
Solved

powerbuilder datastore print to file in pcl format

Posted on 2010-08-16
5
Medium Priority
?
1,005 Views
Last Modified: 2013-12-26
Hi Folks:
   I need to do a "print to file" of a datastore and it has to be in the PCL format. I have tried
  "lds_data_store.Object.DataWindow.Print.Filename" but the code fails.
   Can you help?
Thanks
0
Comment
Question by:noreenburke
[X]
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
  • 2
5 Comments
 
LVL 18

Expert Comment

by:diasroshan
ID: 33452749
Hi,

Datastore ds_1

ds_1 = Create Datastore
ds_1.DataObject = 'd_test
ds_1.SetTransObject(SQLCA)
ds_1.Retrieve()
ds_1.Object.DataWindow.Print.FileName = "C:\123.pcl"
ds_1.Print()


I tried the above code and it creates a file 123.pcl which i can open with Microsoft Office Document Imaging and print it!

Are u geting any error?

Cheers,
Rosh
0
 

Author Comment

by:noreenburke
ID: 33453899
Hi Rosh::
  This is the code that I am running:
n_ds      lds_report_data_store
lds_report_data_store = CREATE n_ds
lds_report_data_store.DataObject = ls_datawindow_name
lds_report_data_store.SetTransObject(SQLCA)
ll_retrieve_return = lds_report_data_store.Retrieve(ldt_report_date)
lds_report_data_store.Object.DataWindow.Print.Orientation = li_printer_paper_orientation
lds_report_data_store.Object.DataWindow.Print.Duplex = li_printer_simplex_duplex
lds_report_data_store.Object.DataWindow.Print.Paper.Size = li_printer_paper_size

lb_test_bills = lds_report_data_store.Object.DataWindow.Print.Filename = "c:\test_lib\test_report.pcl"

lb_test_bills is now "False"

Thanks for your help

0
 
LVL 18

Expert Comment

by:diasroshan
ID: 33462021
Hi,

did u try the code that ive pasted above?

If it works fine for u, then guess the problem could be with using a datastore user object.

First try the code ive given above and let me know if its works for u. Then we cud take it further from there to make ur code work!

Cheers,
Rosh
0
 
LVL 18

Accepted Solution

by:
diasroshan earned 2000 total points
ID: 33462139

Also,
Try the below code without checking for lb_test_bills, it worked for me.

n_ds      lds_report_data_store
lds_report_data_store = CREATE n_ds
lds_report_data_store.DataObject = ls_datawindow_name
lds_report_data_store.SetTransObject(SQLCA)
ll_retrieve_return = lds_report_data_store.Retrieve(ldt_report_date)
lds_report_data_store.Object.DataWindow.Print.Orientation = li_printer_paper_orientation
lds_report_data_store.Object.DataWindow.Print.Duplex = li_printer_simplex_duplex
lds_report_data_store.Object.DataWindow.Print.Paper.Size = li_printer_paper_size

lds_report_data_store.Object.DataWindow.Print.Filename = "c:\test_lib\test_report.pcl"
lds_report_data_store.Print()


Cheers,
Rosh
0
 

Author Comment

by:noreenburke
ID: 33486268
Hi Rosh:
   Removing the return value worked.
Thank you
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
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: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…
Suggested Courses

770 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