Changing the default output file name jasper_report.PDF when using Jasper report Connector

I Create Jasper Report in Bonita 6.4.2 CE
Can I change the default output file name jasper_report.PDF ? Can I set a specific output path?
Thank in advance

Hi.
You can change the document name and path in the Documents tab of your process.
http://www.heberger-image.fr/data/images/52003_report.png

Hello,

This method is not working for me, using 7.0.3.
The .pdf file I linked to my document is still 0kb after my process is finished, but the process has been correctly executed, and I still receive a jasper_report.pdf file by mail.

Hello,
I found how it’s possible to rename a jasper_report.pdf file.

Indeed, you have to modify the Document Filename.
In the same step I created my Jasper PDF, I added an output Operation on my pdf document with the code :

import org.bonitasoft.engine.bpm.document.Document;
import org.bonitasoft.engine.bpm.document.DocumentValue;

//New filename is set here
String **collaboratorName **= assignmentChangeBDM.getCollaboratorName().trim().replace(" ", “");
String **filename **= "MouvementPersonnel
” + collaboratorName + “.pdf”;

//We’re looking for the previously created document
long docId = apiAccessor.getProcessAPI().getLastDocument(processInstanceId, “pdf”).getId();

Document doc = apiAccessor.getProcessAPI().getDocument(docId);

DocumentValue docValue = new DocumentValue(apiAccessor.getProcessAPI().getDocumentContent(doc.getContentStorageId()), doc.getContentMimeType(), filename);

return docValue;

Hi, everyone.

The solution is this.
in output Operation on my pdf document with the code :

import org.bonitasoft.engine.bpm.document.DocumentValue;
String filename=“FILENAME”.pdf"
reportDocValue.setFileName(filename)

DocumentValue doc=reportDocValue;
return doc;

regards.

Where do you want to save the document?

I think the only way to do what you want at the moment is to have a spare document in your process (tempDocHolder) (or create one using java/groovy) and copy the document saved from the jasper report connector to it and back, renaming it along the way.

You should open the jasper document as a byteArray and write it to the new documentValue giving it the new name…

See here for a possible starting point.

regards
Seán

This doesn’t work, my understanding of the Documents attached to a process is the Starting point of a document-not the destination.

Choose From an external system if the document content is to be retrieved from an external system by URL

For further details see here and here.

regards
Seán

I use version 6.3.7 and for me this work.
In the jasper connector, you can choose the output operation and set the document :
http://www.heberger-image.fr/data/images/50846_setdoc.png

and from that it will save it to the C:\Users.… directory?

Cool, I never knew that. Thanks Yannick

regards

Hello Yannick

So in the output operations of the jasper connector have you been able to set where the PDF is saved? Because I can only change the file name there