Focal Point
[CLOSED] HOLDATTR and XML Output

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3807011006

March 11, 2011, 04:39 PM
Dan Pinault
[CLOSED] HOLDATTR and XML Output
Hi folks,

Should the command
SET HOLDATTR = ON
work when HOLDing as an XML file? It's not working for me. What I'm doing is HOLDing the data as a FOCUS file first and then HOLDing that as an XML file.

Seems to me that I should be able to pass the TITLE attribute directly to the XML file.

Any ideas?

Thanks!

Dan

This message has been edited. Last edited by: Dan Pinault,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
March 11, 2011, 11:10 PM
Waz
The title attribute should pass, it should be in the column description data.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 14, 2011, 11:02 AM
Dan Pinault
Waz,

That's what I expected but, no joy. I guess I'll submit a case on it.

Cheers,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
March 14, 2011, 12:11 PM
dhagen
Hold XML will not give you the title, but hold XMLR will. You may have to mess with it to deal with the format differences however.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
March 14, 2011, 02:16 PM
Dan Pinault
dhagen,

Interesting. I was not aware of the .xmlr format before. It looks to me like it keeps all the report layout and formatting info.
How would one use a file like this either in the WebFOCUS environ or outside?

Thanks,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
March 14, 2011, 04:57 PM
Waz
Perhaps there is a difference in versions.

If I use the following code:
TABLE FILE GGSALES
PRINT *
WHERE RECORDLIMIT EQ 1
ON TABLE PCHOLD FORMAT XML
END


I get:
<?xml version="1.0" encoding="ISO-8859-1" ?> 
<fxf version="1.0" data="hold">
<report records="1" lines="1" columns="13" rows="1">
<target format="" version="" type="" destination="HOLD" /> 
<column_desc>
<col colnum="c0" fieldname="SEQ_NO" alias="SEQ" datatype="integer" width="5" focus_format="I5" description="Sequence number in database" accept="" help_message="" title="Sequence#" within="" property="" reference="" valign="right" /> 
<col colnum="c1" fieldname="CATEGORY" alias="E02" datatype="char" width="11" focus_format="A11" description="Product category" accept="" help_message="" title="Category" within="" property="" reference="" valign="left" /> 
<col colnum="c2" fieldname="PCD" alias="E03" datatype="char" width="4" focus_format="A04" description="Product Identification code (for sale)" accept="" help_message="" title="Product ID" within="" property="" reference="" valign="left" /> 
<col colnum="c3" fieldname="PRODUCT" alias="E04" datatype="char" width="16" focus_format="A16" description="Product name" accept="" help_message="" title="Product" within="" property="" reference="" valign="left" /> 
<col colnum="c4" fieldname="REGION" alias="E05" datatype="char" width="11" focus_format="A11" description="Region code" accept="" help_message="" title="Region" within="" property="" reference="" valign="left" /> 
<col colnum="c5" fieldname="ST" alias="E06" datatype="char" width="2" focus_format="A02" description="State" accept="" help_message="" title="State" within="" property="" reference="" valign="left" /> 
<col colnum="c6" fieldname="CITY" alias="E07" datatype="char" width="20" focus_format="A20" description="City" accept="" help_message="" title="City" within="" property="" reference="" valign="left" /> 
<col colnum="c7" fieldname="STCD" alias="E08" datatype="char" width="5" focus_format="A05" description="Store identification code (for sale)" accept="" help_message="" title="Store ID" within="" property="" reference="" valign="left" /> 
<col colnum="c8" fieldname="DATE" alias="E09" datatype="date" width="10" focus_format="I8YYMD" description="Date of sales report" accept="" help_message="" title="Date" within="" property="" reference="" valign="right" /> 
<col colnum="c9" fieldname="UNITS" alias="E10" datatype="integer" width="8" focus_format="I08" description="Number of units sold" accept="" help_message="" title="Unit Sales" within="" property="" reference="" valign="right" /> 
<col colnum="c10" fieldname="DOLLARS" alias="E11" datatype="integer" width="8" focus_format="I08" description="Total dollar amount of reported sales" accept="" help_message="" title="Dollar Sales" within="" property="" reference="" valign="right" /> 
<col colnum="c11" fieldname="BUDUNITS" alias="E12" datatype="integer" width="8" focus_format="I08" description="Number of units budgeted" accept="" help_message="" title="Budget Units" within="" property="" reference="" valign="right" /> 
<col colnum="c12" fieldname="BUDDOLLARS" alias="E13" datatype="integer" width="8" focus_format="I08" description="Total sales quota in dollars" accept="" help_message="" title="Budget Dollars" within="" property="" reference="" valign="right" /> 
</column_desc>
<table>
<tr linetype="data" linenum="1">
<td colnum="c0" rawvalue="1">1</td> 
<td colnum="c1">Coffee</td> 
<td colnum="c2">C144</td> 
<td colnum="c3">Capuccino</td> 
<td colnum="c4">Northeast</td> 
<td colnum="c5">CT</td> 
<td colnum="c6">New Haven</td> 
<td colnum="c7">R1100</td> 
<td colnum="c8" rawvalue="19970401">19970401</td> 
<td colnum="c9" rawvalue="1387">1387</td> 
<td colnum="c10" rawvalue="20805">20805</td> 
<td colnum="c11" rawvalue="1192">1192</td> 
<td colnum="c12" rawvalue="14304">14304</td> 
</tr>
</table>
</report>
</fxf>


The columns definition clearly shows Title. This was done on 7.6.6 and 7.6.11


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!