Select to view content in your preferred language

Problem in reports to exclude an option - getting "An error occurred when rendering by the report engine. No tag "w:tr" was found at the left"

543
3
Jump to solution
09-13-2023 07:37 AM
WVField
New Contributor II

I don't know how to tell which version of what I am using (as I am completely new to developing with these tools). Please let me know how to determine that and I will use it going forward. Thanks in advance.

I have a survey built from XLSForms where I have a select_one list on the form (${vegtreeplantspecies}) built from an online csv of plant names (hundreds of plant species).  They are in a repeat group so when someone encounters multiple species they can enter as many as they want. I have an entry in the select_one that has the label "Other - Not Listed" and the name "Other_species". I have a text box in the form (${vegtreeplantspeciesother} triggered by the relevant field if they select the entry "Other - Not Listed" it shows up and they can enter a plant species that is not in the online csv data.  Works fine.

Screenshot 2023-09-13 100940.png

Now that I am building the report, I am running into an issue with the logic to properly display the "Other - Not Listed" values into a table. I have a table that uses text boxes to control the visual location of the data on the screen, and have the appropriate repeat group start and end tags at the beginning cell and end cell of the row.

Screenshot 2023-09-13 100755.png

I can get the table to print the species name using ${vegtreeplantspecies}, but on the entries when they chose "Other - Not Listed" I want to show the field ${vegtreeplantspeciesother} instead, and NOT show the words "Other - Not Listed" as the species name. 

I have tried many variations of the ${if syntax, and they pass the syntax checker, but all give me an error while generating a report of "An error occurred when rendering by the report engine. No tag "w:tr" was found at the left"

I have worked around this issue previously by just listing each other possibility in an ${if ,  as in ${if vegtreeplantspecies | selected:"Red Oak"}Red Oak${/}${if vegtreeplantspecies|selected:"Other - Not Listed"}${vegtreeplantspeciesother}${/}   and this works fine with the list is small. What I need is some way to single out the "Other - Not Listed".  

I have tried

${if !(vegtreeplantspecies | selected:"Other_species")}${vegtreeplantspecies}${/} 

${if vegtreeplantspecies | !selected:"Other_species"}${vegtreeplantspecies}${/} 

${if (vegtreeplantspecies | selected:"Other_species")==false}${vegtreeplantspecies}${/} 

 

and other variations but they all end up the same way, pass syntax check and fail at runtime with the same error. I have tried changing the locations of the the starting and end tags of the repeat group to outside the text boxes, but that didn't resolve my problem. 

 

Thanks this is my first post. The contributions of the community have been very helpful in navigating my adventure into this platform

0 Kudos
1 Solution

Accepted Solutions
WVField
New Contributor II

I figured it out for anyone interested: use the ${if !(field | getValue:"")} to determine if it wasn't the field from the select_one (the other - not listed option).

 

${#vegtreespec}${$feature | getValue:”position”}. ${if  !(vegtreeplantspeciesother | getValue:””)}${vegtreeplantspecies}${/}${if vegtreeplantspeciesother}${vegtreeplantspeciesother}${/}

View solution in original post

0 Kudos
3 Replies
WVField
New Contributor II

here is the full entry I have in my first cell of the table row

${#vegtreespec}${$feature |getValue: “position”}. ${if !(vegtreeplantspecies | selected:"Other_species")}${vegtreeplantspecies}${/}${if vegtreeplantspecies | selected:"Other_species"}${vegtreeplantspeciesother}${/}

as a more detailed example of what I am trying to do

0 Kudos
WVField
New Contributor II

I figured it out for anyone interested: use the ${if !(field | getValue:"")} to determine if it wasn't the field from the select_one (the other - not listed option).

 

${#vegtreespec}${$feature | getValue:”position”}. ${if  !(vegtreeplantspeciesother | getValue:””)}${vegtreeplantspecies}${/}${if vegtreeplantspeciesother}${vegtreeplantspeciesother}${/}

0 Kudos
WVField
New Contributor II

Also I figured out that if I removed the code from the textboxes (unfortunately) the code works. Now I just have to use 1pt fonts to put everything in.. but it works.

0 Kudos