How to run a report from oracle 10g form in .csv format
dear all,
how to run a report from oracle 10g form in .csv format? i've already run in pdf & excel format.
i'm using
SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'PDF'); --for pdf
SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'SPREADSHEET'); ---for excel
Please Help..
i have already tried.
but the report show in htm or html format. that file will not save into csv. please help.
Similar Messages
-
CALL A REPORT FROM ORACLE 10G FORMS
HI,
I HAVE STARTED TO WORK WITH ORACLE DATABASE 11G AND DEVELOPER SUIT 10G.
I HAVE A REPORT THAT IT WORKS CORRECTLY WHEN I RUN IT FROM REPORT DEVELOPER.
BUT WHEN I WANT TO CALL IT FROM A FORM, IT DOESN'T WORK.
IN ORACLE DEVELOPER 6I, I USE "RUN_PRODUCT" COMMAND AND IT WORKS WELL ,BUT IN
DEVELOPER SUIT 10G I HAVE TO USE "RUN_REPORT_OBJECT" AND I DON'T KNOW HOW.
WHEN I COMPILE MY CODES THERE IS NO ERROR ,BUT WHEN I RUN IT, IT SHOWS ME SOME ERRORS .
THIS IS MY CODES FROM ORACLE HELP :
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := FIND_REPORT_OBJECT('D:\TESTPROJ\REPORT1.JSP');
v_rep := RUN_REPORT_OBJECT(repid);
END;
IT SHOWS ME THIS ERROR : FRM-41219 .CANNOT FIND REPORT. INVALID ID.
AND THEN : FRM-40738. ARGUMENT 1 TO BUILTIN RUN_REPORT_OBJECT CANNOT BE NULL;
PLEASE HELP ME TO SOLVE THIS PROBLEM
THANKFUL
MAHSAManu,
I added my report to Form-Navigator and I changed it's name to REP1.
I added all you codes to When-Button-Press event like this :
DECLARE
RO_Report_ID REPORT_OBJECT;
Str_Report_Server_Job VARCHAR2(100);
Str_Job_ID VARCHAR2(100);
Str_URL VARCHAR2(100);
PL_ID PARAMLIST ;
BEGIN
PL_ID := GET_PARAMETER_LIST('TEMPDATA');
IF NOT ID_NULL(PL_ID) THEN
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
RO_Report_ID := FIND_REPORT_OBJECT('REP1'); -- This is my report's name in Form-Navigator. Is it correct to put it here ?
ADD_PARAMETER(PL_ID, 'P_SELECT_CITY', TEXT_PARAMETER, :CITY); --These are my parameter in REPORT and it's Value in my FORM*
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, 'D:\projects\PROJECT_OF_1388\TestOraDev10g\TEST_REP1');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, 'Rep_faraji'); -- as you said, I put my computer name after REP_ here
Str_Report_Server_Job := RUN_REPORT_OBJECT(RO_Report_ID, PL_ID);
Str_Job_ID := SUBSTR(Str_Report_Server_Job, LENGTH('Rep_faraji') + 2, LENGTH(Str_Report_Server_Job)); -- as you said, I put my computer name after REP_ here
Str_URL := '/reports/rwservlet/getjobid' || Str_Job_ID || '?server=Rep_faraji'; -- as you said, I put my computer name after REP_ here
WEB.SHOW_DOCUMENT(Str_URL, '_SELF');
DESTROY_PARAMETER_LIST(PL_ID);
END;
But it doesn't work again, And shows this error :
FRM-41213. unable to connect to the report server Rep_faraji
Edited by: user508902 on Mar 2, 2010 2:18 AM
Edited by: user508902 on Mar 2, 2010 2:20 AM -
Calling report on oracle 10g forms
hi to all,
how can call oracle10g reports to oracle 10g forms? using a parameter..e.g: employee id.
Please i need a sample code...
note : report will not run on internet explorer.
thanks.
Edited by: baguhan on Jul 1, 2009 6:06 AMHai Baguhan,
Try this.
DECLARE
RO_Report_ID REPORT_OBJECT;
Str_Report_Server_Job VARCHAR2(100);
Str_Job_ID VARCHAR2(100);
Str_URL VARCHAR2(100);
PL_ID PARAMLIST ;
BEGIN
PL_ID := GET_PARAMETER_LIST('TEMPDATA');
IF NOT ID_NULL(PL_ID) THEN
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
RO_Report_ID := FIND_REPORT_OBJECT('REPORT_OBJ');
ADD_PARAMETER(PL_ID, 'EMP_ID', TEXT_PARAMETER, <value to EMPID parameter>);
--FOLLOWING PARAMETERS ARE MANDATORY PARAMETERS TO SET REPORT OBJECT
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, '<report_full_path>');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, <report_server_name>);
Str_Report_Server_Job := RUN_REPORT_OBJECT(RO_Report_ID, PL_ID);
Str_Job_ID := SUBSTR(Str_Report_Server_Job, LENGTH(<report_server_name>) + 2, LENGTH(Str_Report_Server_Job));
Str_URL := '/reports/rwservlet/getjobid' || Str_Job_ID || '?server=' || <report_server_name>;
WEB.SHOW_DOCUMENT(Str_URL, '_SELF');
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
END;And add a report object in the form. ( in the above code, its REPORT_OBJ ).
Regards,
Manu.
If this answer is helpful or correct, please mark it. Thanks. -
Unable to run a report from developer 10g
Hi, i can´t run a report from developer 10g when i run the report with the web icon appears the message
Thu Jan 07 14:44:29 CST 2010
javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
at oracle.reports.jsp.ReportTag.doStartTag(ReportTag.java:470)
at sif10r4400F202316.jspService(_sif10r4400F202316.java:50)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:575)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:311)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:834)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
my report server is up, my servlet is ok too and REPORT_PATH environment is ok.
RegardsHi, i can´t run a report from developer 10g when i run the report with the web icon appears the message
Thu Jan 07 14:44:29 CST 2010
javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
at oracle.reports.jsp.ReportTag.doStartTag(ReportTag.java:470)
at sif10r4400F202316.jspService(_sif10r4400F202316.java:50)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:575)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:311)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:834)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
my report server is up, my servlet is ok too and REPORT_PATH environment is ok.
Regards -
How to run a report from UIX ?
Hi, I need to run my reports made in Oracle Reports Builder, in Web Style. All reports has parameters, then I buid a UIX page with some MessageChoice to select values for the parameters, and I need to invoke the report when a click the submit button. How I can call this JSP, because to work I need to invoke a URL not the JSP code. Example:
http://localhost:8889/reports/myreport.jsp?cia=001
Thanks.Rodrigo,
We figured out the way to run the reports from UIX parameter forms. It will take a lot of explainig though. If you are interested, please email me at gorbunov @ pacbell . net and I'll send you the example.
Regards,
igor -
How to invoke crystal reports from Oracle forms 11g R2 along with passing p
How to invoke crystal reports from Oracle forms 11g R2 along with passing parameter to it.
how to pass parameters to crystal report, please help.how to pass parameters to crystal report, please help.This would entirely depend on crystal reports and you might find informations on crystal reports related communities more likely...I for one have seen crystal reports the last time about 12 years ago. And even back then I simply acknowledged it's existence instead of working with it.
Maybe crystal reports can be invoked via a URL call which would make it simple as you'd need simply build an URL and show the report using web.show_document. But that's pure speculation. Also you might not be the first with this requirement, so the solution to your problem might be right under your nose and just a little google search away ;)
cheers -
How to run batch file from oracle forms 9i
Hi everyone.
i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
i have made a batch file which run the sql loader and transfer my data to database.
How to run batch file from oracle forms 9i.
when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
here is my code
Begin
HOST('C:\temp\batchfile.bat');
message('done');
end;
Thanks in advance
regards
sajidthis is my log file, when i run manually.
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: file_to_upload.ctl
There are 2 data files:
Data File: sk.csv
Bad File: sk.bad
Discard File: none specified
(Allow all discards)
Data File: sk1.csv
Bad File: sk1.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table KHAN, loaded from every logical record.
Insert option in effect for this table: APPEND
Column Name Position Len Term Encl Datatype
SR FIRST * , O(") CHARACTER
DATES NEXT * , O(") CHARACTER
AGENT NEXT * , O(") CHARACTER
COUNTRY NEXT * , O(") CHARACTER
TRANSACTIONS NEXT * , O(") CHARACTER
PKR NEXT * , O(") CHARACTER
USD NEXT * , O(") CHARACTER
BANK NEXT * , O(") CHARACTER
Table KHAN:
11088 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 132096 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 11088
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Thu Jul 01 23:27:53 2010
Run ended on Thu Jul 01 23:27:54 2010
Elapsed time was: 00:00:00.63
CPU time was: 00:00:00.17 -
Need to download a tool to make reports from Oracle 10g or Oracle 11R1
Hello,
need to download a tool to make reports from Oracle 10g or Oracle 11Release 1,
but not too well from where to download it, my system is 32 bits
thanksAll Oracle product downloads are available from http://download.oracle.com or http://edelivery.oracle.com
Before going to the download site, you may want to review the available tools. Go to http://otn.oracle.com and check out the white papers and info under Products : Developer Tools -
While running the report from oracle apps
Hi,
While running the report from oracle apps i am getting the below error.
First time when i ran it it works fine in the second time it is giving the below error like
MSG-00001: After SRWINIT
MSG-01000: Label sets failed
MSG-01000: ORA-06502: PL/SQL: numeric or value error
REP-1419: 'beforereport': PL/SQL program aborted
Can anyone please give your kind advice on it.
Thanks
Surya...what is the application version ?
is it seeded report ? or customized
regards -
How to Run a Report from Desktop in Oracle 10g without using Web
Hi Friends,
I want to run a report from desktop (report which is developed in oracle report developer 10g), for that i have created shortcut. But when i double click on that shortcut it gives me followig error
"Report name, database connection, and reports server name (unless using local runtime, i.e. reports server call is local) properties must be specified for successful report run"
the path which is defined in the shortcut of report is as follow
D:\DevSuiteHome_1\BIN\rwsxu.exe rcptreg_dt userid/password@ORC
pls help me to sort out the problem.
Thanks & Regards.Hello,
You can use rwrun. Since 9.0.2 , it is no more possible to DISPLAY the output on the screen , but you can generate a file (HTML , PDF , RTF , ..) and then open the file generated.
EX: rwrun report=c:\temp\myrep.rdf destype=file desname=c:\temp\myrep.pdf desformat=pdf userid=scott/tiger@mydb P_1=param1_value ...
Regards -
How to run a Report of version 10g in Oracle Report Builder 6i
Hi,
I have a report of version r10g . I want to run this report in oracle reports 6i version.
Could any body help me out.
Please any body give the solution urgently.
Thanx,
samHello,
I have a report of version r10g . I want to run this report in oracle reports 6i version.BTW what is the reason to run report in report builder? If you want to see the report preview in report builder as you normally see in report 6i you can use Ctrl+Shift+R to run report in report builder 10g.
-Ammad -
How to run unix command from Oracle Foms 10g
OS: UNIX Solaries, Oracle Application Server 10g
To run shell script from Oracle Forms, I used the following host('/bin/bash /u01/compile.sh') and it works well
Now, I need to run unix command something like
host('mv form1.fmx FORM1.FMX') but it's not working
I tried to append the command "mv form1.fmx FORM1.FMX" to the compile.sh shell script but also it's not working although the rest lines of the shell script is running well
Edited by: slamonty on Aug 23, 2012 12:36 AMYes, Thank you so much, it works well as follow
$ /bin/mv /u01/oracle/runtime/test/form1.fmx /u01/oracle/runtime/test/FORM1.FMX Edited by: slamonty on Aug 23, 2012 9:59 AM
Edited by: slamonty on Aug 23, 2012 11:14 AM -
hi,
I am trying to run a report from a WCF service application, and then render it in PDF Format to a caller WPF application. But I cant get it! In more detail, this is what my app should do
1. from WPF, call a web service procedure, pass a report name, report path and parameters. Report is store at the same server where Web Service is installed
2. WCF procedure loads report, set parameters, retrieve data from DB and renders it as an array of bytes
3. WPF gets the array, save it into a PDF file, then open it.
this is the code of the WCF procedure.
Function DownloadCRReport(codEnte As String, connString As String, reportDir As String, reportName As String, Parameters As Dictionary(Of String, Object)) As Byte() Implements IGesiService.DownloadCRReport
Try
Dim bytes As Byte()
Dim infile As BinaryReader
Dim fs As FileStream
Dim rep As New ReportDocument
Dim RepAddress As String
logPath = reportDir & "log\"
sb = New StringBuilder()
timestamp = Now.Year.ToString & Now.Month.ToString & Now.Day.ToString & Now.Hour.ToString & Now.Minute.ToString & Now.Second.ToString
logFileName = timestamp & "_" & reportName & ".txt"
logFile = New StreamWriter(logPath & logFileName, FileMode.CreateNew)
logFile.WriteLine("----
Date and time: " & Now.ToString & " -
If My.Computer.FileSystem.FileExists(reportDir & reportName & ".rpt") = False Then
Throw New Exception("file RPT non found in: " & reportDir)
End If
RepAddress = reportDir & reportName & ".rpt"
logFile.WriteLine("rep address: " & RepAddress)
rep.Load(RepAddress, OpenReportMethod.OpenReportByDefault)
logFile.WriteLine("load rep")
If rep.DataSourceConnections.Count > 0 Then
rep.DataSourceConnections.Item(0).SetLogon("usr", "pwd")
logFile.WriteLine("data source connection")
End If
For Each i In Parameters
rep.SetParameterValue(i.Key, i.Value)
logFile.WriteLine("param: " & i.Key & " - " & i.Value)
Next
Try
fs = rep.ExportToStream(ExportFormatType.PortableDocFormat)
logFile.WriteLine("export to stream")
infile = New BinaryReader(fs)
logFile.WriteLine("created binaryreader")
bytes = infile.ReadBytes(CInt(fs.Length))
logFile.WriteLine("render pdf. fine")
logFile.Close()
Return bytes
Catch ex As Exception
logFile.WriteLine("vbCrLf & ex.Message & vbCrLf & ex.InnerException.Message)
logFile.Close()
Return Nothing
End Try
Catch ex As Exception
logFile.WriteLine("vbCrLf & ex.Message & "-" & vbCrLf & ex.InnerException.Message)
logFile.Close()
Return Nothing
End Try
End Function
I detected that error occurs on rep.ExportToStream(ExportFormatType.PortableDocFormat). I should point out that the same procedure works under WPF application. In the WCF server I installed CR Runtime engine for .NET framework (13.0.9.1312) and CR version for Microsoft Visual Studio (same version). Moreover, all DB operations are stored into the report, so I should not pass any dataset, just parameters.
Anyway, just to begin, I tried to call a simple report with just two string parameters and no queries, but I alwais get error ("An exception of type 'System.NullReferenceException' occurred in MyApp... Object reference not set to an instance of an object)!
How can I make it work? thanks for helphi Ludek,
Im trying to change DB connection info at runtime for all of the report tables. this is the code I used in my Web Service
Function DownloadCRReport(...)
If rep.DataSourceConnections.Count > 0 Then
Dim conn As New ConnectionInfo
Dim tabLogon As TableLogOnInfo
conn.ServerName = "10.10.15.90" 'IP address of DB server
conn.DatabaseName = "MyDB" 'Database name as set in TNSNAMES.ORA
conn.UserID = "newuser"
conn.Password = "newpwd"
For Each t As Table In rep.Database.Tables
tabLogon = t.LogOnInfo
tabLogon.ConnectionInfo = conn
t.ApplyLogOnInfo(tabLogon)
logFile.WriteLine("changed logon tab. " & t.Name)
Next
rep.Refresh()
logFile.WriteLine("changed data source connection")
End If
'set parameters
If Not IsNothing(Parameters) Then
For Each i In Parameters
rep.SetParameterValue(i.Key, i.Value)
logFile.WriteLine("set parameter" & i.Key & " - " & i.Value)
Next
End If
fs = rep.ExportToStream(ExportFormatType.PortableDocFormat)
End Function
that comes to an error on rep.ExportToStream: "Unable to access database".
Running web service in debug mode, I noticed that, after t.ApplyLogonInfo(tabLogon), the new ConnectionInfo has "password" property empty. Maybe this could cause the error, or is there some mistake in the new connectioninfo? -
How to print BIP reports from Oracle Forms?
Hi all,
I have a question in regards to printing BIP reports from Oracle Forms... We are aiming for a server installation of BIP with integration to Oracle Forms using SSO to handle security. We use Forms built-in web.show_document to render and view the report in PDF/Excel etc... We would like to by pass the viewing and print some of these reports directly to the printer.
Any idea/suggestions how we can go about this?
Thanks in advance for your time.
YahyaYahya,
via HTTP it's not possible to send a report directly to the printer. You had to go via the Scheduler, which is able to do that. With the WebService API you can call a report with the Scheduler and Execute Immediate.
Regards
Rainer -
How to run ADDM report from client?
Hi,
I want to run ADDM report from the client and get the report in my machine?/
in other words while connecting to sqlplus from my machine if i invoke @?/rdbms/admin/ >> it selects local oracle home..
Any suggestion to set as if run the remote sql's from sqlplus?/
Thanks,
RamanYou can run the individual built-in packages from SQL*Plus from a client.
You can also open a browser session to the OEM Grid Server if you know its fully qualified host name or IP Address on your network.
Be sure, however, that you are licensed to do so. ADDM requires the diagnostic pack license.
Maybe you are looking for
-
Error while opening Fiori app on iPad
I keep getting "Service XXXX failed. Contact your system administrator. Cannot call service with URL: /sap/opu/....." error on the iPad - both in the browser and the Fiori client. I am able to login to the launch pad and also see the apps, the error
-
Report containing 15 sub reports crashing - Crystal Reports 2008
I am using Crystal report 2008 with all latest service packs applied. I have more then 20 different reports wich work absolutely fine and never crash. One of my report contains 15 sub reports since its bringing data from 15 different queries. This co
-
How do i set up iMessage to view pictures in my messages?
I can't see any images in my iMessage messages. What do I need to do to fix this?
-
Hi Experts, I want to do reports for FI. Am trying to fetch foreign currency exchange rate in BI. I can find this in R/3 in tcode FAGL_FC_VAL. but i want to do in BI.can you please help me in tracing those for which cube or ods will serve me the purp
-
New line delayed due to debt?
I've emailed the main BT address but it says they're busy and it might take 10 days to reply so I'm trying this forum! I ordered a new line for my new flat on August 22nd. A few days later I got a letter telling me to contact what I figured was the c