How to call C++ function in Crystal report
Hi,
i am working on serious issue now, i need some help, Could you please tell me how can i call my C++ method in crystal report designer (may be formula editor), i can see only this support VB and Crystal basic.
Regards,
Prabhakar J.
Hi Prabhakar,
The name of the UFL dll must begin with U2L. Rename your and if it's compile properly CR should find it when loading all of it's dependencies.
Check the developers help file and search for Custom User Function Library.
I should also mention that UFL's only support MBCS string formats so if you define them they must be defined this way or CR will have problems passing them from/to your UFL. CR uses UNICODE format internally but the UFL bridge will thunk them to MBCS format on the way out and expect that format on the way in. There is a possibility of data loss in the conversion routines.
Thank you
Don
Edited by: Don Williams on Jun 12, 2009 11:24 AM
Similar Messages
-
How to use oracle functions in Crystal Reports XI using Oracle Server
Hi all,
Is it possible to use oracle functions in Crystal Reports XI using Oracle Server as Data Source.
If i try to use a procedure,i am getting error with message "Invalid Arguement Provided".
Functions are not visible objects like tables,views and stored procedures.
The jdbs driver i m using is oracle.jdbc.driver.OracleDriver.I think it is not possible to add functions in crystal directly for any database. You need to use those functions in a stored procedure and add that storedprocedure as a datasource.
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233353335333833323333%7D.do]
regards,
Raghavendra -
How to use email function in crystal report ?
Post Author: kudo
CA Forum: .NET
Hi I'm a novice by touching .net not more than 2 months. Can somebody guide me how to use email function provided in crystal report components?(Better put a sample code so that I can understand well.) ps: I'm using VS2005 VB.net.Thanks.Post Author: mewdied
CA Forum: .NET
'EXPORT to EMAIL ''' Code for exporting the report to Mapi (.Net Windows application) ''' *For a Web application you must export to disk as a PDF file first.
crReportDocument.Load(Application.StartupPath + "\World Sales Report.rpt") crMicrosoftMailDestinationOptions = New MicrosoftMailDestinationOptions With crMicrosoftMailDestinationOptions .MailCCList = "[email protected]" .MailToList = "[email protected]" .MailSubject = "Attached exported report" .UserName = "admin" .Password = "password" End With
crExportOptions = crReportDocument.ExportOptions With crExportOptions .DestinationOptions = crMicrosoftMailDestinationOptions .ExportDestinationType = ExportDestinationType.MicrosoftMail .ExportFormatType = ExportFormatType.PortableDocFormat End With
'Add some error handling Try crReportDocument.Export() MsgBox("Report exported successfully.") Catch err As Exception MessageBox.Show(err.ToString()) End Try
Hope this helps -
How to implement the Oracle Group by function in Crystal reports?
Hi all,
In SQL, for example we have a group function like:
select district,state, country, continent, sum(no.of people) from world.
Now, How to implement this group function in crystal reports? Please advise.
Thanks in advance..
Regards,
sriramHi Vinay,
Thanks for the prompt reply.
In one of our report, we are supposed to perform group by for 14 columns to get sum of 3 columns and there by displaying 17 columns in the report.
When we tried in crystal reports to implement this oracle group by functionality:
1. We created 14 groups from the Insert->Group option.
2. By performing this, we got 14 group sections vertically(one inside the other).
3. Then we created the sum(15th column),sum(16th column), sum(17th column) by Insert->Summary option.
4. We suppresed all the group sections except for the last group.
5. Then, dragged all the groups to the last group section along with the summary fields.
This is how, we tried to acheive the oracle group by function in Crystal reports.
Please advise, whether our approach is right. If not, please suggest the appropriate approach with a bit detailed explanation.
Thanks,
Sriram. -
How to call a package from the Report in Oracle Application Express
How to call a package from the Report in Oracle Application Express
Hello,
What do you mean? Something like SELECT mypackage.function( par1, par2) from dual?
Or do you want to execute a procedure when something happens on the page, like clicking a button?
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-) -
How to call this procedure in my report to print my procedure output
Hi,
i have a table named letter,it contains 2 columns named as letter_id and letter_content.
select * from letter;
letter_id letter_content
103 Dear MFR
103 This is in regards to the attached DM List
103 Please Credit us after reviewing it.
103 Thanks
103 Regards
103 xxxx
108 Dear customer
108 This is to inform that ur DM List is as follows
108 Credit us according to the Dm after reviewing it.
108 Thanks
108 Regards
108 xxxx
now my requirement is,i need send a parameter as letter_id to a procedure or function in pl/sql in oracle,the output should be as follows:
if we will pass parameter(letter_id) = 103 then it displays as follows:
Dear MFR
This is in regards to the attached DM List.Please Credit us after reviewing it.
Thanks
Regards,
XXXXX.
if we will pass parameter(letter_id) = 108 then it should displays as follows:
Dear customer,
This is to inform that ur DM List is as follows. Credit us according to the Dm after reviewing it.
Thanks
Regards,
XXXXX.
the procedure for my requirement is like below.now my problem is how to call this procedure in my report.so that if i will send a parameter as letter_id then it should get my report stated above.
CREATE OR REPLACE PROCEDURE letter_text ( p_letter_id letter.letter_id%TYPE , p_letter_contents_out OUT SYS_REFCURSOR )
IS
BEGIN
OPEN p_letter_contents_out
FOR
SELECT letter_content
FROM letter
WHERE letter_id = p_letter_id
ORDER BY line_seq;
END letter_text;
which you might call with something like
SQL> var results refcursor
SQL> exec letter_text(103, :results)
PL/SQL procedure successfully completed.
SQL> print :results;
CONTENT
Dear MFR
this is in regards to the attached DM List
Please credit us after reviewing it
thanks
Regards
EXP
6 rows selected.
so, the same out put i need to get it in a report.
ThanksThanks for ur suggestions.
i have 2 select statements.1st query is the main query for the report.so i used it at the time of report created with datablock.
now my 2nd query is
select letter_content
from ( select content_seq,
content || case content_seq
when 2 then
' ' || lead(content) over (partition by letter_id order by content_seq)
end as letter_content
from exp_letter_contents
where letter_id = 103)
where content_seq <> 3;
i had taken 2parameters 1 for the main query and 2nd is for the above query(parameter is letter_id).
now i have to write the above select statement in the report.
so i had taken a field object in the report and then i had written this code in before report trigger.
function letter_contentFormatTrigger return boolean is
begin
select letter_content
from ( select content_seq,
content ||
case content_seq when 2 then
' ' || lead(content) over (partition by letter_id order by content_seq)
end as letter_content
from exp_letter_contents
where letter_id = 103)
where content_seq <> 3;
return (letter_content);
end;
when i tried to compile it.i got an error as follows :
error 103 at line6,column 5
encountered the symbol "CASE" when expecting one of the following:
(- + mod null <an identifier>
<a double-quoted delimited-identifier><a bind variable> avg...etc
so,where can i write this select statement.
i am using oracle reports6i
Message was edited by:
user579585 -
How can call a function module(RFC)in one server to another sever in my rep
How can call a function module(RFC)in one server to another sever in my report program.
What i am know whenever rfc enabled immediately radio button checks then only it will come.
please justify.Syntax
CALL FUNCTION func DESTINATION dest [EXPORTING p1 = a1 p2 = a2 ...]
[IMPORTING p1 = a1 p2 = a2 ...]
[CHANGING p1 = a1 p2 = a2 ...]
[TABLES t1 = itab1 t2 = itab2 ...]
[EXCEPTIONS [exc1 = n1 exc2 = n2 ...]
[system_failure = ns [MESSAGE smess]]
[communication_failure = nc [MESSAGE cmess]]
[OTHERS = n_others]].
http://help.sap.com/saphelp_47x200/helpdata/en/22/042537488911d189490000e829fbbd/frameset.htm -
How to call our smartform in standard report
Hi friends,
How to call Zee smartform from standard report without affecting stadard flow.
Thanks,
YogeshHi,
do it this way.
in the ALV function call
give in
exporting
I_CALLBACK_USER_COMMAND = 'user_command '
write a subroutine
FORM user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
case whatcomm.
when 'print'.
call 2 function modules here
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING FORMNAME = P_FORM "Your form name
variant = ' '
direct_call = ' '
IMPORTING FM_NAME = FM_NAME
EXCEPTIONS NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
calling the generated function module
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = CPARAM
OUTPUT_OPTIONS = OUTOP
USER_SETTINGS = SPACE
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
IMPORTING
JOB_OUTPUT_INFO = TAB_OTF_DATA
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endcase.
endform.
This is an example in the function gereated call give you own importing and exporting parameters.
Regards
Kiran Sure -
How to call a Shell Script from Report 6i
Hi All,
Can anybody tell, how to call a Shell Script from Report 6i.
Thanks in Advance,
Balatry the SRW.USER_EXIT (user_exit_string CHAR);
-
How to call javascript function from PL/SQL procedure
Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?
Hi,
I have a requirement to call Javascript function inside a After Submit Process.
clear requirement below:
1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
2. user clicks on "save files" button
3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
Hope this clarify U.
Krishna. -
How to call java function from PL/sql in oracle applications
I am trying to call a java function from plsql procedure. Can any one explain how to call java function, and in which directory I have to store my java function in oracle applications. Do I need to register that java function from Application developer.
Thanks
Kranthihttp://www.oracle.com/technology/tech/java/jsp/index.html
Good Luck,
Avi. -
Step- by- Step on How to Load Excel data into Crystal Reports?
Hi Friends,
Can anyone send me a Step- by- Step on How to Load Excel data into Crystal Reports? Pls help me. Thanks in Advance.
VijayIt's also important to 'prep' the excel file prior to connecting to it.
Give the data tab a meaningful name
Make sure the column headers are unique and that every column has a header
Delete any blank tabs
If you have trouble with Excel changing the data type of a field (say, a social security number you want to be a string value rather than a number so you don't lose leading zero) an alternative would be to save the spreadsheet file as a CSV, create a schema.ini to specify the data types for each column (example below) and use the same steps to connect except instead of choosing Excel 8.0, scroll to the bottom and choose Text. You have to make sure the CSV file is in the same folder as the schema.ini file that defines the columns.
Schema.ini example:
200912PUSD.csv
ColNameHeader=True
Format=CSVDelimited
MaxScanRows=25
CharacterSet=OEM
Col1=SSN Char Width 9
Col2=LAST_NM Char Width 25
Col3=FIRST_NM Char Width 25
Col4=DOB Date
Col5=STDNT_ID Char Width 10
Col6=SORTKEY Char Width 10
Col7=SCHOOL_NM Char Width 30
Col8=OTHER_ID Integer
Col9=GRADE Char Width 2
The filename in the first line needs to have the [] brackets around it, but I couldn't get it to display in this forum correctly.
Edited by: Eric Petersen on Jan 27, 2010 9:40 AM -
How to call stored function in my jsp
how to call stored function in my jsp?
please give me a example.Hi,
think we need mor einformation, like JDeveloper release and the how you do access the database (JDBC, BC4J, EJB,ADF...)
Frank -
How to call oracle function from ejb3
i'm trying to call an oracle query-function from ejb3.
The oracle function:
create or replace FUNCTION getSecThreadCount(secId in NUMBER,avai in NUMBER)
RETURN SYS_REFCURSOR is cur SYS_REFCURSOR;
m_sql VARCHAR2(250);
BEGIN
m_sql:='select count(thrId) from thread where secId='|| secid||'
and thrAvai='|| avai;
open cur for m_sql;
return cur;
END;
I'v tried several ways to call it,but all failed:
1. the calling code:
public Object getSectionThreadCount(int secId,int avai){
Query query=manager.createNativeQuery("{call getSecThreadCount(?,?) }");
query.setParameter(1, secId);
query.setParameter(2, avai);
return query.getSingleResult();
but i got the exception:
Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: java.sql.SQLException: ORA-06550: row 1, col 7:
PLS-00221: 'GETSECTHREADCOUNT' not procedure or not defined
ORA-06550: row 1, col 7:
PL/SQL: Statement ignored
2. the calling code:
@SqlResultSetMapping(name = "getSecThreadCount_Mapping")
@NamedNativeQuery(name = "getSecThreadCount",
query = "{?=call getSecThreadCount(:secId,:avai)}",
resultSetMapping = "getSecThreadCount_Mapping",
hints = {@QueryHint(name = "org.hibernate.callable", value = "true"),
@QueryHint(name = "org.hibernate.readOnly", value = "true")})
public Object getSectionThreadCount(int secId,int avai){
Query query=manager.createNamedQuery("getSecThreadCount");
query.setParameter("secId", secId);
query.setParameter("avai", avai);
return query.getSingleResult();
but i run into the exception:
Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: java.sql.SQLException: lost in index IN or OUT parameter:: 3
By the way, i have successfully called the function from hibernate. And i use oracle 11g, JBoss5 RC1.
Could anyone tell me how to call the function from EJB3?
Thanks.Here's a working model:
package.procedure: (created in example schema scott)
CREATE OR REPLACE package body data_pkg as
type c_refcursor is ref cursor;
-- function that return all emps of a certain dept
function getEmployees ( p_deptId in number
return c_refcursor
is
l_refcursor c_refcursor;
begin
open l_refcursor
for
select e.empno as emp_id
, e.ename as emp_name
, e.job as emp_job
, e.hiredate as emp_hiredate
from emp e
where e.DEPTNO = p_deptId;
return l_refcursor;
end getEmployees;
end data_pkg;
/entity class:
package net.app.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedNativeQuery;
import javax.persistence.QueryHint;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@SuppressWarnings("serial")
@Entity
@Table (name="emp")
@SequenceGenerator(name = "EmployeeSequence", sequenceName = "emp_seq")
@NamedNativeQuery( name = "getEmpsByDeptId"
, query = "{ ? = call data_pkg.getEmployees(?)}"
, resultClass = Employee.class
, hints = { @QueryHint(name = "org.hibernate.callable", value = "true")
, @QueryHint(name = "org.hibernate.readOnly", value = "true")
public class Employee implements Serializable
@Id
@Column(name="emp_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "EmployeeSequence")
private int id;
@Column(name="emp_name")
private String name;
@Column(name="emp_job")
private String job;
@Column(name="emp_hiredate")
private Date hiredate;
// constructor
public Employee (){}
// getters and setters
public int getId()
return id;
etc...session bean:
package net.app.entity;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import net.app.entity.Employee;
import net.app.iface.ScottAdmin;
@Stateless
public class ScottAdminImpl implements ScottAdmin
@PersistenceContext
private EntityManager entityManager;
@SuppressWarnings("unchecked")
public List<Employee> getEmployeesByDeptId(int deptId)
ArrayList<Employee> empList;
try
Query query = entityManager.createNamedQuery("getEmpsByDeptId");
query.setParameter(1, deptId);
empList = (ArrayList<Employee>) query.getResultList();
return empList;
catch (Exception e)
e.printStackTrace(System.out);
return null;
}client:
package net.app.client;
import java.util.List;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import net.app.entity.Employee;
import net.app.iface.ScottAdmin;
public class ScottClient
public static void main(String[] args)
try
// create local interface
InitialContext ctx = new InitialContext();
ScottAdmin adminInterface = (ScottAdmin) ctx.lookup("ScottAdminImpl/remote");
// select employees by deptno
int deptno = 20;
List<Employee> empList = adminInterface.getEmployeesByDeptId(deptno);
// output
System.out.println("Listing employees:");
for (Employee emp : empList)
System.out.println(emp.getId() + ": " + emp.getName() + ", " + emp.getJob() + ", " + emp.getHiredate());
catch (NamingException e)
e.printStackTrace(System.out);
}Basically you just ignore the refcursor outbound parameter.
This is a stored function, have yet to try outbound refcursor parameters in stored procedures...
Edited by: _Locutus on Apr 2, 2009 2:37 PM -
How to call java function in javascript
Hello Everyone,
Can anyone tell me solution that:
How to call java function in javascript?
Thanks,
VIDsYou can't since Java is running on the server and javascript is running in the browser long after the Java side of things has finished executing. Assuming you're not talking about an applet here.
But you can make calls back to the server through Ajax. All you need is something like a servlet on the receiving end which you can invoke through Ajax; from that point you can execute any Java code you want.
Maybe you are looking for
-
Export to Excel for multiple dataproviders in WAD
Hello Guys, I need a quick note on the requirement. Is there any possible solution to get data from different data providers used in WAD exported into one excel sheet. The backend is 2004s but WAD used is 3.5. Actual scenario is there are 8 different
-
Servlet not reachable by name in WebToGo
Every time I launch a servlet from the debugger, it comes up with a url of http://<myserver>/servlets/servlet. The servlet becomes unreachable by name. This makes the servlet unreachable by other pages and servlets when debugging. I think this is occ
-
VA05 & VA05N - Taking Long time to Give the Output.
Dear All, VA05 & VA05N - Taking Long time to Give the Output for Single date & Single Sales Office if I create Z-Program (VBAK) also taking Long time for Single date & Single Sales Office. Please Give some idea to Optimizati
-
FITV PR05 - check on receipts data
Hi everybody, We use transaction <b>PR05</b>. We need <b>to do specific checks in order to print error messages</b> when we create or modify receipts for a trip (for example we want to check total amounts and create new receipts lines if amounts are
-
we a super fast internet connection, how ever, try to download Adobe creative photoshop for desktop, download is runnig 2 hours (i don`t see any progress