Expand my Community achievements bar.

Add new row error in Adobe Reader

Avatar

Level 2

Hi

I have created a form in livecycle and when the form is tested in adobe professional 8 it adds rows correctly however when test in reader i get the following error.

reader error 2.JPG

When you ok, it adds the row, but appears every time ‘Add Row’ is clicked.  Also moves all the rows over to the next page and when it gets to bottom of that page moves it all onto next page, leaving page 2 blank.  Also, doesn’t move onto page 4 when adding more rows.

Anybody have any ideas?

7 Replies

Avatar

Level 10

Hi,

Can you share the code that is in the indexChange event - that may help.

Also try looking at the javascript console in Acrobat (press Control+J). This might throw up issues in Acrobat.

The other issue relates to pagination. In the subform there is an option in the Object > Field tab to allow page breaks in the content.

Niall

Avatar

Level 2

Hi Niall

I hope this is what you were asking for? i just did a search in the XML for "indexChange"

<script runAt="both">//{{Adobe LiveCycle Designer Generated Code Begin}} - row shading script. Don't modify it!&#xD;
var nFreqSize=0&#xD;
foreach item in (1,1) do&#xD;
   nFreqSize=nFreqSize+item&#xD;
endfor&#xD;
var nRelIndex=mod($.index,nFreqSize)+1&#xD;
var nColorIndex=0&#xD;
foreach element in (1,1) do&#xD;
   if (nRelIndex&gt;element) then&#xD;
       nRelIndex=nRelIndex-element&#xD;
       nColorIndex=nColorIndex+1&#xD;
   else&#xD;
       break&#xD;
   endif&#xD;
endfor&#xD;
var nCount=0&#xD;
foreach color in ("240,240,240","255,255,255") do&#xD;
   if(nCount==nColorIndex) then&#xD;
      $.border.fill.color.value=color&#xD;
      break&#xD;
   else&#xD;
     nCount=nCount+1&#xD;
   endif&#xD;
endfor&#xD;
//{{Adobe LiveCycle Designer Generated Code End}} - row shading script.&#xD;
</script>

I have also checked the Object - Field tab and the check box is ticked. After further testing with different versions i have noted that this message only appears when the user has Adobe Reader 7, the form is saved as an Acrobat 7 (dynamic) XML Form.

The message also states that the problem is on line 2221 however there is only 1983 lines in the XML source tab.

Graham

Avatar

Level 10

Hi Graham,

As you've guessed, the code is generated by LC Designer when you set alternate row shading on a repeatable table/row.

You have set the target version of the form to Acrobat/Reader v7 (in the File > Form Properties > Defaults tab). However you should also check the Warnings tab. This will tell you that alternate row shading is not supported on versions below v8. So turning off this feature will solve the problem.

Parallels Desktop1.png

Good luck,

Niall

Avatar

Level 2

Thanks Niall

How do i see the warnings tab and how would i turn off the alternate row shading?

Graham

Avatar

Level 10

Hi Graham,

Under the Windows menu there is an option for 'Report'. Select this and LC will display the Warnings tab, along with Binding and Log tabs.

You can turn off the row shading from the Object > Row Shading tab. Untick the checkbox.

Parallels Desktop1.png

Good luck,

Niall

Avatar

Level 2

Hi Niall

It's me again

Thanks for you instructions but I now have different issues since turning off the Row Shading.

This message with a different line number first happens when the form is opened, when you say ok and then try to add a new row it happens again, it then lets you add a row and as soon it gets to the bottom of the page all the rows plus the headings move from the first page on to page 2. I think it is due to the allow page breaks within content box not being ticked in image 2, do you know how I can get this box active?

new livecycle error.jpg

page break.jpg

Regards

Graham

Avatar

Level 10

Hi,

To me it still looks like there is script in the indexChange event. Select the repeating row (Row1?) and then in the script editor, select the show event dropdown and click on indexChange. If the auto-generated script is still in there, then delete it.

Alternatively you could select the root node (form1?) and when indexChange event is shown in the script editor you can scroll down and see if there is any script in any of the form objects.

I really don't think it is anything to do with the page breaks. Check if the subform and root nodes are allowing page breaks. In LC Designer v9 Allowing page breaks is available.

Hope that helps,

Niall