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.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
May 01, 2019, 11:10 AM
Frans
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.
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.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
May 01, 2019, 12:59 PM
Frans
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.
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.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
May 02, 2019, 03:39 AM
Frans
Yes the redirection works fine, the problem is that it's not using the filename that I've specified, but some random generated filename.
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.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
May 02, 2019, 09:13 AM
Frans
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.
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 ) 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.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
May 07, 2019, 09:48 AM
Doug
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?
May 07, 2019, 09:51 AM
Frans
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.