1. Amulya Kashyap
  2. PowerBuilder
  3. Wednesday, 7 June 2023 12:47 PM UTC

Hello,

With Powerbuilder 2022, we are unable to save any datawindow object with 'XML' as  template in 'Data Export' tab of datawindow object properties. Once saved, closed and opened again, the 'Format to Configure' property is changed to 'PDF'.

In the below screenshot, we have saved the 'Format to Configure' as 'XML' and assigned template.

On closing and re-opening the object, 'Format to Configure' is set back to 'PDF'.

image

When we run below code in PB22, the ls_xml is returning empty.

string ls_xml
dw1.Modify("DataWindow.Export.XML.UseTemplate = 't_report'")
dw1.Modify("DataWindow.Export.XML.SaveMetaData = MetaDataInternal!")
dw1.Modify("DataWindow.Export.XML.MetaDataType = XMLSchema!")
ls_xml = dw1.Object.DataWindow.Data.XML

 

Is there any workaround for this issue? This is affecting our release date as we cannot deliver the software without this functionality.

 

Accepted Answer
Peter Pang @Appeon Accepted Answer Pending Moderation
  1. Monday, 12 June 2023 08:51 AM UTC
  2. PowerBuilder
  3. # Permalink

 

When we run below code in PB22, the ls_xml is returning empty.

Is there any workaround for this issue?

 

Hi, Amulya,

Please find the workaround below:
On Datawindow’s XML Template, add an XML Declaration, for example:
root (right menu) -> Insert Before -> XML Declaration
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
BTW,The issue you reported has been fixed in PowerBuilder 2022 R2 Beta (build 2693).

Best Regards,
Peter

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 9 June 2023 09:01 AM UTC
  2. PowerBuilder
  3. # 1

I thought that this was already reported as a bug some time ago?

Comment
There are no comments made yet.
Julie Jiang @Appeon Accepted Answer Pending Moderation
  1. Friday, 9 June 2023 08:58 AM UTC
  2. PowerBuilder
  3. # 2

Hi all, 

Many thanks for reporting this issue. We will try to have it fixed in the coming 2022 R2 GA version.

Best regards, Julie

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 7 June 2023 15:17 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Amulya -

The DataWindow Painter always displays the PDF Export settings initially, but that does not imply the XML export settings have been cleared or changed. You should see the XML settings you previously set when you change the "Format to Configure" drop-down selection to XML.

I see in the code snippet you posted that you are not checking the string value returned by the Modify function. I suggest you assign the return value to a String variable and check it to ensure no error has been returned. You may also wish to verify (for testing purposes only) the value(s) you set by performing a Describe immediately after each Modify.

The issue you are having may indeed be a bug, so you may wish to open a bug report/ticket:

    https://www.appeon.com/standardsupport/newbug

I know from experience that providing a small, reproducible test case can be very helpful when reporting a potential bug.

Best regards, John

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 7 June 2023 18:16 PM UTC
You are correct John .. Amulya just needs to re-select the "XML" option from the Format DDLB when she returns to that DWO's property setting.

The DWO painter always sets the Format to PDF upon return as a default. So it can be a bit confusing. ;-)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.