Report output on one Line, without new line (cariage return)
Hello I use a user defined report with style plsql. The output is with many dbms_output.put_line and is displays in only one line. May I ask you to get the output on more the one line. For eatch dbms_output I wont to have a new line (cariage return). Many thanks for help in advance
In the body of the report, I used HTML tags to control the appearance.
For example, to see what database features you have used in your database today, the following code works well:
begin
dbms_output.enable(1000000);
dbms_output.put_line('<PRE>');
for rc in ( select output from
table(dbms_feature_usage_report.display_text)
) loop
dbms_output.put_line(rc.output);
end loop;
dbms_output.put_line('</PRE>');
end; This yields the following output
DB FEATURE USAGE report for
DB Name DB Id Release Total Samples Last Sample Time
ABCPROD 900004321 10.2.0.1.0 78 09-Oct-09 18:29:17
DB Feature Usage Summary DB/Release: ABCPROD/10.2.0.1.0
-> This section displays the summary of Usage for Database Features.
-> The Currently Used column is TRUE if usage was detected for
-> the feature at the last sample time.
Curr-
ently Detected Total Last Usage
Feature Name Used Usages Samples Time
Automatic SQL Execution Memory TRUE 78 78 10/09/09 18:29
Automatic Segment Space Management (syste TRUE 78 78 10/09/09 18:29
etc.However if you comment the lines with the beginning and terminating tags for preformatted text, then you get output confined to one line that starts out like:
DB FEATURE USAGE report for DB Name DB Id Release Total Samples Last Sample Time ------------ ----------- and you'll have to scroll to the right or figure how you want to break it up -- That's too much work.
My configuration:
Windows XP SP3
SQL Developer 1.5.5 Build MAIN-5969
Java(TM) Platform 1.6.0_06
Similar Messages
-
Xml report output in excel format without using options tab in EBS
How to get xml publisher report output in excel format without using options tab in EBS?
I am getting XML Publisher report output in excel format by using options tab while submitting the concurrent request .
But i want to get excel output automatically.
Can anyone give idea to get XML publisher Report output in excel without selecting options tab.
Thanks in advance
Sandeep VHey Sandeep,
I am working on a similar format for a report and if possible can you please give me some guidelines. I have initially created reports using XML Publisher, but for those , the output preview format was PDF. So, if I select the preview format as EXCEL will it give me output in Excel and for this to happen, how do I define the rtf template. I believe the working will be same as for PDF, create a rdf report, get output in XML and apply the template to get the data in Excel or there is something different to this.
Thanks,
Sunil -
Hello to everybody,
I trying to do a file content conversion for the following file :
a;b;c;d;a;b;c;d;a;b;c;d
Problem :
file has 4 fields meaning that there is not a nl after each line . The correct file for instance have to be
a;b;c;d
a;b;c;d
a;b;c;d
Target structure :
line
field a
field b
field c
field d
line
field a
field b
field c
field d
etc...
is this achievable ?
just to be more clear :
The incoming csv file has all it's lines continuoysly : no new line after each record ..
Edited by: Laurent Fournier on Jan 20, 2011 2:13 PMHi Laurent Fournier,
As you said, if your given a flat file containing "a;b;c;d;a;b;c;d;a;b;c;d" you will replace every 4th ";" with "new line". Then you want it to be converted into XML.
Now let's try to achieve the same using SAP PI. As Sender File FCC can not handle this situation, it should be handled in Adapter module or Mapping.
Let's do it in simple Java Mapping (as Graphical and XSLT can not handle non XML input).
package com.mapping;
import java.io.*;
import com.sap.aii.mapping.api.*;
public class SimpleJavaMapping_PI71 extends AbstractTransformation
public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException
try
InputStream inputstream = transformationInput.getInputPayload().getInputStream();
OutputStream outputstream = transformationOutput.getOutputPayload().getOutputStream();
byte[] b = new byte[inputstream.available()];
inputstream.read(b);
String strContent = new String(b);
float fStrContent = strContent.length();
int iCountColon = 0;
StringBuilder strOutputContent = new StringBuilder();
for (int i = 0; i < fStrContent; i++)
char cTemp = strContent.charAt(i);
if (!";".equals(cTemp))
strOutputContent.append(cTemp);
} else
if (4 != iCountColon)
strOutputContent.append(cTemp);
iCountColon++;
} else
strOutputContent.append(System.getProperty("line.separator"));
iCountColon = 0;
outputstream.write(strOutputContent.toString().getBytes());
} catch (Exception exception)
exception.printStackTrace();
You can also implement this logic in adapter module in sender channel and then use FCC to convert it into XML. Or you can implement above Java Mapping, followed by another Java Mapping to convert output of above code into XML using DOM parser.
Regards,
Raghu_Vamsee -
Spooling via DBMS_OUTPUT.PUT_LINE without new lines
Is there a way to spool output to a file using DBMS_OUTPUT.PUT_LINE so that each line is placed on a same line? ie spool all output to one line?
I guess this probably goes against design of PUT_LINE as it is mean to put a line.
What I am trying to do is build a DOS command via a SQL script that spools to a file all on one line. this is so that when the spool file is run (either as a .bat or .sh file) the command can execute correctly since it is all on one line.
Any ideas?
Leigh.You can try below code.
create or replace procedure p1(P_AMU varchar2) as
cursor cu_get_workbooks is
select '/workbook "'||doc_created_by||'.'||doc_name||'"' workbook
from (
SELECT EUL4_DOCUMENTS.DOC_NAME,
DOC_CREATED_BY
FROM EUL4_DOCUMENTS EUL4_DOCUMENTS
WHERE DOC_CREATED_BY=P_AMU;
str varchar2(4000);
begin
for cu_rec in cu_get_workbooks loop
str := cu_rec.workbook;
end loop;
insert into temp values (str);
end;
And then you can write a sql script:
exec p1(&&AMU);
select * from temp;
Regards,
Vidyadhar Singh. -
Send report output as pdf attachment (without collecting spool )
I used to do this requirement by collecting the spool and then convert it to pdf. But in this case we should use the report output ( NOT FROM SPOOL ) and convert it to PDF and send it as email attachment.
Please help.
Thanks!Hi,
I can think of these options. Please explore on the possibilities.
1) Create one MAIN Report , which will submit your report. Get the List output from memory. Convert the Data to PDF and send the PDF as attachment in mail.
2) Create a smartform which will be called in your report. Convert the returned data to PDF and then send the PDF as attachment in mail.
3) Create one MAIN Report , which will submit your report thorugh a JOB. Wait for the JOB to be completed. Convert the ABAP Spool data to PDF and send the PDF as attachment in mail.
Regards,
Abhishek -
Open mutiple PDF report outputs with one button click
I need to open multiple PDF outputs depending on check boxes on the front end (Asp.net C#) app connecting to Crystal report server XI. Here is my code. I'm able to open only one PDF not multiple. If I use Response.end() at the end except first nothing is displayed. If I remove response.end() it opens Adobe and displays error msg saying file is corrupted. Please let me know if there is any other way to display multiple PDF outputs
SessionMgr sessionMgr = new SessionMgr();
EnterpriseSession enterpriseSession;
ReportAppFactory reportAppFactory;
ReportClientDocument reportClientDocument;
EnterpriseService enterpriseService;
InfoStore infoStore;
InfoObjects infoObjects;
InfoObject infoObject;
String crServerName = ConfigurationManager.AppSettings.Get("CRServerName");
String crUserID = ConfigurationManager.AppSettings.Get("CRUserID");
String crPwd = ConfigurationManager.AppSettings.Get("CRPwd");
String dbUserID = ConfigurationManager.AppSettings.Get("DBUserID");
String dbPwd = ConfigurationManager.AppSettings.Get("DBPwd");
enterpriseSession = sessionMgr.Logon(crUserID, crPwd, crServerName, "secEnterprise");
enterpriseService = enterpriseSession.GetService("InfoStore");
infoStore = new InfoStore(enterpriseService);
infoObjects = infoStore.Query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME='" + reportName + "' And SI_INSTANCE=0");
infoObject = infoObjects[1];
EnterpriseService tempService = enterpriseSession.GetService("", "RASReportFactory");
reportAppFactory = (ReportAppFactory)tempService.Interface;
reportClientDocument = reportAppFactory.OpenDocument(infoObject.ID, 0);
// Pass datbase logon credentials
reportClientDocument.DatabaseController.logon(dbUserID, dbPwd);
reportClientDocument.DataDefController.ParameterFieldController.SetCurrentValues("", "ProjectID", ddlProjects.SelectedValue);
PrintOutputController rasPrintOutputController;
CrReportExportFormatEnum rasReportExportFormat = CrReportExportFormatEnum.crReportExportFormatPDF;
rasPrintOutputController = doc.PrintOutputController;
ByteArray tempByteArray = rasPrintOutputController.Export(rasReportExportFormat, 0);
Byte[] byteStreamOutput = tempByteArray.ByteArray;
Response.AddHeader("content-disposition", "attachment;filename=" + reportName + ".pdf");
Response.ContentType = "application/pdf";
Response.BinaryWrite(byteStreamOutput);
Response.end();Hello, Anu;
Business Objects will create one PDF from one report. Once the report object has been formatted as a PDF it is no longer handled by Business Objects but uses the functionality of Adobe.
If they were being saved as .pdf files, would there be a way to open more than one at a time?
Elaine -
how to create a report with out the HEADER LINE concept....because I want the output as only some of the fields from the table.....
And this type of programming consumes much processing than the normal one.....
NOTE: In normal process I am facing memory problem. It's giving error like "the WORKAREA <internal table> is not enough"
Regards
SureshCheck the below example ,it has both header line and withou header line:
Internal table with header line
here i am using get time field command ,so use both program and see comparision time
report zxyz.
Internal table with header line.
DATA:BEGIN OF itab OCCURS 0,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
END OF itab.
data : f1 type i,
f2 type i,
f3 type i.
start-of-selection.
get run time field f1.
SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.
loop at itab.
endloop.
get run time field f2.
f3 = f2 - f1 .
write :/ 'Time taken by query in Micro seconds', f3.
Internal table without header line
report zxyz1.
Internal table without header line.
types : begin of ty_itab ,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
end of ty_itab.
data itab type standard table of ty_itab.
data wa_itab like line of itab.
data : f1 type i,
f2 type i,
f3 type i.
start-of-selection.
get run time field f1.
SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.
loop at itab into wa_itab.
endloop.
get run time field f2.
f3 = f2 - f1 .
write :/ 'Time taken by query in Micro seconds', f3.
I would suggest use always internal table without header line.
Thanks
Seshu -
How to print new line using DBMS_OUTPUT package
Hi,
I am trying to print a new line using DBMS_OUTPUT package. but it do not print the new line.
set serveroutput on size 200000
set feedback on
BEGIN
DBMS_OUTPUT.PUT_LINE('First Line');
DBMS_OUTPUT.PUT_LINE('');
DBMS_OUTPUT.PUT_LINE('Second Line');
END;
I expect following output ...
First Line
Second Line
but i got following output....
First Line
Second Line
why DBMS_OUTPUT.PUT_LINE( '); is not printing a new line ?You can try the following:
SQL> ED
Wrote file afiedt.buf
1 BEGIN
2 DBMS_OUTPUT.PUT('ONE LINE...');
3 DBMS_OUTPUT.PUT('SECOND LINE...');
4 DBMS_OUTPUT.NEW_LINE;
5 DBMS_OUTPUT.PUT_LINE('THIRD LINE WITH NEW LINE...');
6 DBMS_OUTPUT.PUT('TEST');
7 DBMS_OUTPUT.NEW_LINE;
8 DBMS_OUTPUT.PUT_LINE('FOURTH LINE'||CHR(10)||'EXAMPLE');
9 DBMS_OUTPUT.PUT_LINE(CHR(10));
10 DBMS_OUTPUT.PUT_LINE('FIFTH LINE');
11* END;
SQL> /
ONE LINE...SECOND LINE...
THIRD LINE WITH NEW LINE...
TEST
FOURTH LINE
EXAMPLE
FIFTH LINE
PL/SQL procedure successfully completed.Documentation:
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#i1000062 -
New Line Character in SQL Query
Dear All,
I am wondering if some one tell me how to insert new line character in the SQL Query Output for example I need out put in the following format. Every line on new line.
The total count is:
Registration: 1111
Fees paid: 2222
Admission Done: 3333
Total:4000
Many thanksHi
SQL> select
2 'The total count is:
3 Registration: 1111
4 Fees paid: 2222
5 Admission Done: 3333
6 Total:4000
7 ' dummy_txt from dual
8 /
DUMMY_TXT
The total count is:
Registration: 1111
Fees paid: 2222
Admission Done: 3333
Total:4000
SQL>
SQL> select 'a'||chr(10)||'b' from dual;
'A'
a
b
SQL> T -
Reporting Toolkit: How to insert a blank line into an MS Word Report?
Hello,
I have created an MS Word report, but I haven't been able to find out how to "write" a blank line to the report. I've tried every combination of \n, \\n, "\n", '\n', \\n etc., but I haven't had any good luck.
Thanks,
ChrisHello,
If you're using "append report".vi it's has one input for "new line".
Message Edited by Jorge Amaral on 05-02-2008 03:28 PM
Software developer
www.mcm-electronics.com
PS: Don't forget to rate a good anwser ; )
Currently using Labview 2011
PORTUGAL
Attachments:
append.PNG 3 KB -
What is a new line, really?
Continuing my voyage into Java's I/O space...
Okay, this might sound like a really stupid question, but I'm all new to programming. :)
But what is a new line, really!? I ask since I've gotten the impression that there is more than one "kind" of new line.
I've written the code below to count the number of lines in a file. It seems to work but what if a file contains a different "new line flavor?
int linesInFile() throws IOException
FileReader fileIn = null;
Scanner scanner = null;
int numberOfLines = 0;
try {
fileIn = new FileReader("/users/stefan/test/test2.txt");
BufferedReader bufferedIn = new BufferedReader(fileIn);
scanner = new Scanner(bufferedIn);
scanner.useDelimiter("\n");
while ( scanner.hasNext() )
System.out.println(scanner.next());
numberOfLines++;
finally
if ( fileIn != null )
scanner.close();
fileIn.close();
return numberOfLines;
} By the way. I'm closing the Scanner and the FileReader - but not the BufferedReader. I think it will close when the try statement ends - is that correct?
Kind regards,
StefanYou're right in that there's more than one type of newline - depending on your system it can be a carriage return followed by a newline character, just a newline character, or some other more uncommon combinations. As it happens, Windows' Notepad is just about the only application that doesn't handle other types of linebreaks correctly.
You can get the line break on the current system by using System.getProperty("line.separator"), I believe. Using the methods provided by BufferedReader such as "newline()" rather than outputting "\n" characters is usually recommended. -
500k profile after disruption and new line install...
Hello,
Status:
I have an open fault logged with BT;
Phone line ok but broadband speed low, profile appears stuck at 500k.
History: sporadic BBand connection and noisy phone line followed by outright failure of both.
Engineers visited and confirmed line between street and master socket probably corroded - they put it on leg+leg to get it working while we waited for a new physical line to be installed.
Pavement was dug up, new armoured cable run from street to house, and a proper master socket fitted (NT5 ? but no inbuilt ADSL filter).
In effort to ensure low noise, ALL other sockets in the property disconnected.
Digital phone (3 handsets off a single powered base) are run off the master socket using a filter.
Router is business hub - 2700hgv; f/w 6.1.1.48.1-enh.tm , h/w 2701-100589-005 .
Hub is connected to same master socket as phone (as it's the only socket now connected to the new line).
New line was installed approx 18 days ago.
Speed tests (speedtest.net) repeatedly show download of 480kbps, upload around 620kbps.
No change since new line was installed and all but the master socket decomissioned.
I use wireless to the router but also repeated tests with a Cat6 copper RJ45 cable and got same results.
Have taken all wireless devices offline and removed electrical items near phone line power supply and cable path to reduce potential noise and repeated tests.
I left the router on for two weeks and no increase in broadband speed.
I rebooted it twice this weekend to see whether it picked up a different profile - but no change.
BT speedtester repeatedly indicates a profile of 500k (full results further down).
Last year I had speeds about 512k on a DrayTek router before switching to the 2700HGV. The change to the BT hub upped the download speed to around 1Mbps, which made a huge difference.
I know I am "a long way from the exchange" but I've had 1Mbps last year and now have a new line into my property, so not much left that I can do to improve the situation.
I'd like to know what can be done to get me at least 1Mb download again.
I have an engineer visit due tomorrow but I believe that will be purely to finish putting paving slabs back over the armoured cable that's been installed (i.e. OpenReach dig team rather than line engineers).
After those slabs are done, I expect the fault will be closed but I'll still have a 500k profile and will need to raise a new fault all over again - that fault was opened 5 weeks ago.
Results of speedtester.bt.com run just now (1pm Sun 13th March 2011):
Download speed achieved during the test was - 363 Kbps
For your connection, the acceptable range of speeds is 100-500 Kbps.
Additional Information:
Your DSL Connection Rate :576 Kbps(DOWN-STREAM), 777 Kbps(UP-STREAM)
IP Profile for your line is - 500 Kbps
The throughput of Best Efforts (BE) classes achieved during the test is - 2.46:14.86:82.95 (SBE:NBEBE)
Upload speed achieved during the test was - 638 Kbps
Additional Information:
Upstream Rate IP profile on your line is - 777 Kbps
Router web interface shows:
Rate:
576 kbs
778 kbs
Max Rate:
2621 kbs
784 kbs
Noise Margin:
16.7 dB
7.0 dB
Attenuation:
62.8 dB
35.8 dB
Output Power:
16.1 dBm
12.4 dBm
Protocol:
G.DMT2 Annex A
Channel:
Interleaved
DSLAM Vendor Information
Country: {46336} Vendor: {IFTN} Specific: {48753 }
ATM PVC:
0/38
Rate Cap:
2621 kbs
Attenuation @ 300kHz:
62.8 dB
Uncanceled Echo:
-14.8 dB
Ok
VCXO Frequency Offset:
-2.0 ppm
Ok
Final Receive Gain:
34.5 dB
Ok
Impulse Noise Comp. Tones:
0
Ok
Excessive Impulse Noise:
0
Ok
I hope that's the information that someone might need to help me at least get 1Mbps back on my line.
Regards,
BKHi Bk1
Welcome to the Community.
Send me an email to the link in the about me section of my profile.
I can have this looked into for you further.
Cheers
Stuart
BTCare Community Mod
If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-) -
New line character not read..
Hi guys;
i'm writing a jsp application that has to write into a file...
the file has to be in the form of multiple lines of the form : login=password
i did the following:
String s=new String("");
String s2=new String("");
BufferedReader in = new BufferedReader(new FileReader(
"c:\\myflash\\myfile.txt"));
while((s=in.readLine())!= null){
s2 +=s+'\n';
s2 +=login+"="+password;
in.close();
PrintWriter outer = new PrintWriter(new BufferedWriter(new FileWriter(
"c:\\myflash\\myfile.txt")));
outer.println(s2);
outer.close();
the problem is the following: when i run the applications the data are written in the file without new line ...
it seems that the '\n' character did not got read!!
I don' know what's the problem!
please help!...are you testing this on Windows? Are you determining that the newline chars aren't there by opening the file in another program? Most Windows programs will not recognize the \n by itself. It needs the \r\n combination. You might want to use System.getProperty("line.separator"), which will return the correct OS-specific line separator character(s).
-
Hello,
I try to insert a new lines after a model line with a sed command in a script ,like :
Before :
### model line#####
After :
### model line#####
new line 1
new line 2
I try something like this, but the newlinecharacter in not good understand :
sed -e"s/### model line#####/### model line#####\nnew line 1\nnew line 2/g" my.cnf
Some know how do that ??
Thxto append newlines using sed, do not do it on cmd-line, because the shell will interprete the script,
so put in 'sedcmd' something like:
#-------begin
/muster/a\
linea
lineb
linec
#---------end, note the last blanc line, is NEEDED!
this also works for 'i' insert
to change/delete blanc lines, you need to know what is a blanc line
sed 's/^$/:/g'
will replace blanc lines by ':'
sed '/^$/d'
will delete blanc lines
finally sed has troubles w/ special characters, but it is NOT a bug!
kind regards, jms -
Displaying Check boxes in the Report Output
hi Folks,
I need to dispay check boxes for every line item in my report output, the user can select particular line item by clicking the check box. and if the user click one button on the report, the corresponding dunning form should be generated. How can i acheive this. is displaying check boxes possible in normal reports or we need to go for ALV. please help me regarding this.
thnx,
santosh.We can do it with the normal report also.Create a charecter field and while the field to the screnn
write :/ field as check box.
this will create acheck box in the output
Maybe you are looking for
-
How do you add a user defined page size for a "standard" user
I have been trying to add a User Defined Page size in the Adobe PDF Properties with a "Standard" AD account. When I click add/modify, no error shows up on the screen but the page size does not show up in the drop down menu. The only accounts that c
-
Can I make a call on an iPad?
Can I make a call from an iPad?
-
AIR Debug Launcher Does NOTHING in cs5?
Hi All, Running Flash cs5, windows 7 64bit I go to test my movie in Flash cs5 no actionscript errors etc.. but it just hangs.. air debug laucher doesn't launch.. nothing happens AT ALL.. as documented here: http://www.kirupa.com/forum/showthread.php?
-
When I first played my 40g ipod HP through my car stereo with a cassette adaptor it sounded great! Now when I do it it won't play loud enough to hear it. Even with the ipod volume and stereo volume cranked. What did I do wrong? Does it have something
-
I want to change the default stack value. Using "ulimit -s" is affecting only that shell, I need the changes to be permanent. Please help ASAP.