Hello Guilherme
I have already done something like this yes. To work it is necessary to place a select that returns only 1 result in the <report> tag. And in my case I also needed to place a <group> below the <group> where the CreateResultSet is. Stays like this:
{
<report xmlns="http://www.intersystems.com/zen/report/definition" name="rReport" sql="Select TOP 1 ID FROM anytable">
<group name="gTest1" OnCreateResultSet="CreateRS1">
<group name="gTest1A">
<attribute name="name" field='name'/>
</group>
</group>
<group name="gTest2" OnCreateResultSet="CreateRS2">
<group name="gTest2B">
<attribute name="name" field='name'/>
</group>
</group>
Hello Maik
Perhaps using the command "zenSynchronousMode = 1" will solve your problem. It tells ZEN to call the methods synchronously, so it will only call your method when refreshTable () is finished. Stays like this:
refreshTable();
initializeTableFeatures();
zenSynchronousMode = 0; //returns to the original value
![Open Sesame!](https://community.intersystems.com/sites/default/files/badges/303371180-6de11138-f4e7-4113-b5cc-836269f07693.png)
![1,000 Points](https://community.intersystems.com/sites/default/files/badges/290121674-53216c4b-fe0c-44e7-9d75-2f24390135ed.png)
![Challenge Starter](https://community.intersystems.com/sites/default/files/badges/295959213-b83dd91a-663f-4f07-8e0e-e3287b7c2309.png)
![5,000 Points](https://community.intersystems.com/sites/default/files/badges/290121698-6976e2e4-084b-4026-bc5f-728c5e1ebe41.png)
![10K Points](https://community.intersystems.com/sites/default/files/badges/290121716-e7d970ee-2b18-423a-8871-5cc231687a22.png)
![Challenge Pro](https://community.intersystems.com/sites/default/files/badges/295959188-ff491b32-f0e9-4485-ad40-1c6db234985a.png)
![20K Points](https://community.intersystems.com/sites/default/files/badges/290121739-e1a39538-d83e-4205-9906-8e6466bf9371.png)
You can use pdfbox which is already used by ZEN for some pdf conversions. To make a pdf require a password, just run this command with $ZF(-100):
java -cp /opt/cachesys/fop/lib/pdfbox-app-1_7_1.jar org.apache.pdfbox.Encrypt -U 12345 /arquivos/file.pdf