<div dir="ltr"><div><div>Renate.<br><br></div>In respect to the output generated with the "Reports" option of the Circulation module, I have been testing the script output_circulation/print.php  and it seems that the error  occurs when the report specification includes a sort key. If the sort key is deleted then the error disappears.<br><br>It seems that  an error is generated  when the ref command  is used in a format called inside the IsisScript procedure "<do task=list>"  and the key provided in the REF is not found in the inverted file.<br><br></div>I was analyzing your data and realized that you are using 2 different databases in the loan process but in the ref you are always using the nadsb database: <br><div><div><div><div><br><span style="font-family:monospace,monospace">ref(['nadsb']l(['nadsb']'CN_'</span><span style="font-family:monospace,monospace">v95),v996^a,' 'v996^b)/</span><br><br></div><div>this is wrong because you have to use the field v98 of the trans database which stores the name of the database than contains the description of the object. <br><br>So, the right way for the previous format line would be:<br><br><span style="font-family:monospace,monospace">if npost([v98]'CN_'v95)=0 then '<strong><font color=red>not found</font></strong>' else ref([v98]l([v98]'CN_'v95), if db='nadsb' then ,v996^a,' 'v996^b else v882^a,' 'v882^a fi),fi </span><br><br><span style="font-family:monospace,monospace">if npost([v98]'CN_'v95)=0 <font face="arial,helvetica,sans-serif">to be sure that the record exists before applying the ref command (</font></span><span lang="en">to avoid the error mentioned previously</span><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">)<br><br></font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Then, the ref command is coded using the database name stored in v98 and the field sent to the output is conditioned on the database name. Notice that we are using db in place of v98 as v98 is not available at that point because the active record is the one retrived by the ref . <br></font></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">The format for generating the overdue items now says:<br><br></font>v10'|'<br>v20'|'<br>ref(['users']l(['users']'CO_'v20),v30) '|'<br>v70'|'<br>v30*6.2,'-',v30*4.2,'-',v30.4,'|'<br>v40*6.2,'-',v40*4.2,'-',v40.4,'|'<br>v80'|'<br>replace(s(mhl,V100,mpl),'|',''),'|'<br>v98'|',<br>if npost([v98]'CN_'v95)=0 then '<strong><font color=red>not found</font></strong>' else ref([v98]l([v98]'CN_'v95), if db='nadsb' then ,v996^a,' 'v996^b else v882^a,' 'v882^a fi)fi '|'/<font face="arial,helvetica,sans-serif"><br><br></font></span><br><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><span style="font-family:monospace,monospace">replace(s(mhl,V100,mpl),'|','')<font face="arial,helvetica,sans-serif"> is used because your data have some | in the title and that character is used in the format as a column delimiter. That's way in the output some extra columns were generated.<br><br></font></span></font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">v98 is added in order to display the database name where the object came from<br></font></span></div><div><br></div><div>I changed in the report specification the format name tbl01.pft by test.pft (test.pft is a new format that I generated in the cataloguing module for the trans database). You can modify tbl01.pft with the suggested changes and replace in the report specification the format name test.pft by tbl01.pft .<br><br></div><div><pre class="" id="tw-target-text" style="text-align:left;height:72px"><span style="font-family:arial,helvetica,sans-serif"><span lang="en">I hope this explanation in Spanglish has become sufficiently clear.<br><br>Regards,</span></span><br><br><span style="font-family:arial,helvetica,sans-serif">Guilda </span><br></pre></div></div></div></div></div>