Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Formatting livereport results
Mary_Slane_Corona
Is there a way to format (center) results under a column (or columns) in a livereport? Especially in the case of a number? Most of the time, the number is a "0" and it is right up against the result in the next column making it difficult to see.Thank you.
Find more posts tagged with
Comments
Lindsay_Davies
Message from Lindsay Davies <
ldavies@opentext.com
> via eLink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">eLink
Hi Mary,
For a standard Livereport this is only possible by doing the formatting as part of the SQL statement you issue.
If you have WebReports there are other options.
Using the SQL route, you could convert the number to a string as part of the select statement.
This would make the numbers left aligned - probably OK if they are integers.
In Oracle, you could convert the number to a string as follows....
select to_char(integercolame) as integercolname from tablename
In SQL server, this becomes
select cast(integercolname as varchar(10)) as inegercolname from tablename
Alternatively, you might just want to left pad the next text field with a space.
This is because the output is simple HTML being displayed in a browser.
Spaces are ignored in html in the browser - which leads to the " " instruction.
However, in Livelink you cannot output HTML tags without a manual customisation to webscript (this was discussed elsewhere in this forum recently).
So you could concatenate a single space with the text column and that will indent it by one.
Trying to use multiple spaces is suppressed.
In Oracle
select integer, ' ' || textcolname as textcolname from tablename
In SQL server
select integer, ' ' + textcolname as textcolname from tablename
Below you will find working examples of these solutions...
Childcount and Name are output three times on each line.
The first time is the default presentation.
The second time, the childcount is left aligned by making it a string.
The third time the name is left padded with a space character by concatenation.
If you want to test this as a livereport use a low 'record limit' (maybe 50) and 'autolivereport' output format.
For Oracle the statement would be....
select dataid, childcount, name, to_char(childcount) as child_L, name as Name1, childcount, ' ' || name as NamePad from dtree where subtype=0
For SQL server the statement would be....
select dataid, childcount, name, cast(childcount as varchar(10)) as child_L, name as Name1, childcount, ' ' + name as NamePad from dtree where subtype=0
Finally, the standard autolivereport format will use a very faint line as a border between column boundaries.
This is more obvious if you customise the row colours so they are darker so that the border colour changes to white.
Click the "Configure" button next to the chosen "Report Format" to see this option.
Hope this helps.
Regards
Lindsay
Opentext -
UK Support
From:
eLink Discussion: Open Text Live Reports Discussion [mailto:livereportsdiscussion@elinkkc.opentext.com]
Sent:
2010 March 31, Wed 00:51
To:
eLink Recipient
Subject:
Formatting livereport results
Formatting livereport results
Posted by
mary.corona@ejgallo.com
(Corona, Mary) on 2010/03/30 19:46
Is there a way to format (center) results under a column (or columns) in a livereport? Especially in the case of a number? Most of the time, the number is a "0" and it is right up against the result in the next column making it difficult to see.
Thank you.
Mary_Slane_Corona
Lindsay,Thank you so much for responding and your help.Mary