SQL Plus command to print a report in Landscape format

Hi,
what is the SQL Plus command to print a report in Landscape format?

841731 wrote:
Hi,
what is the SQL Plus command to print a report in Landscape format?SQLPlus doesn't print, and it doesn't know about 'landscape' vs. 'portrait' any more than it knows about fonts. the only 'formatting' it knows is line size, page size. And all it does with line size is know where to insert a CR/LF pair (windows) or a CR (*nix). The only thing it knows to do with page size is repeat column headers.
The rest is up to whatever application you use to open the pure asciii text spool file.

Similar Messages

  • How to find GUI SQL*Plus command tool in Oracle 8i (version 8.1.7)

    I had installed Oracel 8i Enterprise Edition (version 8.1.7) on my server machine (Windows NT 4.0), I'd like to use Oracle Navigator (GUI SQL*PLUS command tool), but I can not find it from the menu. I know Oracle Navigator is available in Oracle 7. Can anyone tell me where and how to use GUI SQL*PLUS command tool in Oracle 8i Enterprise Edition (version 8.1.7) ?
    thanks a lot.
    David Zhu

    Hi
    Oracle Navigator is part of Personal Oracle7 and Oracle Lite. I don't know is it available in 8i Personal Edition but I am sure that it is not part of Standard and Enterprise Edition.
    Regards
    null

  • How to control layout in SQL*plus command

    Hi, All,
    I use SQL*plus to generate a simple report
    BREAK ON <column1> duplicates skip page ON REPORT
    COMPUTE COUNT LABEL 'Total number of trader shown on this report for this :' OF <column2> On <column1>
    it shows '********' and '-------------------' above the lable and compute result.
    Can I take '******' and '----------------' off
    and the label can not longer than the length of <column1>, otherwise it will be truncated.
    what if it is longer than the length of <column1>
    and I don't want to change the layout of <column1> ?
    Thanks

    Peter,
    FYI, this forum is dedicated for Oracle Reports issues. There's another forum dedicated to SQL*Plus - I believe it's now called iSQL*Plus, btw. You should try your question in the other forum.
    regards,
    Stewart

  • How to issue a SQL*Plus command from PL/SQL program?

    Thanks.

    You can't issue a SQL*PLus command from a PL/SQL program. If you can tell us more about what you are trying to do, perhaps we can offer a substitute.

  • Need to execute SQL PLUS commands from C# code

    Hello all,
    This is my first question here and hopefully I will get my solution :)
    Right now we are doing 3 tasks manually
    1) Clearing everything from a DB.
    We use sql plus and execute this :
    RAMNIVAS_CI/RAMNIVAS_CI@orclwex3
    set pages 0
    set lines 80
    spool c:\delete_objects_CI
    select 'drop '||object_type||' '||object_name||';'
    from user_objects;
    spool off
    start c:\delete_objects_CI.lst
    purge recyclebin;
    set pages 100
    select count(*) from user_objects;
    RAMNIVAS_CI/RAMNIVAS_CI@orclwex3 are the username and pwd which gets input when we paste entire thing in sql plus
    2) Then we restore that DB again using sql plus to do it using the command:
    imp file=CL.DMP log=CL.log buffer=1000000 fromuser=RAMNIVAS_CL touser=RAMNIVAS_CL statistics=none grants=n commit=y
    3)Execute sql scripts on it using sql developer. (This is not hard I guess coz I know we can use oracle client)
    4) Take backup using this command:
    exp RAMNIVAS_CI/RAMNIVAS_CI@ORCLWEX3 file=CI.dmp log=CI.log direct=y compress=y buffer=1000000 grants=n statistics=none
    Is there anything I cna do to execute SQL PLUS commands using c#?

    Hi,
    You can execute OS commands via the SHELL function provided in .NET. See the MSDN for more info.
    Some of the things you can do directly from .NET via ODP and PLSQL, some not.
    1) Dropping the user objects can be done via a plsql procedure where you open a cursor for "select 'drop '||object_type||' '||object_name||';' ..." and then use EXECUTE IMMEDIATE to execute the resulting commands. You can invoke the procedure via ODP.
    2) IMP is an exe, not a sqlplus command, so you're not actually using sqlplus there. You can still use the SHELL command though to invoke that.
    3) Executing SQL Scripts via ODP.NET is not something you can do very easily. If you search the threads here you should be able to find some solutions others have come up with to parse the file and execute the statements one by one, but there's nothing built in to ODP to execute a script file.
    You may want to just shell out to sqlplus user/pwd@db @scriptfile.sql but you may have issues trying to track down errors if any occurred, as I'm not sure where they go in that case.
    4) just as with IMP, EXP is an exe, so you could shell out to that.
    Corrections/comments welcome.
    Greg

  • .......Embedding  SQL PLUS commands inside PL/SQL.....

    hai every body,
    I have a doubt regarding sql plus commands and PL/SQL..I am using Oracle 10g..I have created 1 procedure for deletion/updation of transactions..and the number of effected rows I just displayed with using " *dbms_output.put_line* (SQL%ROWCOUNT)"..hence before executing the procedure the sqlPlus command "*SET SERVEROUTPUT ON*" should turn on..at most times it is forget to turn on and output becomes vague..
    hence my question is "*Is there any package or any thing to execute sql plus commands(here it is SET SERVER OUTPUT ON) through PL/SQL statements???*"
    with thanks,
    jp@valapad

    jp@valapad wrote:
    I have a doubt regarding sql plus commands and PL/SQL..
    Easy PL/SQL supports PL/SQL commands and embedded SQL, which are found in the PL/SQL and SQL reference manuals.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/toc.htm
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/toc.htm
    It does not support the commands of other applications or languages such as SQL*Plus, Unix or COBOL for example.
    I am using Oracle 10g..I have created 1 procedure for deletion/updation of transactions..and the number of effected rows I just displayed with using " *dbms_output.put_line* (SQL%ROWCOUNT)"..hence before executing the procedure the sqlPlus command "*SET SERVEROUTPUT ON*" should turn on..at most times it is forget to turn on and output becomes vague..You can set serveroutput on in your log in script for SQL*Plus if you keep forgetting.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/ch_two.htm#sthref94
    hence my question is "*Is there any package or any thing to execute sql plus commands(here it is SET SERVER OUTPUT ON) through PL/SQL statements???*"No.

  • Executing Sql* plus commands

    Hi
    Can we execute SQL *plus commands using JDBC OCI Driver. If so What is the procedure to execute and Which parameters to be set
    With Regards
    Vara Prasad

    AFAIK: no, you can't. SQL*plus is kind of a shell (the worst one I've seen so far), so via JDBC (both OCI and thin), you lack the interpreter.

  • Running a SQL*Plus command from Java

    I have a requirement to run SQL* Plus commands from Java. The results as they would appear in SQL*Plus window or spool file should be captured and stored in a table.
    For example,
    SQL> select * from dual;
    D
    X
    1 row selected;
    SQL>
    All the lines above should be stored for later use.
    Could any one give pointers?
    Thanks,
    Ravi

    <p>
    Hi,
    </p>
    <p>
    <strong><font face="Courier New">
    public class RuntimeExecApp {
     public static void main(String args[]) throws IOException
      Runtime r = Runtime.getRuntime();
      r.exec(&quot;C:\\Oracle\\sqlplus.exe&quot;);
    }</font></strong>
    </p>
    <p>
    Kuba 
    </p>
    Message was edited by:
    KUBA

  • SQL * Plus commands using JDBC

    Hi,
    Is it possible to run SQL * Plus commands using JDBC?
    Like Describe mytable , @mysql.sql etc....
    Pl. let me know any hints or way to handle it..
    Regards,
    Kavi

    like masuda1967 said, and you have MetaData objects for ResultSets as well.
    @something.sql you can call using CallableStatement objects, look it up in jdbc docs....

  • How to print a report in landscape mode?

    Hello everybody,
    I have a task where in i need to print a report in LANSCAPE format.
    I have tried to print the report output but i could not found an option to set LANDSCAPE mode and also how to change the font size.
    Can anybody suggest me the approach?
    Helpful answers will surely be rewarded.
    Thanks in advance.
    Sanghamitra.

    Hi
    If you are using the command MEW-PAGE PRINT ON
    then we can give this layout options
    like
    NEW-PAGE PRINT ON
    DESTINATION <printer name>
    immediately 'X'
    KEEP IN SPOOL 'X'
    LAYOUT 'X_65_132'  (OR X_65_255)
    RECEIVER SY-UNAME
    NO-DISPLAY.
    OTHERWISE WHEN YOU SELECT THE PRINTER
    IN THE PRINTER PROPERTIES/SETTINGS BASICS-> PAPER
    you will have this facility to select LANGSCAPE/PORTRAIT
    use that and print
    Reward points for useful Answers
    Regards
    Anji

  • Print a report on doc format truncate data

    hi
    I have a report launching with a form in an oracle applications, when I print a report on pdf format looks ok
    but when I print the same report on doc format truncate data on left and right side.
    Can you help me
    thanks

    Hi Herbe
    Reports does not support .doc format. Are you referring .rtf format?
    In any case, you must contact Oracle Support to get the issue resolved.
    Regards
    Sripathy

  • Character mode Report in Landscape Format

    Hi All,
    I want to print my character mode report in landscape format. But I am not getting it. Everytime I get print as Portrait. I am printing from live previewer of report builder.
    I am using Oracle 9i and Report builder 6i (6.0.8.11.3).
    I have done following settings:
    System Parameter ORIENTATION=Landscape
    DESFORMAT=DECLAND.PRT (Given by Oracle)
    In the object navigator I have set following properties for Main Section
    Width=11
    Height=8.5
    Orientation=Landscape
    Char Mode Width=132
    Char Mode height=66
    I have done same settings for Header Section and Trailer Section. Please help me.
    Thanks in advance.
    Regards
    Mona

    You will need to edit prt files to add the printer escape sequences to change the page orientation to landscape. Printer escape sequences can be obtained from the printer manual, or the printer vendor.
    For instance, HP printer escape codes can be obtained from the HP website under the printer support links.
    The steps below describe how to print a landscape, character mode report from a Windows NT PC on an HP 4100N Printer. The 4100N is a dual mode printer that can use either PCL or Postscript printer language.
    1. Use a web browser to navigate to the HP website and obtain the printer escape codes for the HP 4100N. If you are unable to locate the HP4100N printer, look for generic PCL information. The HP site also includes detailed information on the printer command syntax.
    2. The HP4100N printer command for landscape page orientation is "ESC&l1O" - where ESC indicates escape, '&' (ampersand) is the parameterized character, 'l'(lower case letter l) is the group character, '1' (number one) is the printer value character and 'O' (upper case letter O) is the termination character.
    NOTE: The HP documentation uses "EC" to signify the escape character.
    It also suggests pressing CTRL and the letter P together, then
    releasing both keys and pressing the ESC key. If this is done in
    a dos editor, a left arrow will actually be displayed on screen.
    This character cannot be interpreted by Oracle Reports and will
    cause printing errors if used in a .prt file. Instead, just use
    the letters "ESC" to indicate that the code that follows is a printer
    escape sequence.
    3. Make a copy of the wide.prt file and rename it to "mywide.prt."
    4. Add the page orientation escapes to mywide.prt file:
    printer "mywide"
    height 66
    width 132
    before report esc "&l1O" *** Puts Page in Landscape Orientation***
    after page control(L)
    after report esc "&l0O" *** Resets page orientation to Portrait ***
    return control(M)
    linefeed control(J)
    SYNTAX NOTES: The escape sequence must be enclosed in double quotes ("). The above comments regarding page orientation are used to clarify where the escape codes gets added, but they should NOT be used when editing
    the actual .prt file.
    5. Save mywide.prt file to the $ORACLE_HOME\report60\printers\ directory.
    6. Go to Windows PC -> Start -> Settings -> Printers and open the properties for the HP printer. Ensure that the option to "Always Spool Raw Data" is checked. This option is usually under the General Printer
    Options, or Spool Options. On Windows NT, you must have Administrator privileges to change this setting.
    7. Test running the report to the printer and specify desformat mywide. It is not necessary to include the file extension (.prt).
    8. The report will now print in landscape orientation.

  • Printer model hp laser jet p3005dn always prints second page in landscape format.

    Printer prints even page in landscape format only.  Even if in program (say msword) the page is in portrait format.

    Hi,
    The instructions (from your link) say you have to connect USB, how do you connect it now ? HP does not supply driver but Windows 8 & 8.1 MAY have generic/basic driver for it. The link also says you have to use Windows update. Amazing to see a 15-20years old printer is  still up and running, only the Operating system kills it.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Maximum length of SQL*Plus Command?

    I'm typing a long query into SQL*Plus (Linux, version 9.2.0.1... yes, I know it's ancient).
    If I run this query, all works fine:
    select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE')  then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$')
    else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
    'UPDATEMYAUDITING_TABLESETTEST_DETAILS='''||GRANTEE||'''WHEREMYAUDIT_REFNO=''A.F
    update myauditing_table set test_details='AUDIT_TRAIL is set to: DB' where myaud
    it_refno='A.FE';(In other words, is SQL that generates other SQL: if AUDIT_TRAIL is set to something interesting, tell me who has access to the AUD$ table. And it's working fine... the agg_concat function mentioned is simply Tom Kyte's stragg function under another name, as lifted word-for-word from http://www.sqlsnippets.com/en/topic-11591.html)
    Now this is what happens if I take out the linebreak after the mention of AUD$, so that the command is submitted as one single line of code:
    SQL> select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE')  then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$') else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
    SP2-0734: unknown command beginning "s set to: ..." - rest of line ignored.The error message indicates that the text has been 'split' at the 'AUDIT_TRAIL is set to...' bit, so that "s set to" is being treated as a new command, which is of course syntactically invalid. There is definitely no other change in text between the two versions, apart from the removal of a carriage return before the "else" statement.
    Possibly a coincidence, but the first "s" in "s set to" appears at position 258 in the entire text... close to a possible 255 or 256 character limit, perhaps?
    The same problem happens whether I run the command as a script (@mysql.sql) or typed in directly into a client SQL*Plus session. Is there some inherent limit to the length of commands that SQL*Plus can process in this version? My code runs fine on 10g and 11g databases/clients, whether it's on one line or two. Anyone know of a bug in 9i regarding this? And if there's a workaround (other than the obvious one of upgrading, of course!)

    As mentioned, it's choking at the 258th character, not the 240th. Also, it's a SELECT statement, not a COPY command (one relates to the database, the other is an internal SQL*Plus feature). And someone else also kindly pointed out that SQL*Plus has a command limit length (i.e., database-related commands) of 2500 characters. So I don't think that's the issue.
    I can be a bit more specific about this one now, though. I've a sequence of Solaris boxes running 9.2.0.1 up, and the results are that 9.2.0.1 is affected; and it's a problem for 9.2.0.7:
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE    9.2.0.1.0       Production
    TNS for Solaris: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    SQL> select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE')  then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$') else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
    SP2-0734: unknown command beginning "s set to: ..." - rest of line ignored.And...
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    PL/SQL Release 9.2.0.7.0 - Production
    CORE    9.2.0.7.0       Production
    TNS for Solaris: Version 9.2.0.7.0 - Production
    NLSRTL Version 9.2.0.7.0 - Production
    SQL> select 'update myauditing_table set test_details='''||grantee||''' where myaudit_refno=''A.FE'';' from (select case when upper(value) in ('DBO','TRUE')  then (select agg_concat(grantee) from dba_tab_privs where table_name='AUD$') else (select 'AUDIT_TRAIL is set to: '||value from dual) end as grantee from v$parameter where upper(name)='AUDIT_TRAIL' order by grantee);
    SP2-0734: unknown command beginning "s set to: ..." - rest of line ignored.But in 10.2.0.1, the problem disappears.
    I am not sure, but it is perhaps related to metalink note 285913.1, since we did get some ORA-00600: internal error code, arguments: [qernsRowP], [1] errors in the alert log with a slightly different version of the above query. Changing the query obviously alters the test, though, so it may be completely unrelated.
    Either way, I think it's definitely a version-specific SQL*Plus bug (though it would be nice if any other 9i owners out there could try it and report back!)
    Anyway, the workaround is simply to submit the command on two separate lines, wherever possible. And of course... to upgrade.

  • Is Sql plus command avaliable in sql developer

    SQL developer is able to do most of thing can be done with sql plus with GUI , cool.
    However, seems sql command, such as show parameter, start database have to be done in sql plus.
    is this true?
    most of time in my development, I just open sql developer now. but seems in this statuation, i have to use sql plus.

    jz2 wrote:
    SQL developer is able to do most of thing can be done with sql plus with GUI , cool.
    However, seems sql command, such as show parameter, start database have to be done in sql plus.
    is this true?
    most of time in my development, I just open sql developer now. but seems in this statuation, i have to use sql plus.As far as I know you still have to start the database from SQL*PLUS. If your schema has privileges you can get parameter values in SQL*Developer by querying V$PARAMETER (SET_CATALOG_ROLE privilege).
    The two tools are not the same. Much of what you can do with SQL*PLUS you can do with SQL*Developer but I feel that SQL*PLUS still has better scripting abilities along with its bind variable storate. On the other hand the GUI interface of SQL*Developer Is fairly easy to use. The danger is editing procedures/functions/packages in the database forgetting to back them up from SQL*Developer first; SQL*PLUS forces me to use scripts.
    Depending on what I am doing I use either SQL*PLUS or SQL*Developer (which I like better for queries with long select lists).
    I'm having trouble getting DBMS_OUTPUT.PUT_LINE to work the way I expect in SQL*Developer; sometimes the output just does not appear without repeated executions of the generating program.

Maybe you are looking for

  • Authentication Host-Mode Multi-Auth not working

    hi In my lab environment I configured 802.1x with "Multi-Auth" mode for multiple clients on a single protected port to be authenticated agains Microsoft NPS AAA server. Switch ports configured with Single-Host or Mult-Host options are working fine bu

  • Java Exception problem

    Hi, i have a file called ConstructMap.java which declares 2 objects, first being a File object file and the second being a FeatureType object myFeatureTypeSchema. I also have another file called ConstructStyle.java. What i am doing is trying to pass

  • Error in request transport of a newly created data source

    Hello, I'm implementing a BI 7.0 project for three factories of a company in a single BI system. I have to separate their CO-PA data sources, so I created a new DS in tcode 'keb0' with the same fields of the standart CO-PA DS named 1_CO_PA100UAKK, an

  • Is there any way to protect multi user Pass words?

    As a single user I am saving passwords and protecting them with master pass word.If somebody else is also using Firefox and wants to save his pass words can he save those with different master pass word as a second user?

  • Workflow Email Notification with blank subject header

    Hi Gurus, I am not a workflow expert but I am looking into a situation where some PO upon sending for PO release approval, there is subject header but for certain country, there isn't any header. Please advice where to check. Thanks in advance for yo