Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]PCHOLD AS .. FORMAT XML
Go
New
Search
Notify
Tools
Reply
  
[SOLVED]PCHOLD AS .. FORMAT XML
 Login/Join
 
Guru
posted
Hi guys,

Anybody familiar with naming XML files and holding them in a browser?

 
TABLE FILE CAR
PRINT *
ON TABLE PCHOLD AS TSTREPORT FORMAT XML
END 


Gives some generated filename (I've changed redirection settings / xml /save = yes)

This message has been edited. Last edited by: Frans,


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Not sure to understand.

PCHOLD is not "holding" in a browser, it's returning the result to your PC. PCHOLD = hold to PC

As per example, when you want to create data that can be used in an HTML control (drop list, list box, radio, …) you need only need to do
TABLE FILE CAR
BY COUNTRY
ON TABLE PCHOLD FORMAT XML
END

so be "associating" the fex above from the SETTINGS of a control in HTML the country list will be available to this control


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
Hi Martin,

In this case I really want to save it in the browser.
  PCHOLD AS TESTREPORT FORMAT EXL07
gives the right filename (testreport.xlsx) for the Excel, but for XML this is not working (@000020.xml).

We are scheduling these kind of reports in Reportcaster and giving them dymaic file names this way (ON TABLE PCHOLD AS &NAME FORMAT XML). If someone has a hint to dynamically populate a filename in the task, than that would be a good workaround as well.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
To physically save "data" on disk, you should better do this
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS myfolder/TSTREPORT FORMAT XML
END

PCHOLD is just in your PC memory


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
Yes, but I want it as a save file in the browser, not on disk. Smiler


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You cannot save in a browser or I misunderstand your request.
If you save on disk then the file will be available to the browser as per my sample.


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
It's like PCHOLD FORMAT EXL07, then the Excel file is send to the browser and there it will be shown in the browser or you get a "save as" depending on the redirection settings. So with saving in the browser, I mean getting the "save as" option in the browser.

The question is, how to get the right filename if you do that with XML.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Hoooo, much clear.

Go to Client Administration Console and then Redirection Settings.
Change the one for xml file from No to Yes for the Save option.
You will be prompted for to save the result, then you can put your own file name.

Should do the trick


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
Yes the redirection works fine, the problem is that it's not using the filename that I've specified, but some random generated filename.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Seems not possible to have your own defined file name with PCHOLD AS myFileName FORMAT XML except when using HOLD AS myFileName FORMAT XML
PCHOLD XML usually used for "dynamic" control list values generation so, the name is not important

With the redirection properly setup, you are able to have the save prompt but not with your specified name which IMHO is not a show stopper

You may should open a case with TS and share the answer with us


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
thanks for your input. The reason we use this is that with this, we get a dynamic filename for emails in Reportcaster. This works for all formats except xml.

I'll have to look further to create a dynamic filename in Reportcaster.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Frans,

I'm not sure what version of 8.2 you are usng but in 8.2.05 there are two redirection settings ("Redirect" and "Save As"). I can't compare earlier versions as I do not have them to hand but the following code gives me the option to download (save to browser Wink) as the correct filename.

TABLE FILE CAR
SUM RCOST DCOST
BY COUNTRY
BY CAR
ON TABLE PCHOLD AS TESTXML FORMAT XML
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5601 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
As I see it in 8204M Gen48 open in IE.
XML open the results directly in the browser.
XLSX uses the 'AS' name.

See you at Summit?
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Thanks Tony, I've tested it on 8205, but there I get @0000010.xml as filename. I'll open a case, seems we have another setting overrulling this.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
I had a similar issue with the naming of CSV files, and as Tony mentioned
quote:
redirection settings ("Redirect" and "Save As")
it worked as desired after changing the 'Save As' settings to 'yes'.
I hope this works for you as well.
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Hi Doug,

Thanks, but the redirect settings are OK. It seems to be some other configuration setting, I'm checking it with techsupport.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
NP. Let us all know what they provide as a resolution...
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
This is solved by using an & in the "Save Report as" field in Reportcaster. The Parameter entry works in 8205, not on 8202.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 393 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]PCHOLD AS .. FORMAT XML

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.