Solved

powerbuilder datastore print to file in pcl format

Posted on 2010-08-16
5
959 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
  • 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Debugging a PHP Web Application 2 101
Anomalies in ASP.NET ConnectionStrings 4 77
eclipse problems view not showing all the time 4 87
error when checking java version 4 4,147
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. …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now