How to use a stored procedure in oracle reports
How to use a stored procedure in oracle reports
Dear,
In report triggers you can write your procedure/functions or call it like
function AfterPForm return boolean is
begin
myprocedure(:mydate);
return (TRUE);
end;
Thanks
Jamil
Similar Messages
-
How to use a stored procedure as a datasource in Crystal Report for Eclipse
Hi All,
I've written a stored procedure in oracle 10g with few input parameters and one refcursor output parameter. I want to use this stored procedure as a data source for creating a report in "Crystal Report For Eclipse 3.6.0".
When I tried to add this stored procedure to the report using the connection explorer, I don't see any option to do this. But when I try to add any table, it shows options like "Add to the current report"....
Can anybody assist me how to use a stored procedure as a data source in "Crystal Report For Eclipse"?
Which driver should I use to connect to the oracle database? I tried using JDBC Driver for Oracle.
Thanks in advance.Did you solve your problem? How did you do?
-
How to create java stored procedure from oracle(Dastageer)
how to create java stored procedure from oracle-please help me to create the procedure.
Hi,
This forum is exclusively for discussions related to Sun Java Studio Creator. Please post your question in the appropriate forum.
Thanks,
RK. -
How to use the Stored Procedure to update my UDF
I want to use the Stored Procedure to update my UDF U_InstokCS when the warehouse "OnHand" was changed. The UDF is display the stock by cases. I copied the query as follewing. I couldn't see any thing in the UDF after I made some transactions. Can anybody tell me why? How to continue it?
if @transaction_type in ('A','U','D') and @Object_type='64'
begin
Update OITW
Set U_InstokCS = OnHand/(Select T0.NumInBuy from [DBO].[OITM] T0
Where T0.ItemCode = @list_of_cols_val_tab_del)
Where ItemCode = @list_of_cols_val_tab_del
end
Thanks.
Ying ZhangYing,
The use of any stored procedures against the SAP Business One database is not allowed per SAP Support. There is not an instance where you can use SP's. The ONLY SP that you are allowed to use is the SBO_SP_TransactionNotification SP that comes with SAP Business One itself. You can read about the use of this SP from this article...
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf
Eddy -
How to Create a Stored Procedure in Oracle
I try to create a very simple Stored Procedure from Oracle SQL Developer, got the following error. Can someone give me some help on this? I am new on this. Thanks.
Error(4,1): PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following: := ( ; not null range default character The symbol ";" was substituted for "BEGIN" to continue.
create or replace PROCEDURE Test
AS ACCESSTYP_ID ACCESSTYP.ACCESSTYPCD%TYPE
BEGIN
SELECT ACCESSTYPCD
INTO ACCESSTYP_ID
FROM ACCESSTYP
WHERE ACCESSTYPCD = 'WWW';
END;I found out I forgot to put ";" after the declare.
How do I test it call this stored procedure from
Oracle SQL Developer.
create or replace PROCEDURE Test_VL
AS ACCESSTYP_ID
ACCESSTYP.ACCESSTYPCD%TYPE;
SELECT ACCESSTYPCD
INTO ACCESSTYP_ID
FROM ACCESSTYP
WHERE ACCESSTYPCD = 'WWW';
END;in your SQL Developer window just enclosed your procedure with a Begin ... End.
Begin
Test_VL;
End; -
How to use Parameterized Stored Procedure in OBIEE 10 g..?
Hi All,
In my rpd, to load the data in the Physical layer, I'm using a Stored Procedure (*SQL Server Stored Procedure*).
This stored procedure is using some parameters, so my intention is
1) Provide prompts for each parameter
2) Allow the user to select parameter value from the prompt
Can some one let me know if this is possible and if so how to do this.
Thanks in Advance
MithunDear,
In report triggers you can write your procedure/functions or call it like
function AfterPForm return boolean is
begin
myprocedure(:mydate);
return (TRUE);
end;
Thanks
Jamil -
How to use PDF417 Bar Code in Oracle Reports 6i
How to Use PDF417 Bar Code in Oracle 6i. One of my clients has a requirement that Customer Name and Address to be converted into PDF417.
Any help greatly appreciated.
Thanks,
PNYou will need to add this font to the system and Reports configuration files.
For adding font to the system, refer to your system specific guidelines for installing new fonts.
After you have installed this font on the system, you should be able to see the font in Reports builder font picker dropdown box. or with unix 'xlsfonts' command
For adding this font to the Reports application.
1. Modify the printer definition file ( you can get this info from uiprint.txt file for the .ppd or .hpd file used )
if the printer defination file is .ppd then look for "*Font Information" section and add the new font name there
like *Font <new_font_name> Standard '(00.1001)" Standard ROM
If hpd add the new font tfm file as
FONT= new_font_name
/tfm=new_font_tfm file.tfm
2. Copy the AFM or TFM ( these are fonts metrics files, which font vendor will provide ) into the relevant directory so the the Reports application should pick them up.
3. If necessary, make changes in the alias file (uifont.ali ) for mapping to this font. If the layout objects in your report are associated with the same font name as the new font then mapping is not required. But if the fonts for the layout objects are different then you need to map the original fonts to the new ones. Make sure that the mapping rules should be defined in the right section depending on the printer type being used. -
How to migrate MySQL stored procedure to Oracle
Hi All,
I migrated mysql 5.1.42-enterprise-gpl-advanced DB to oracle using sqldeveloper 3.1.07 tool.
DB objects migrated successfully except Stored Procedures.
I verified .sql and Out files.. Capture process not captured stored procedures SQL.
Could you please suggest, where I can verify exact error or how to fix this issue.
Thanks in advance.Hi,
The SQL*Developer version you are using is an old one and you should use the latest version available from this link -
Oracle SQL Developer
However, even the v4 version does not support the migration of MySQL stored procedures as shown in this link -
http://www.oracle.com/technetwork/developer-tools/sql-developer/supportedmigplatforms-086703.html
You will have to manually convert the MySQL stored procedures to an Oracle format, as even the 'Scratch Editor' under 'Tools - Migration' - does not have an option for MySQL conversion.
The documentation has details of the difference between MySQL and Oracle stored procedures -
Oracle® SQL Developer Supplementary Information for MySQL Migrations
in the chapter Triggers and Stored Procedures
Regards,
Mike -
How to call MSSQL stored procedure from oracle database
MSSQL and Oracle databases are linked thru ODBC link using Oracle HSODBC.
I can query MSSQL table or view from Oracle Database using standard notation for acessing remote objects schema.object@dblink_name...
Can anybody give me syntax for calling MSSQL stored procedure thru ODBC database link?
I tried syntax exec schema.stored_procedure@dblink_name but it doesn't work...i'm getting schema.stored_procedure must be declared error...
Tnx,in advance!
Dejan BoticaOracle database 10gR2.
MSSQL2000 database.
For example query:
select * from dbo.Tbl_Test@kron@dw_jamnica; works fine...
...while for example exec dbo.Test@kron@dw_jamnica;
reports error:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBO.TEST@KRON@DW_JAMNICA' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Table Tbl_Test and procedure Test exists in MSSQL instance.
Regards,
Dejan -
How to execute an stored procedure from the Report Region
Have stored procedure "LER_KRONOS_PAYCODE_HOURS_P" compiled and ready.
(previously tested)
Region Source:
DECLARE
v_SITE_ID VARCHAR2(8);
v_SDATE VARCHAR2(8);
v_EDATE VARCHAR2(8);
v_LEVEL3 VARCHAR2(60);
BEGIN
v_SITE_ID :=P4_SITES_LOV;
v_SDATE :=P4_SDATE;
v_EDATE :=P4_SEDATE;
v_LEVEL3 :=P4_LEVEL3;
EXECUTE LER_KRONOS_PAYCODE_HOURS_P(v_SITE_ID,v_SDATE,v_EDATE,v_LEVEL3);
END;
Error When run the page:
ORA-06550: line 11, column 12: PLS-00103: Encountered the symbol "LER_KRONOS_PAYCODE_HOURS_P" when expecting one of the following: := . ( @ % ; immediate The symbol ":=" was substituted for "LER_KRONOS_PAYCODE_HOURS_P" to continue.You need the execute keyword only when you run it directly from sqlplus.. that will tell sqlplus to append the keyword begin and end after the procedure call.
Example.
SQL > exec proc1 (input1);
will tell sqlplus to run it as a block.. saying
sql> Begin
proc1(input1);
end;Inside the procedure , in your code, you dont need the execute keyword.
But, why do you want to execute a procedure inside the source for a report region..? -
How to create a stored procedure and use it in Crystal reports
Hi All,
Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
Thanks in advance.If you are using MSSQL SERVER then try creating a stored procedure like this
create proc Name
select * from Table
by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
here is the syntax to create SP
Syntax
CREATE PROC [ EDURE ] procedure_name [ ; number ]
[ { @parameter data_type }
[ VARYING ] [ = default ] [ OUTPUT ]
] [ ,...n ]
[ WITH
{ RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
[ FOR REPLICATION ]
AS sql_statement [ ...n ]
Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
Regards,
Raghavendra
Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM -
Using stored procedures within Crystal Reports
Hello all,
Background Information:
I am trying to teach myself how to execute a stored procedure within Crystal Reports. This is an aspect of Crystal that my work group has not utilized before and we're trying to gather information on the subject. We use Oracle to create and execute functions and procedures all the time, but I've never tried this within Crystal.
I use the "Add Command" functionality within Crystal on most of my reports so that I can taylor the sql to the report. I find this easier to do versus using the ODBC connection to the tables and writing the code through the Crystal Reports wizard. I also frequently use functions within these sql statements that are inserted in the Add Command.
What I'm trying to achieve:
I have a report that needs to run as a "trial", and then later as a committed "run". This is for a monthly billing system. Essentially, the user will run the report as the "trial", preview the data, make any necessay corrections, and then later, run the actual billing run. Within my application, the bills are not actually marked as "billed" until they are actually "billed', if that makes sense. As a result, the "trial" report will need to mark the bills as "billed", generate the report, and then rollback the data (so that the bills are not "billed". Once the actual billing reports are ran, the same report will run, but with a "commit" at the end of the report so that the bills are now "billed".
I'm trying simple tests and failing (i.e. taking baby steps to learn what capabilities Crystal has):
I created as simple of a procedure as I can envision. This procedure inserts the word "test" in one of my fields for a provided account number. When I try to run this procedure via Crystal (via New Report ->History->My ODBC Database link->Stored Procedures), Crystal asks for the account number parameter, as it should. But I then receive the error message:
Database Connector Error: '42000:[Microsoft][ODBC driver for Oracle]Syntax error or access violation'
The existing ODBC connection has work great for years and years to retrieve data from tables, but this is the first time I've tried to utilize procedures. Can anybody help? And can anybody explain what the Stored Procedures link is supposed to do? Am I going down the right path?
thanks,
NoelHello,
Make sure the Oracle client install path is in the PATH statement. And also make sure you are using an IN/OUT cursor. CR only reads the last SELECT statement. Search the Documents area on how to create a Stored Procedure.
Also, if you are using CR XI ( 11.0 ) then upgrade to CR XI R2 and apply all service packs ( SP 6 ). Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
It may fix your issue also.
Thanks again
Don -
How do write a stored Procedure in PL/SQL
Hi,
I am new to this forum. I am creating a webpage using Gridview in Visual Studio 2005.
How to write a Stored procedure in Oracle using PL/SQL?
I want to write a SP for the following query :
"Select S_No, Task_ID,Last_Act_Dt,Last_Act_Tm,Status from E002 Order by S_No"
Please help.In Oracle, you normally wouldn't create a stored procedure that just does a query. Depending on what you're attempting to do on the client side, and the client libraries involved, you may be able to write a stored procedure that returns a REF CURSOR and call that. This will put some limitations on what the client can do with the results, for example. The data would be read-only and scrolling back and forth in the result set would potentially rather slow and rather expensive in terms of client memory. That makes this generally a somewhat unattractive option.
You could create a view in Oracle and just query the view in your application code. If you needed to change the query, you could then just change the view.
Justin -
ORA-04030: out of process memory when using Java Stored Procedures
Hello,
I have a problem using Java Stored Procedures in Oracle 10g.
My Java application performs http posts to a webservice and the response is parsed in order to populate some DB tables.
There is a scheduled job which calls the Java Stored Procedure every x minutes.
No matter of the 'x minutes' values - after about 160 - 200 calls I get this error:
ORA-04030: out of process memory when trying to allocate 1048620 bytes (joxp heap,f:OldSpace)
ORA-04030: out of process memory when trying to allocate 2097196 bytes (joxp heap,f:OldSpace)
The job stops just while is posting the http request. The weird thing is that almost each time the first http post request I get this error:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA6275)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
and the second try works fine.
So, The out of process memory occured each time just before getting such an error, and I suspect to be a connection between these errors.
Tech details:
1. OS: WinXP
2. Oracle 10.1.0.2.0
3. To perform http post I use HttpClient 3.1 from Apache.
4. I checked the http connection to be closed each time, and this is done.
5. I checked the oracle statement and connection to be closed each time and this is done
6. The JVM error (logged in .trc files of Oracle) is:
java.lang.OutOfMemoryError
at java.lang.Thread.start(Native Method)
at sun.security.provider.SeedGenerator$ThreadedSeedGenerator.run(SeedGenerator.java:297)
DB Settings details:
Starting up ORACLE RDBMS Version: 10.1.0.2.0.
System parameters with non-default values:
processes = 200
sessions = 225
shared_pool_size = 159383552
large_pool_size = 8388608
java_pool_size = 104857600
nls_language = AMERICAN
control_files = C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL01.CTL, C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL02.CTL, C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL03.CTL
db_block_size = 8192
db_cache_size = 29360128
compatible = 10.1.0
fal_client = XXXXXX
fal_server = XXXXXXs
log_buffer = 524288
log_checkpoint_interval = 100000
db_files = 70
db_file_multiblock_read_count= 32
db_recovery_file_dest = C:\oracle\product\10.1.0\flash_recovery_area
db_recovery_file_dest_size= 2147483648
standby_file_management = AUTO
undo_management = AUTO
undo_tablespace = undotbs_01
undo_retention = 14400
remote_login_passwordfile= EXCLUSIVE
db_domain =
dispatchers = (PROTOCOL=TCP) (SERVICE=XXXXXXXDB)
remote_dependencies_mode = SIGNATURE
job_queue_processes = 4
parallel_max_servers = 5
background_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\BDUMP
user_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\UDUMP
max_dump_file_size = 10240
core_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\CDUMP
sort_area_size = 1048576
sort_area_retained_size = 1048576
db_name = XXXXXX
open_cursors = 500
optimizer_mode = FIRST_ROWS
pga_aggregate_target = 25165824
Any help would be appreciated. Thanks.
Can be a problem with JVM threading under Oracle ?The server prcess failed to allocate more memory for large objects ( in Oldspace).
If you Google ORA-04030, you will see several recommendations to work around this.
The Java VM in the database already has HttpClient, i don't know why you are loading the Apache HttpClient but this might not be the surce of the problem.
Kuassi http://db360.blogspot.com -
Help: Creating a report based on STORED PROCEDURE in Oracle DB
Hi,
We are creating an application with FORMS and REPORTS. A set of stored procedures were created for the FORMS and the ref cursor from the select statement are the same for the REPORTS.
Is there a way that directly use relevant stored procedure to create REPORTS and how?
Thanks in advance.
JimmyWhat I am really interested in is calling STORED PEOCEDURE in DB, not the one that attached with report. What good about this is that the procedures can be shared by FORMS and REPORTS. REPORTS call the procedure with select statement.
Thanks.
Maybe you are looking for
-
Job Error- Batch Risk Analysis (Role Full Sync)
Hi Experts, I have schedule the background job for Role analysis(Full Sync), but it gives an error- status error. all connections are working fine and pasted the error log for your reference. Oct 25, 2010 11:56:36 AM com.virsa.cc.common.util.Exceptio
-
Error 500--Internal Server Error while login to OIM11gr2 admin console
could you help me how to resolve this error I have installed and configured OIAM 11gr2(11.1.2.0.0)->SOA 11.1.1.6.0 on oracle linux 6.4 every thing goes good but got a problem while login to admin console(Admin console:: \\localhost:14000\sysadmin) it
-
How do i Install the Software Update Server for Windows 7?
How do i Install the Software Update Server for Windows 7? I get an error saying: Can't Install the Software because it is not currently available from the Software Update server. I downloaded the software so How do I install it? Do I install it all
-
Problems with sending SMS from adress book
Hi all, I have a new Kotorola MOTOKRZR K1 here. The Bluetooth connection with iMac is ok. I can send data to phone and I can receive data from phone, but I can't send SMS from adress book v4.0.5 (487) to the phone. The bluetooth button in adress book
-
Delays in Opening Acrobat X, and delays in printing pdf Docs
What do you need to do to speed up the opening of the program, and speed up the printing of pdf docs?