Dynamic report with dynamic selectbox

Avatar

Avatar

christopher1544

Avatar

christopher1544

christopher1544

19-04-2018

I am trying to build my first dynamic report.   I have a variable [formName] and my final reporting page will adjust dynamically based on the default value I pass in.  

question 1.PNG

question 2.PNG

I have also been able to create an initial page with a text box allowing me to pass in a dynamic [formName] that is entered by the user.

question 3.PNG

question 4.PNG

What I really need is a way to have a drop down box populated with a list of options which are coming from a table because the options are changing over time as new forms are created with new "Form Names". 

Can anyone tell me what the process is to have a Combo Box on a page that is pulling its values from a table or list and passing which passes that value to my variable [formName]? 

The only option I see is to create a select box but then you have to manually enter each possible option.

question 5.PNG

The problem at this point is that the only option to get values into the combo box is to manually enter them.

question 6.PNG

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jean-Serge_Biro

MVP

Avatar

Jean-Serge_Biro

MVP

Jean-Serge_Biro
MVP

20-04-2018

Hello Christopher,

Regarding report with a dynamic list box values, there is no mention of the possibility below in Reporting documentation, but it is used in some factory reports.

So, as I described it already past year in this post below, you must fill the 3 XPath fields in the Advanced tab being positioned on your Listbox element, in the Page activity of your report; and of course set the Context initialisation field with the value "From the context" :

Re: Reports : How to pass parameter captured in page to query activity

Regards
J-Serge

Answers (3)

Answers (3)

Avatar

Avatar

christopher1544

Avatar

christopher1544

christopher1544

20-04-2018

I got it fixed.   The options XPath was supposed to be just starting with Query2 rather than ctx.    THANKS FOR THE HELP!

Avatar

Avatar

christopher1544

Avatar

christopher1544

christopher1544

20-04-2018

Thanks so much for your help!  I had found these advanced options yesterday, but wasn't sure how to use the "Options" box.  I was trying to put the full xpath to the parameter in the label and value and had left the options section blank.   Thank you for you help.

So now what I'm getting is a blank drop down list, which I expect means my xpath is just wrong.  From what you had crossed out in your post I can't quite figure out how to solve the problem.   Maybe you would be willing to take a look and help further?

What I did was connect a query on the report canvas to my page with the drop down list:

question 7.PNG

Next I looked at the Preview in debug mode to get the XML output:

question 8.PNG

Here is what I have in my xpaths in the advanced setting for by drop down list:

Options XPath:  ctx/query2/latestSubmittedExternalResponse/

Labels XPath: @email

Values XPath: @email

I have tried all kinds of variances on the Options XPath, but must be missing something obvious.   Any adivce would get GREATLY appreciate.

Avatar

Avatar

richac96395021

Avatar

richac96395021

richac96395021

20-04-2018

Hi christopherc30123643 ,

you can use the 'link editor' instead of Combo box to get dynamic values from a column of a table.

with regards,

Richa Chaubey