Parameter wise report content [message #538879] |
Tue, 10 January 2012 03:21  |
 |
boostercoder
Messages: 1 Registered: January 2012 Location: Bangladesh
|
Junior Member |
|
|
Hi,
I developed a report for bar code and it is running well.the contents in one bar code are Item name,code,price.I designed 4 pieces in a page and generate also 4 pieces in a page.
But Now I want to generate the report with a parameter where I can mention how many copies of bar code will generate in a page for this specific item.
If I put 3 pieces in parameter then bar code will generate 3 pieces. or so and so.
Is it possible? If it is yes then how ??????????????\\
Please reply soon if any one is helpful.
I am in serious problem.
|
|
|
Re: Parameter wise report content [message #538880 is a reply to message #538879] |
Tue, 10 January 2012 03:37  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Row generator technique should be used, I presume.
Here's one example:SQL> with tab_barcode as
2 (select 1 id, 'this_is_barcode_12345' col from dual union
3 select 2 id, 'another_barcode_99823' col from dual union
4 select 3 id, 'yet_another_one_43432' col from dual
5 )
6 select id, col
7 from tab_barcode,
8 table(cast(multiset(select level from dual
9 connect by level <= &how_many_copies
10 ) as sys.odcinumberlist)) t1;
Enter value for how_many_copies: 3
ID COL
---------- ---------------------
1 this_is_barcode_12345
1 this_is_barcode_12345
1 this_is_barcode_12345
2 another_barcode_99823
2 another_barcode_99823
2 another_barcode_99823
3 yet_another_one_43432
3 yet_another_one_43432
3 yet_another_one_43432
9 rows selected.
SQL> /
Enter value for how_many_copies: 2
ID COL
---------- ---------------------
1 this_is_barcode_12345
1 this_is_barcode_12345
2 another_barcode_99823
2 another_barcode_99823
3 yet_another_one_43432
3 yet_another_one_43432
6 rows selected.
SQL>
I don't know whether you can use it in Reports 6i, though, but you might try and find out.
If there's only one barcode, syntax is much simpler and I *believe* it'll work in Reports 6i:SQL> with tab_barcode as
2 (select 1 id, 'this_is_barcode_12345' col from dual)
3 select id, col
4 from tab_barcode
5 connect by level <= &how_many_copies;
Enter value for how_many_copies: 4
ID COL
---------- ---------------------
1 this_is_barcode_12345
1 this_is_barcode_12345
1 this_is_barcode_12345
1 this_is_barcode_12345
SQL>
|
|
|