Link to home
Start Free TrialLog in
Avatar of noreenburke
noreenburke

asked on

powerbuilder datastore print to file in pcl format

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
Avatar of diasroshan
diasroshan
Flag of Kuwait image

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
Avatar of noreenburke
noreenburke

ASKER

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

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
ASKER CERTIFIED SOLUTION
Avatar of diasroshan
diasroshan
Flag of Kuwait image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Rosh:
   Removing the return value worked.
Thank you