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.

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.

Seems not possible to have your own defined file name with PCHOLD AS myFileName FORMAT XML except when using HOLD AS myFileName FORMAT XMLPCHOLD 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

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