Database connection is not working in Free Adobe Reader

akp35673538

16-04-2017

Hi,

I am working on a pdf that imports data from an sql server. I got it working flawlessly in livecycle and in Acrobat Reader 8 Professional. But in Free adobe reader it makes an index error on the preOpen event of dropdown that runs the javascript for getting records.

I applied reader extension from Acrobat Reader 8 Professional, but never the less it won't work.

my code in preOpen event:

this.clearItems();

xfa.sourceSet.City.first();

while(!xfa.sourceSet.City.isEOF())

{

if (xfa.resolveNode("$record.City.state_DCode").value ==xfa.resolveNode("Row1[0].presSTATE").rawValue)

{
  this.addItem(xfa.resolveNode("$record.City.Dist_Name").value,

               xfa.resolveNode("$record.City.Dist_Code").value);

}

xfa.sourceSet.City.next();

}

TypeError : xfa.sourceSet.City is undefined

If i try to get the connection name as

var oDataConn = xfa.sourceSet.nodes.item(0).name;

it gives :

GeneralError: Operation failed.

XFAObject.item:4:XFA:form1[0]:newform[0]:PresentAddress[0]:Row1[1]:CITY[0]:preOpen

Index value is out of bounds

Accepted Solutions (0)