The community of Analytics developers are invited to follow and participate in the developer network. OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

open rptdocument with different parameter value

Hi
I have created a dataset and using parameter to filter dataset(part of the dataset) create a chart. I saved the design to rptdocument file, can I open the rptdocument file with different parameter value to render report, what I really want is can change the selection get different view without run the query to the data base(since data is in the dataset), anyone can help me? Thanks ahead!

0

Best Answer

The <VALUE-OF> tag allows you to insert engine code in the Text element code which runs in the browser. The main issue with your code is that variables defined in the browser do not have scope in the engine. Also, I did some testing and I found that passing arrays does not appear to work. You can pass array element values from the engine to the browser, but not the full array. There are a couple of workarounds. The obvious one is to concatenate the values into a string, pass the string value, and then write code in the text element to parse it and optionally put the values in an array defined in the Text element. The other option for handling multiple values is to populate a data set with the values and add a Table element to the report. Replace the Data element in the detail row of the table with a Text element containing <VALUE-OF>row{"column_name"]</VALUE-OF>.

Jeff F.Customer Support Engineer I
OpenText

1

Answers

The best option if you are able to query the database one more time is to create a data object. Have it return all of the data (no filtering). It will cache the data locally. Then add parameters to the report to filter the cached data from the data object for a given run of the report.

Hi Jeff
Thanks for the response, maybe I didn’t say clearly, on my query I got all the data I need, for example, the query return all the names of the team (no parameter in the query). When I build table I am using filters in property-editor-filters, which take a parameter and make a table only show the record with my name.
Then I save the report to an rptdocument. When I open this document(not rptdesign file) again under tomcat or using report engine api, I want pass parameter show other people’s record(since all the records with different names are in the dataset) But parameter dialog box is not pop up, and passing parameter through url also didn’t change anything. So my question is that can I using parameter open rptdocument file change the outcome of html page.
Ning

Rptdocuments should be considered static items. There are no longer parameters that can be passed to them as the document is fully generated. I'm not fully aware of all the options, but if you'd look below:

Hi Jeffery
haven't talk to you for a while and hopping everything is good!
I have a question about tag <!VALUE-OF> and what is really do.
Thanks in advance !
I have an array called “myArray” defined in Report Design “initialize” function
myArray = [];
Index = 0;
ArrayLength=0;
totalList= [];
In data onFetch function the value are assigned to the array and ArrayLength.
Now I am try to use them in one of the text item (HTML/list)
<!script>
function myFunc() {

The <VALUE-OF> tag allows you to insert engine code in the Text element code which runs in the browser. The main issue with your code is that variables defined in the browser do not have scope in the engine. Also, I did some testing and I found that passing arrays does not appear to work. You can pass array element values from the engine to the browser, but not the full array. There are a couple of workarounds. The obvious one is to concatenate the values into a string, pass the string value, and then write code in the text element to parse it and optionally put the values in an array defined in the Text element. The other option for handling multiple values is to populate a data set with the values and add a Table element to the report. Replace the Data element in the detail row of the table with a Text element containing <VALUE-OF>row{"column_name"]</VALUE-OF>.