adspace


How do u print the data horizantally by using XML report?

EX:Suppose there is one table names as SAMPLE in that we
have only two columns say empno,ename.I want the output
like this,At run time user may enter 3 colums(i.e to data
print horizantally).

empno ename empno ename empno ename
100 aaa 101 bbb 102 ccc
103 ddd 104 eee 105 fff


Answer Posted / Prabhat Kumar Tripathi

To print data horizontally in an XML report, you would typically use a tabular structure to organize your data. In Oracle Forms Reports, this can be achieved by creating a table-like layout with columns and rows. For each record (row) in your dataset, you can then output the values of each field (column) separated by appropriate delimiters (such as spaces or commas). Here's an example for the data you provided:

<table>
<tr>
<th>empno</th>
<th>ename</th>
</tr>
<?xml version="1.0" encoding="UTF-8"?>
<?oracle-report-options report_title="Horizontal Data Printing Example"?>
<?oracle-data-source ds1 binds=("ds1:DS1">
<query name="select_sample">
SELECT * FROM SAMPLE
</query>
<?
<?loop ds1.cursor?>
<tr>
<td><?=ds1.empno ?></td>
<td><?=ds1.ename ?></td>
</tr>
<?endloop?>
</table>

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in user parameter property we have list of values.can we write select query for binding? for example:: select empno from emp where deptno=:deptnum :deptnum is first parameter it displays distinct dept nos. if i do like this it is giving error:: bind variables are not allowed in the select statement

2219