I have a Report (made in Report Studio), which contains a List and a HTML-item containing Javascript.
I have the following question:
Is there a way to access the “Data Item Values” from the List in the javascript? For example through XML?
Are you trying to pass the values to javascript? If so, you can wrap the list items with tags to get the contents. As a quick example, let's say you have a column like so:
[PRODUCT]
Apples
Bananas
Oranges
You can wrap the Data Item Values with Javascript to get their content into a Javascript array. It would look like this:
This would create a comma delimited string which is read into Javascript. To turn it into an actually Javascript array you would need to have another HTML Item under the list which contained:
At the end of last week I found this kind of solution on a other forum. And that worked very wel.
In that case I created an extra column in the list containting a html-item. The text in the html-item was an other Data Item Value which contained a concatenated string which looked like:
<script language="javascript">getPosition("' +[Address line 1]+ '","' + [City]');</script>
In this case getPosition is a function (which is defined in another html-item) in which the parameters are the other Data Item Values in the list.
But I think your solution is better because in the getPostion function I am creating the array.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.