Let us see if i understand?
I change the code to easy the process.
So,
If your reports are for Form ou List you must call first:
The following call is for jasper to get the reports that are associated with the doctype and put them in jasper.pages[“any name”].
jasper.getListOnly("any name", "doctype name")
Where ‘any name’ is any name of course!
And doctype name is the name of the doctype, Ex. User.
And then call:
The following call get the report:
jasper.getOrphanReport({jr_name: "try_COA", jr_format: "pdf", page: "the any name chosen before", doctype_type:"Form or List", doctype:"User", docids:["luisfmfernandes@gmail.com", "Administrator"]})
In page you must use the name you choose in any name.
docids are the docnames
doctype_type is Form or List for now!
If your reports are of type general, then:
You don’t need to call jasper.getListOnly.
Just call:
jasper.getOrphanReport({jr_name: “try_COA”, jr_format: “pdf”, docids:[]})
Pass docids: []. This way jasper will not ask you to select at least one element when in List View.
If you have any problem or find any error just tell me.
If forgot, you must update jasper!!
Thanks.