How to create stored procedures and use those 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.
Hello,
There is a document explainining how to use Oracle stored proc with Crystal reports.
Check at:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1084c536-711e-2b10-e48a-924a60745253
It is for older version but it should work and you can refer to it to get general idea how to start with it. It has a sample oracle stored proc and how to connect it from Crystal Reports.
Similar Messages
-
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 -
Get Error on using Stored Procedure to use it in Crystal Reports XI
Post Author: Krüger
CA Forum: Integrated Solutions
Hello, I need your help please. I use Oracle 10 and now write a correct compiled stored procedure: this procedure is really simple how you can see:set pagesize 50000set linesize 1000set wrap offset head offset feedback offset trimspool onset serveroutput onset verify offcreate or replace procedure GetFirmenNachMontag is lutype varchar2(10);BEGINDECLAREbegin lutype:='Test'; dbms_output.put_line(lutype);END;END; In using in sql directly it is really all fine. But when I want to integrat it in a simple report in Crystal I get the error unknow databank connector error. I hope that somebody can help me please. With best regardsM.KrügerIf 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 -
How to create RFQ s and use them to complete the program
hi,
how to create RFQ s and use them to complete the program
thanks in advanceHi Santosh,
RFQ is created through transaction ME41.
You need to write down BDC for mass update of RFQ, because BAPI is not available.
Regards,
Tutun -
Stored Procedure for displaying data in Crystal Reports
Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.
from site:-
Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor -
HOW TO CREATE STORED PROCEDURE IN DATA INTEGRATOR
Hi to every one,
Can any one help in giving me a solution for creating stored procedure in Data Integrator.
I m new to this fieldHi nath,
Firstly are you using MYSQL or Oracle as the database,if its oracle database then follow this
http://obiee101.blogspot.com/2008/01/obiee-using-oracle-stored-procedure-to.html
http://oraclebizint.wordpress.com/2008/02/20/oracle-bi-ee-101332-executing-stored-proceduresfunctions-before-reports-before-report-triggers-and-global-temporary-tables/
EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME][DATABASE_NAME] --> is the database name your creating your procedure
[SCHEMA_NAME]-->is the user with which your creating
[PROCEDURE_NAME] --> the name given to procedure
You dont know how to get those run this SQL in TOAD and see select sys_context('userenv','db_name'), sys_context('userenv','session_user') from dual
(OR) open you connection pool properties window in RPD,you will get the DB name and the user name as the schema name
hope answered your question.
CHeers,
KK -
How to create stored procedure directely in RPD
Hi Gurus,
I am trying to create stored procedure directly in physical table in rpd level in OBIEE.for this one i have gone through below website.
http://obiee101.blogspot.com/2011/01/obiee-using-mssql-stored-procedure-as.html
in that blog they mentioned to write some query which is...........
EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME]
in above query i am not getting what is DATABASE_NAME,SCHEMA_NAME,PROCEDURE_NAME
can any one elobrate this oneHi nath,
Firstly are you using MYSQL or Oracle as the database,if its oracle database then follow this
http://obiee101.blogspot.com/2008/01/obiee-using-oracle-stored-procedure-to.html
http://oraclebizint.wordpress.com/2008/02/20/oracle-bi-ee-101332-executing-stored-proceduresfunctions-before-reports-before-report-triggers-and-global-temporary-tables/
EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME][DATABASE_NAME] --> is the database name your creating your procedure
[SCHEMA_NAME]-->is the user with which your creating
[PROCEDURE_NAME] --> the name given to procedure
You dont know how to get those run this SQL in TOAD and see select sys_context('userenv','db_name'), sys_context('userenv','session_user') from dual
(OR) open you connection pool properties window in RPD,you will get the DB name and the user name as the schema name
hope answered your question.
CHeers,
KK -
How to create stored procedure that can be read through Hyperion intelligen
hello everyone out there. I need some help I create a select stored procedure and would like to run it through Hyperion intelligence with some input parameters. The procedure is not working. it is throwing an error when I execute it through Hyperion. Also how do I put multiple values like an array sort of things in a where clause like this where name in('test', 'test1). I place the stored procedure below any help will be greatly appreciated.
CREATE OR REPLACE PROCEDURE emp_by_dept (
p_deptno ert_dept_t.dept%TYPE
IS
emp_refcur SYS_REFCURSOR;
v_dept ert_dept_t.dept%TYPE;
v_deptname ert_dept_t.deptname%TYPE;
BEGIN
OPEN emp_refcur FOR SELECT dept, deptname FROM ert.ert_dept_t WHERE dept = p_deptno;
DBMS_OUTPUT.PUT_LINE('dept deptname');
DBMS_OUTPUT.PUT_LINE('----- -------');
LOOP
FETCH emp_refcur INTO v_dept, v_deptname;
EXIT WHEN emp_refcur%NOTFOUND;
END LOOP;
CLOSE emp_refcur;
END;Chrome has its own PDF viewer plugin that is quite buggy when it comes to PDF forms (as do Firefox and Safari, by the way).
So yes, the best solution is to download the file and then open it locally using Adobe Reader. However, you can't enforce that. It's up to the user and their browser settings. You can only recommend it to them. -
How to create stored procedures automatically when creating new company
I need to create a method in our add-on Business One application that will create stored procedures at the time we install the add-on (when the new company is created). Where would I store the SQL scripts, and what SAP Business One commands do I need to use to build the stored procedures into the new company database? Can someone give me an example of how to do this? We are coding in C#, but an example in visual basic would also be helpful if no one out there in forum land uses C#
Thanks,
Nancy Walk
[email protected]Hi Nancy!
Of course are there people here that use C#
To solve your problem, create a routine in your add-on that checks at startup if the stored procedures are present. If they are not, create them. You can use the DI-API, or just add them directly to your database.
<i>Note: SAP does not like it when you play around directly in the SAP databases, and does not supply support for databases that are changed manually. You'd better use the DI-API...</i>
Hope it helps...
Grtz, Rowdy -
How to handle Stored Procedure and Views
Dear All
While dealing with Oracle database related scenario. I came across Stored Procedures and Views. Which are complex in nature. Using SAP XI how we can handle them ?
Is JDBC adaptor is capable of that.? Can you help me Data type structure for oracle.
How max occur play important role in that. How to identify root and item level structure for oracle
I am dealing with stored procedures while inserting data. and using views i need to get data from oracle database.
What is the syntax of query we use to put while using JDBC adaptor?
Please help and provide bit detail information over this so that i can execute scenario
Thanks
Gaurav1) jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:sid
2)Occurence==> o,1, >1 , Unbounded
Occurrence=> ready to accept 0 / 1 / more than 1/ multiple record (for source) and how it will be passed to target.
http://help.sap.com/saphelp_erp2004/helpdata/en/b6/0b733cb7d61952e10000000a11405a/frameset.htm
3)
<StatementName5>
<storedProcedureName action= EXECUTE>
<table>realStoredProcedureeName</table>
<param1 [isInput=true] [isOutput=true] type=SQLDatatype>val1</param1>
</storedProcedureName >
</StatementName5>
refer
http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm -
Calling a stored procedures and using its output parameters in a report
Hi,,
I have a procedure defined in a package on the database. This procedure returns a number of output parameters. How do I call this procedure and use the output parameters in my report ?
Thanks, MarkDepends on the level at which the procedure has to be called. If its at report-level, call the Form in the BEFORE-REPORT-trigger (or AFTER-PARAMFORM) and store the out-values in Placeholder-columns. These you can use anywhere in your report.
-
How to create stored procedure to drop and create table
Version: Oracle 10g
I am trying to create a stored procedure that will drop and create a table based on a select statement. I can create the table but I can't drop it.
CREATE OR REPLACE procedure EC_LOAD is
begin
INSERT INTO Sales_table
(FSCL_WK,
DIV,
ACCT_TYPE)
Select
FSCL_WK,
DIV,
ACCT_TYPE
from
sales_revenue;
end ecload;
I need to drop Sales_table before inserting the values. How do i do this?Or with a drop:
SQL> desc emp2
ERROR:
ORA-04043: object emp2 does not exist
SQL>
SQL> declare
2 cnt int := 0;
3 begin
4 select max (1)
5 into cnt
6 from user_tables
7 where table_name = 'EMP2';
8
9 if cnt = 1
10 then
11 execute immediate 'drop table emp2';
12 end if;
13
14 execute immediate 'create table emp2 as select * from emp';
15 end;
16 /
PL/SQL procedure successfully completed.
SQL>
SQL> desc emp2
Name Null? Type
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> -
I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters)
- uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters) - uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.
Why you have to pass 14 parameters for DELETE and UPDATE? Do you have any Primary Key? If you do NOT have primary key in your table then in case you have duplicate information, SQL will update both or delete them together. You need to provide DDL of
you table. What are the data types of fields?
Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered. -
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 search stored procedures being used by rpt files?
Post Author: Wah!
CA Forum: General
Dear all,
I have a lot of rpt files, each of them at least use one stored-procedure.
If I want to know a specific stored-procedure is being used by which rpt files,
is there any fast methods rather than opening the rpt files one by one to check manually?
Thank you very much!
Wah!Post Author: synapsevampire
CA Forum: General
Try one of the 3rd party report documenters, such as Report Miner. Not sure, most do a crappy job about returning the data source...
Another means would be to run a trace on the database and execute the reports, which is pretty kludgy as well.
I put documentation into every report, so that exporting to report definition supplies this info.
A good tip is to add a suppressed report header section and place documentation, revision history, etc., in there.
-k
Maybe you are looking for
-
Regarding Conversion of the Charecter field Into Lowercase in an ALV REPORT
HI ALL, I have created an editable alv Report. In which i have a coloumn with charecter field where i can enter 64 charecters. when ever i have enter and moved to another Tab its converting into Capital Letters. I need to stop it conversion. Can any
-
Need help in changing the langauge on the Nokia570...
Anybody can help please. I was given a brand new Nokia 5700 by my nephew from Taiwan and the langauge set is Chinese. I do not read or write chinese. Need help to change thelangauge on the phone. Any body can help. Thanks in advance
-
Should I use AxMsRdpClient6 or AxMSTSCLib.AxMsRdpClient8NotSafeForScripting
Hello, I'm trying to create windows form application that allows a user to connect to a virtual machine. I have implemented VCL http://vcl.apache.org/ and users are allowed to download the rdp file but I would like to automate it so when they click
-
Hello. I have a problem about Lync Server 2010 setup. While i am on Lync Server 2010 deployment wizard on first level of setup. i got below error, i can't cont. to setup. > Enable local replica service Enable-CSReplica -Verbose -Confirm:$false -Repo
-
How to get fixed results using JPA
Hi I have a table with lot of rows, when I querry, it is taking a lot of time and I am displaying that many rows in UI in single table. So it is not scaling well. SO I am planing to show x number of row in on page. So for that to achieve, how do I qu