BO v5.1 - creating a report from an oracle stored procedure
Post Author: newrochelle
CA Forum: Publishing
hi to all,
im using BO 5.1 and i need to create a document from an oracle stored procedure that have only one IN parameter and ten OUT parameters.
Creating the new report I selected the database connection then I choose the stored procedure name from the list, I inserted the value for the IN parameter and finally I click on Run button.
I got the following error message:
ORA-06550: line 1, column 38: :PLS-00103: Encountered the symbol
"," when expecting one of the following: : : ( - + case mod
new not null others <an identifier> : <a double-quoted
delimited-identifier> <a bind variable> avg : count current
exists max min prior sql stddev sum variance : execute forall
merge time timestamp interval date : <a string literal with
character set specification> : <a number> <a single-quoted SQL
string> pipe : <an alternatively-quoted string literal with
character set specification> : <an alternatively-q :-6550
it seems to be caused by the OUT parameters!
i leaved them without any value.
it's the first time that I used a stored procedure to create a BO report, but I think the OUT parameters are needed to do that, otherwise what data will be presented in the report???
can you help me?
please answear me ASAP.
Thank's in advance
Regards
Andrea
Post Author: synapsevampire
CA Forum: Publishing
Try posting in a BO forum, this is Crystal Reports.
-k
Similar Messages
-
Call a UNIX shell script from an oracle stored procedure
We need to call a UNIX shell script from an oracle stored procedure
i.e. the control should come back to the procedure once the script completes. Can any body help to achieve this ?There are various ways in achieving this.
For Example, you can call a PRO*C-Library residing on the database server.
This requires a PL/SQL library to be generated and some changes to the Listener configuration.
It is also possible to implement a java procedure on the database being invoked by a PL/SQL wrapper class.
In this way (and if used right) there is also granularity regarding the filestructure permissions given and it may be called during a Forms or other PL/SQL session.
The article below explains a more generic approach how to invoke shell commands from within an Oracle Instance.
Be careful with this, because it really works ;)
Refer to :
http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
Message was edited by:
user434854 -
Calling a java class in my oracle database from a oracle stored procedure
my oracle stored procedure is:
create or replace
PROCEDURE openpdffile
AS LANGUAGE JAVA
NAME 'pdfopenbook.mainbook()';
it is valid and so is this java class;
import java.sql.*;
import oracle.jdbc.*;
public class pdfopenbook //class pdfopen
public static void mainbook(String args[]) //main function
try //try statement
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "c:\\temp
final_book.pdf");
// Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "sol.exe");
} catch (Exception e) //catch any exceptions here
System.out.println("Error" + e ); //print the error
but i get the error:
onnecting to the database caprs.
ORA-29531: no method mainbook in class pdfopenbook
ORA-06512: at "CAPRS.OPENPDFFILE", line 1
ORA-06512: at line 2
Process exited.
Disconnecting from the database caprs.
it says there is no mainbook method but there is, what am i doing wrong??
Thanks,
DougPass String[] as an argument to mainbook():
create or replace PROCEDURE openpdffile
AS LANGUAGE JAVA
NAME 'pdfopenbook.mainbook(java.lang.String[])';Have you posted it on the Database forum?
Regards,
Nick -
Calling a java class from an oracle stored procedure
my oracle stored procedure is:
create or replace
PROCEDURE openpdffile
AS LANGUAGE JAVA
NAME 'pdfopenbook.mainbook()';
it is valid and so is this java class;
import java.sql.*;
import oracle.jdbc.*;
public class pdfopenbook //class pdfopen
public static void mainbook(String args[]) //main function
try //try statement
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "c:\\temp\\final_book.pdf");
// Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "sol.exe");
} catch (Exception e) //catch any exceptions here
System.out.println("Error" + e ); //print the error
but i get the error:
onnecting to the database caprs.
ORA-29531: no method mainbook in class pdfopenbook
ORA-06512: at "CAPRS.OPENPDFFILE", line 1
ORA-06512: at line 2
Process exited.
Disconnecting from the database caprs.
it says there is no mainbook method but there is, what am i doing wrong??
Thanks,
Doughttp://wiki.answers.com/Q/Can_you_call_a_java_function_from_an_oracle_stored_procedure
-
ADO memory leak when getting Recordset from an Oracle stored procedure?
I am programming in C++ (VC 6) and using ADO 2.7 to
access Oracle 9i database. My connection string looks
like this:
Provider=MSDAORA.1;Persist Security Info=True;User ID=scott;Password=tiger;Data Source=blahblah
I have Oracle stored procedure that returns data in a
REF CURSOR output parameter. Since the stored procedure
takes input parameters, I prepare a Command object with
Parameters initialized and attached to it. I use the
Recordset Open method to execute the call. This approach
works because I get correct data back from the call in
the Recordset, but the problem is when I do this in a
infinite loop and watch the process in Windows Taks
Manager, I see 4k or 8k memory delta all the time and
the Peak Memory Usage of the process keeping going up.
I hope someone knows something in this scenario and points
me to the right direction.
Thanks, please see the following code for specifics.
HRESULT CallSP3Params(VARIANT vp1, VARIANT vp2, int spretcode, LPDISPATCH ppRSet, char *pCmdLine)
_RecordsetPtr pRs;
_CommandPtr pCmd;
_ParameterPtr paramVProfiler[3];
bstrt strMissing(L"");
*ppRSet = NULL;
variantt ErrConn;
ErrConn.vt = VT_ERROR;
ErrConn.scode = DISP_E_PARAMNOTFOUND;
try {
//Create instance of command object
pCmd.CreateInstance(__uuidof(Command));
pRs.CreateInstance(__uuidof(Recordset));
if ( vp1.vt == VT_BSTR ) {
paramVProfiler[0] = pCmd->CreateParameter("P1",adVarChar,adParamInput,SysStringLen(vp1.bstrVal) + 10,strMissing );
paramVProfiler[0]->Value = vp1;
else if ( vp1.vt == VT_I4 )
paramVProfiler[0] = pCmd->CreateParameter("P1",adNumeric,adParamInput,15,vp1);
else
TESTHR( PARAMETER_OPERATION_ERROR );
pCmd->Parameters->Append(paramVProfiler[0]);
if ( vp2.vt == VT_BSTR ) {
paramVProfiler[1] = pCmd->CreateParameter("P2",adVarChar,adParamInput,SysStringLen(vp2.bstrVal) + 10,strMissing );
paramVProfiler[1]->Value = vp2;
else if ( vp2.vt == VT_I4 )
paramVProfiler[1] = pCmd->CreateParameter("P2",adNumeric,adParamInput,15,vp2);
else
TESTHR( PARAMETER_OPERATION_ERROR );
pCmd->Parameters->Append(paramVProfiler[1]);
paramVProfiler[2] = pCmd->CreateParameter("RETCODE",adNumeric,adParamOutput,10);
pCmd->Parameters->Append(paramVProfiler[2]);
//Catch COM errors
catch( comerror &e) {
try {
// I manage my connection through this little C++ class of my own
CCUsage myconnection( &Connectionkeeper[0] );
//Set the active connection property of command object to open connection
pCmd->ActiveConnection = myconnection.m_conn;
//The command type is text
pCmd->CommandType = adCmdText;
//Set command text to call the stored procedure
pCmd->CommandText = pCmdLine;
//Open the Recordset to get result
pRs->Open( variantt((IDispatch *)pCmd,true), ErrConn, adOpenStatic, adLockReadOnly, adOptionUnspecified );
//Disconnect the command object
pCmd->PutRefActiveConnection( NULL );
if ( GetSPRetCode( pCmd, "RETCODE", spretcode ) != S_OK )
TESTHR(DB_OBJECT_OPERATION_ERROR);
// pRs->QueryInterface(IID_IDispatch, (void**) ppRSet);
// I return the Recordset by calling QueryInterface, but even without that, closing the Recordset right here still shows memory leak.
pRs->Close( );
pRs = NULL;
//Catch COM errors
catch (_com_error e) {
return S_OK;
}Whenever large numbers of BSTRs are allocated and freed quickly the process memory will continue to climb towards a stabalizing value. BSTRs are not freed until the system frees them. You can see this by making many calls allocating and freeing BSTRs, memory will climb, but when you stop for a while the gargage collection of the sys strings will take place. I've done much research to see that a server doing many queries very rapidly is not leaking memory, but out pacing the garbage collection, it will stabilize and when the process has some "rest time" the processes memory usage will decline.
In my research a suspected memory leak was not one. -
Creating XML report using PL/SQL Stored Procedure
Hi Friends,
I am working on an xml report with the xml source as PL/SQL Stored Procedure.
I am referring the exercise shown in the following link to understand the process:
http://orclapp.blogspot.com/2012/02/developing-xml-publisher-report-using.html
In the example shown in the above link I could not understand the following:
1) In the following procedure, the out parameter 'retcode' is not used at all.
What is the importance of this parameter.
PROCEDURE REPORT (errbuf OUT VARCHAR2, retcode OUT VARCHAR2, p_product_id IN NUMBER)
2) After the xml data is prepared and put to 'l_result' Clob variable, the following
Loop is executed. I am not able to appreciate why the following loop is required.
LOOP
EXIT WHEN l_length = l_retrieved;
IF (l_length - l_retrieved) < 32000
THEN
SELECT SUBSTR (l_result, l_retrieved + 1) INTO l_xmlstr FROM DUAL;
l_retrieved := l_length;
fnd_file.put_line (fnd_file.output, l_xmlstr);
ELSE
SELECT SUBSTR (l_result, l_retrieved + 1, l_offset)
INTO l_xmlstr
FROM DUAL;
l_retrieved := l_retrieved + l_offset;
fnd_file.put_line (fnd_file.output, l_xmlstr);
END IF;
END LOOP;
3) In the example it is not explained how the concurrent program gets the xml data?
I assume it is written to a file using the following line of code:
fnd_file.put_line (fnd_file.output, l_xmlstr);
I would appreciate if anyone can throw some light into my above queries so that I can understand the process clearly.
Thanks & Regards
HawkerHi 32000 in the code is a 'safe' size smaller than the max available 32767, the loops purpose is to move through the entire thing in chunks that will be manageable in the limits of the data type.
Btw; if you are in Oracle e-business suite then you can also use Oracle reports very simply to create XML output.
If you have reports developer all you need to do is put raw sql (without any 'artifice' to create XML) in the report SQL and then set the reports output to XML in the program definition in Oracle e-business.
best regards,
Robert. -
Need Example on calling a unix shell script from oracle stored procedure
Hi
Can anybody give example on how to call unix shell script from an Oracle stored procedure. Please give a small example on how to do this .I need this urgently please.
Have a nice time.
Thanks & Regards
JogeshIf you are on 10g you can also use DBMS_SCHEDULER. See Re: Excute Unix command Using PL SQL
-
How to create a Report from WebDympro
Hi All,
I just want to know how I can create a report from WebDynpro? I need to pull data from R/3 using a RFC function module, but I don't know if it exists a software to create reports.
Thanks in advance
Alexis RamirezHi Rich,
Even i had a similar kind of problem. I wanted to fetch data from BI through the XMLA Connector which are created in Query Designer and then i wanted to fetch these fields and rearrange them and put it in a report format by colouring certain fields. Can the same can be done in WebDynpro. -
How can I create a Report from a SWT-Application?
Post Author: mkoch
CA Forum: JAVA
I'm a Developer and new to Crystal Reports and I have the job to create a Report from a SWT-Application.The report-files ( *.rpt) were created with Crystal Reports 10 or 11.> I'm not sure but I have access to a machine where Crystal Reports 10 Developer an Crystal Reports 11 Runtime are installed.Can anybody describe in detail how I can start the creation of a report from my Java-Application?> What libraries are needed, where can I get them and so on.I saw in the CR10-Setup that there is a Java-feature - but unfortunately this is not installed on my test-machine.--> Is it necessary to install this feature or can I get this files on businessobjects.com?Is it possible to start the report-creation from command-line?I saw a Java-example on the internet which uses Report.exe - but I haven't found this on my machine.I hope, that somebody can help me.GreetingsMarkusInv. #
Item
Sale Price
Lisa
Oct Sold 12
Oct Sold 12-2
Oct Sold 12-3
149
Vase Lidded
25
201
Bird
7
7
202
Bird
7
203
Bird
7
204
Bird
7
7
205
Bird
7
7
206
Bird
7
7
207
Bird
7
207
Bird
7
7
208
Bird
7
7
209
Bird
7
7
This is my very simple inventory. On previous program I could sort by those items that did not have any figure in the row across. Then I could print a report of open inventory. Such as 149 Lidded Vase has not sales amount in the four colums across, thus it is open inventory. How can I capture all those items in one report? -
I'm trying to create a report from an Excel spreadsheet and am having some issues with how Crystal is reading in the data. I have 7 fields that are all the same, I want them to be Numeric fields. However, when I import the Excel sheet as the data source, 4/7 of the fields import as string fields into Crystal. At first I didn't think this would be an issue, but some of the fields, and it doesn't seem to be consistently the "string" only or the "numeric" only fields, do not seem to be printing to the report at all - the space where they should be ends up blank. I have gone back to the Excel sheet several times to change the cell format to Numeric, but that has not helped. I also tried changing the format in Crystal, using ToNumeric(fieldname) or ToText(fieldname), and neither of those functions seem to work either.
Has anyone had this issue before or know how to fix it?Hi Jeremy,
Which Crystal Report version are you using?
Have you applied any service pack for Crystal Reports?
Which Operating system are you using?
Is the issue is with all the report or single report?
For testing purpose:
-Create new excell sheet with two columns one is numeric and other one string.
-Create report using thie excell sheet.
-Preview report and export.
-Now print report
Are you getting same results?
Have you tried to print other document through that printer is it working properly.
Regards,
Shweta -
Creating a new connection when creating a report from scratch
I've searched all around but I haven't managed to find any samples or forum posts that show how to create a connection when creating a report from scratch via RCAPI. All of the code that I've found has been aimed at replacing the ConnectionInfo for an existing connection. I figured that it would work something like this:
m_crystalReport.setReportAppServer(ReportClientDocument.inprocConnectionString);
m_crystalReport.newDocument();
IConnectionInfo ci = new ConnectionInfo();
PropertyBag propertyBag = new PropertyBag();
propertyBag.put("Use JDBC", true);
propertyBag.put("Connection URL", "jdbc:jtds:sqlserver://localhost:1433;databaseName=" + DB_NAME);
propertyBag.put("Database Class Name", "net.sourceforge.jtds.jdbc.Driver");
propertyBag.put("Database DLL", "crdb_jdbc.dll");
ci.setAttributes(propertyBag);
m_connection = new Connection();
m_connection.setConnectionInfo(ci);
m_connection.open();
but this produces a NullPointerException within Connection.open(). If I leave the connection closed but add it to the report via DatabaseController.addConnection() then I just get the exception later on when I try to add tables using the connection.
Can anyone give me any pointers please?
Thanks,
Rich.Just in case anyone else runs into this, I managed to fix it by leaving the connection closed and then using the connection info instead of the connection when creating tables, eg:
ITable t = new Table();
t.setAlias(v.getAlias());
t.setName(v.getView().getName());
t.setConnectionInfo(m_connectionInfo);
getDatabaseController().addTable(t, null); -
Create a report from scratch, add Table and Datasource Problem
Hi,
I'm using the latest Crystal Reports Runtime supplied for eclipse.
I want to create a report from scratch, add a Table and then add a ArrayList of Pojos as the Datasource.
But unfortunately depending on the ConnectionInfo I supply to the Table I get different errors.
I looked through the samples and see that I have to supply properties
like
"Database DLL", "crdb_javabeans.dll" and ConnectionInfo.setUserName("");
ConnectionInfo.setPassword(null)
I looked through the forums and find different set of properties.
Actually because I am just working with Pojos I would have thougth that something like the following
would be sufficient:
ReportClientDocument doc = new ReportClientDocument();
doc.setReportAppServer(ReportClientDocument.inprocConnectionString);
doc.newDocument();
Table table = new Table();
table.setAlias("reportTable");
table.setName("reportTable");
doc.getDatabaseController().addTable(oTable, null);
doc.getDatabaseController().setDataSource(myCoolection, myClass, "reportTable", "reportTable");
So could someone tell me the right/minimum Set of Properties to make a Table get connected to Pojos?
Edited by: jack mann on Aug 31, 2010 3:25 PMWith XI Release 2, you can come quite close to creating from scratch:
http://technicalsupport.businessobjects.com/KanisaSupportSite
/search.do?cmd=displayKC&docType=kc&externalId=5074668
You need Service Pack 2:
http://support.businessobjects.com/downloads
/service_packs/crystal_reports_en.asp
Sincerely,
Ted Ueda -
Problems in create graphical report from Oracle FSG xml output using BIP
We are trying to create graphical reports from Oracle Financial Statement Generator (FSG) xml output. I personally have extensive exposure working with XML (BI) Publisher but until recently I have never tried to use the BIP charting wizard to create graphical reports from FSG xml output out of EBS 11i/R12.
I created an SR with Oracle but they had to create an enhancement request for this issue. Does anyone know or have any idea on how we can accomplish this. The charting wizard pops up but the xml tags available do not make any sense.
If anybody has any idea please send me an email at [email protected]
Thanks,
LeoTry some thing like following
http://oraclebizint.wordpress.com/2008/03/10/oracle-bi-ee-101332-sending-reports-to-non-obi-users-delivery-manager-api-of-bi-publisher/ -
Error while creating a report that uses Oracle OCI JDBC connectivity
Please let me know why my CR and LF characters are removed from my forum posting *****
Hi,
I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip". I have successfully created a JDBC OCI connection.
The connection parameters are given below:
URL: jdbc:oracle:oci8:@xe
Database: xe
username: <userName>
password: <password>
I have tested the above connection in Data source Explorer and it works fine!!!
But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here? Any help is highly appreciated.
com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks
Karthik
Edited by: KARTHIK1 on Oct 14, 2009 9:38 PMHi Ted,
Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI. It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
1) Can you please let me know if there is a way to do this?
2) Will it allow data sources using native database driver?
3) If so, can I use JRC to create these reports from a desktop java program?
Thanks & Regards
Karthik
Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM -
Running a report from a pl/sql procedure
I'm trying to execute a report from a oracle procedure using UTL_HTTP.request and I keep getting a 'User-Defined Exception' error. Can anyone see what I'm doing wrong or have any other suggestions what might be wrong? Using Reports6i and Oracle 8.1.7. When I run the report directly from the browser to the printer it runs perfectly.
create or replace procedure p_test
v_ret varchar2(4000);
v_url varchar2(2000);
begin
v_url:= 'http://webserver:80/dev60cgi/rwcgi60?server=Rep-server-name+report=C:/report_loation.RDF+DESTYPE=printer+Desname=printer_name+userid=userid/password@db';
v_ret := UTL_HTTP.request(v_url);
end p_test;Cheryl, try replacing the ":" in your URL with the "escaped" version of the colon character instead: "%3a". (Thus your URL would read
"...report=C%3a/report_location...".) Also, be sure that any other spaces in the URL are passed as either "+" or "%20".
UTL_HTTP.request is much more sensitive to reserved characters on the URL than most browsers are (especially IE).
- Bill
Maybe you are looking for
-
How can I delete all of the old MobileMe items on my iMac which is causing me a bunch of problems when I want to use iPhoto to send pictures. it reverts back to my old MobileMe info and hangs up or gets to the wrong people who have my old mobileMe em
-
The instructions for downloading Adobe flash reader state that a yellow bar will appear int he tool bars and just click allow. No yellow bar appeared so I could not figure out how to download the program. How do I allow the program to be downloaded?
-
Active/Standby Failover with pair of 5510s and redundant L2 links
Hi I just got two ASA5510-SEC-BUN-K9 and I'm wondering is it possible to implement an Active/Standby Failover configuration (Routed mode) with two ASA5510 and redundant pair of switches from both inside and outside interfaces? In other words, I would
-
Safari 7.0/Maverick: Crash
Bug report Process: Safari [405] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 7.0 (9537.71) Build Info: WebBrowser-7537071000000000~3 Code Type: X86-64 (Native)
-
Free download of Forms and Reports 6i patchset 13 (6.0.8.22)
From where can I download the patchset 13 of Forms 6i on Windows XP ? Is there any free download? can you please give me the link for download?