nehagarg
3rd March 2015, 14:20
I need to rename a pdf printed using SSRS pdf device from FP8 ERP LN. The report (rdl) is designed using microsoft SSRS tool and when I am printing the same through FP8 ERP LN, it is getting printed with the report name & date time but I need to rename it with 'Order Number'.

For example:
If an ‘Argument’ field on device data session is set with the server path with predefined placeholders

-path "f:\reports\$user\$report_$datetime" then system is generating the pdf in defined path with the report name & date time, but it should get renamed to 'Order Number'

Is there any predefined variable for device data or approach for the same.

Thanks & Regards,
Neha Garg

bhushanchanda
3rd March 2015, 16:12
Hi,

To set a filename for the file to be stored on the file system you must assign a value to the predefined variable spool.fileout. If you specify the $file placeholder in the -path option of the Device argument,the value of spool.fileout is used to create the file. Note that spool.fileout must contain the full absolutepath.

nehagarg
5th March 2015, 11:32
Hi Bhusan,

Thanks for the reply but it is not working. As soon as the report gets open using SSRS device i.e. 'MS_SSRS_PDF' the predefined variable spool.fileout gets initialized to blank. Kindly suggest other options if possible.

bhushanchanda
5th March 2015, 11:39
Hi,

Can you try assigning the value to spool.file out explicitly in report script? May be in before.program. Not sure if this can be done without the source code though. Haven't been using SSRS for a while so can't test.

JaapJD
10th March 2015, 12:22
Assigning a value to spool.fileout in the report script does work, but you need to export the variable:


after.receive.data:
static boolean done
if not done then
spool.fileout = "/usr2/orderfiles/" & strip$(tdsls400.orno) & ".pdf"
export("spool.fileout", spool.fileout)
done = true
endif


If you have tools 10.3 or 10.4, see also KB https://www.inforxtreme.com/espublic/EN/AnswerLinkDotNet/SoHo/Solutions/SoHoViewSolution.aspx?SolutionID=1564124 .

nehagarg
19th March 2015, 08:27
It's working. Thank you so much...

krushna
15th April 2015, 06:50
Hi Neha,

Did you installed the solution 1564124 ?
can you please share the changes you made to rename the PDF output.

Thanks,
Krushna

nehagarg
15th April 2015, 16:45
Hi Krusha,

I do not installed any solution, but my ERP LN version is FP8. First you have to set $file placeholder in argument field of device data.
Argument - -format PDF -server SERVERNAME -path $file
Secondly, in the 'after.receive.data' section you have to set the path in spool.fileout and export the same.