TechnologiesAIProductsAI & Analytics

Last Week in the Forums: Fixed Layout vs Auto Layout, Displaying Your Query Text in Your Report for Troubleshooting

This blog series takes a look back at the past week in the forums, recalling how active they were and highlights some of the questions asked that seem to frequent the forums or other interesting topics. We’re in the last full week of the first half of the year! The forums have been a little slower this past week it seems, but slower than really busy is still busy.

As always, thanks to those members who are helping answer questions. It is a great help to the community!

The first topic for this week is fixed layout vs. auto layout. The poster was wanting to know what the difference was between the two so they could know which to use. The solution given for this is that the auto layout is used for HTML so that the page can size itself to the browser window. The fixed layout is used when you’re going to be exporting your reports to a fixed page size format, like PDF or DOC.

The next topic I’ll discuss this week is about how to display your query text in your report. The poster was editing their query text in script and were having troubles with it, so they wanted to be able to display the query text in the report so they could troubleshoot. The solution to this is to create a variable in your initialize method of your report, i.e. QT = “”;. Then, in the beforeOpen script of your dataSet where you’re editing the queryText, set the value of this variable to be your query text, i.e. QT = this.queryText;. Be sure to put this line after you’re done editing the query text. Finally, you can recall this variable in a dynamic textbox in or after the table that uses this dataSet with the expression, QT;.

The last topic for the last full week of the first half is about parsing a formatted string number into a decimal. The poster had a field in their dataSet that was a string field representation of scientific notation, i.e. 2.7E7. They wanted to be able to turn this into 27,000,000 in their report. The solution for this is to use java.text.DecimalFormat(), in a computed column, to create a new decimal format to parse your string onto to make it into decimal form. After doing this, you can use the NumberFormat section of the property editor to format your computed decimal field. The following is the script needed to do this for scientific notation:

importPackage(; nf =newDecimalFormat("#.#E0");//create a format to parse the string to a decimal
temp = nf.parse(row["ScientificFormatString"]);

Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment. 

Show More


OpenText is the leader in Enterprise Information Management (EIM). Our EIM products enable businesses to grow faster, lower operational costs, and reduce information governance and security risks by improving business insight, impact and process speed.

Related Posts

Back to top button