How to select a procedure in package from crystal report
I want to select a oracle procedure in package from a crystal report. I can able to select stored procedure from crystal report if I check the option storedprocedure in file menu--option-SQL tab.
Thanks Jayanthi,
We had already read the article, but did not interpret it correctly. We found the solution in an SAP OSS note.
We had to use method get_document_handle to get an OLE link and continue from there with OLE. The article however is very brief on that part and has no example.
So for anyone who would like to do the same or simular:
- call method do_document->get_document_handle:
EXPORTING
no_flush = ''
IMPORTING
error = do_error
handle = do_handle
retcode = do_retcode.
- GET PROPERTY OF do_handle-obj 'Application' = do_ole_application.
Similar Messages
-
Help with calling packages from crystal reports
hi I am trying to call a package from crystal reports, but geting an error
Failed to open a rowset
4200:datadirect:odbcdriver:odbc oracle driver: unrecognised escape sequence.
im sure its somthing realy stupid im doing wrong any ideas????
the command in crystal is
{CALL Enhanced_Pharos_Report.run_report
(NVL({?var_detail_id},0))}
the package, which works as a stand alone object is
----------spec------------------
create or replace package Enhanced_Pharos_Report
AS
TYPE result_set_type IS REF CURSOR;
PROCEDURE run_report
(var_detail_id NUMBER, v_Media_Object_Name out varchar2);
end;
-----------body-----------------------
create or replace package body Enhanced_Pharos_Report as
v_Media_Object_Name varchar2(300);
function Media_Object_Name(var_Detail_id Number) return varchar2 as
Result varchar2(300);
begin
SELECT promo_name
INTO Result
FROM promo
WHERE promo_id = (SELECT promo_id
FROM promo_plan
WHERE promo_plan_id = (SELECT promo_plan_id
FROM event_promotion
WHERE detail_id = var_Detail_id));
return(Result);
end Media_Object_Name;
PROCEDURE run_report
(var_detail_id NUMBER, v_Media_Object_Name out varchar2)
is
begin
v_Media_Object_Name := Media_Object_Name (var_detail_id);
end;
end;Are you able to view your report on the browser in the format:
http://myserver:portno/report_name.rpt -
How do I convert the following code from crystal reports to Reporting Services?
stringvar rbt := "";
if { param} = -1 then rbt := "ALL | " else rbt := {rptStoreMasterByDC;1.RegionName} + " | ";
if {param2} = -1 then rbt := rbt + "ALL | " else rbt := rbt + {rptStoreMasterByDC;1.BranchName} + " | ";
if {param3} = -1 then rbt := rbt + "ALL" else rbt := {rptStoreMasterByDC;1.TerritoryName};
rbtAdd a customer code in the report. Call it from the report tablix cell using expression. Pass param,param2,param3, RegionName, BranchName, TerritoryName as parameters of the custom function/procedure.
Refer http://technet.microsoft.com/en-us/library/ms156028.aspx
The custom code will look like as below.
Public Function ChangeWord(ByVal param As Integer,ByVal param2 As Integer,ByVal param3 As Integer,ByVal RegionName As String,ByVal BranchName As String,ByVal param As Territory) As String
Dim s as string
If param = -1 then s = "ALL |" else s = RegionName & "|"
If param2 = -1 then s = s & "ALL |" else s = BranchName & "|"
If param3 = -1 then s = s & "ALL" else s = TerritoryName
Return s
End Function
Regards, RSingh -
How to update SQL Database with totals from Crystal Report
Hello,
I am converting a Crystal Report done using CR 11 and VB6 to VB.Net and Visual Studio 2010. The report is now working fairly well but there is 1 last thing to figure out. In the vb6 version there was a report footer event that I used to update the report totals to a record in a database table.
It appears that in the .net version we have less events to allow outside processing to occure when a report is produced. Looking thru the available events I don't see a way to do this. Would some be so kind as to suggest a way this might be accomplished?
Thanks,
VicOnly thing I can think of is the InProc RAS SDK and using the RowSet Controller to query the footer, then parsing out the info you need to submit to the database.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
How call procedure or package from Oracle BI Publisher 10.1.3.2.1
Hi Gurus,
I need to call a procedure or package from Oracle BI Publisher 10.1.3.2.1 by passing parameters, I do it because it would be easier to fill a table as the report that asks for is too complex (8 breaks, 5 dblinks, 20 tables, etc).
I'm not using the Oracle XML. Review include the following solutions:
Re: Stored procedures and dynamic columns
Re: Is it possible to use Stored Procedures in BI Publisher GUI?
Re: PL/SQL Stored Procedure w/ XML Template?
But none of them useful for me was the level of complexity.
Best regards.Hi Vetsrini,
I write the sentence as it showed in the previous thread
select from whc_kk_v2.whc_p_kk_publisher (pv_msgerror =>: msgerror,*
pv_pro1 =>: prov_1,
pv_pro2 =>: prov_2)
run when I get the error BIP
ORA-00933: SQL command not properly ended
Show me I'm doing wrong, or who may be causing the error. I tried everything but does not leave, please your help.
Best regards -
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 get actual error from Crystal Report
We are using Crystal report in web service.
We faced some problem due to crystal report unexpected error.
Refer the below error message.
Xception E NSF NSFZ1100 20100608 145511565 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
Xception E NSF NSFZ1100 20100608 145511972 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e, Boolean suppressMessage)
at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e)
at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPageNumber()
at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPage()
at CrystalDecisions.Windows.Forms.DocumentControl.ShowLastPage()
at CrystalDecisions.Windows.Forms.PageView.ShowLastPage()
at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.TotalPageCount(ReportDocument Rpt)
at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.Print(BaseReport RptDefinition)
at Biz.Nissan.Cats.CORE.REPORT.MCTLIST260Print.Print(IFData ifData)
at Biz.Nissan.W3.CATS.BC.Service.DistributeService.ExecuteMpp()
How we get the actual error from crystal report?
Thanks in AdvanceSame as
crystal report unexpected error in Web service (IIS)
Closing this thread.
Ludek -
How I could generate an XML file from a report in version 4.0B
Good morning,
How could I generate an XML file from a report? Please note that I am using version 4.0B
I don't have access to
Billy VitalHi,
In the Class CL_XML_DOCUMENT,
we have a method EXPORT_TO_FILE to download an XML file. -
How can we use the same package in our report used by some other report
how can we use the same package in our report used by some other report
Hi,
You just need to assign package while saving your report.
No extra is required providing you are aware of package to be used. -
How do I connect from Crystal Report version XI to Oracle 10G express?
I'm new to oracle 10G express and I'm developing an application that needs reports to preview some data from oracle tables.
The oracle database is installed on the server and I installed the client on my machine. I need to use the crystal report 11 to report the output. Thus, I designed a crystal report that should simply read a table on oracle and though I need to be able to connect to the oracle 10G Express Edition database. I tried to create a connection from the crystal report using the Database Expert >> Create New Connection >> Oracle Server and I include the following parameters.:
- Service: host:1521/XE
- Username: username
- Password: password
Then when I tried to connect the crystal report crashes always.
Is there any way to create a connection to the Oracle Database 10G express from Crystal Report 11?
Please advise...Thank you bala,
First, How I should start the Listener on the database server?
Listener.ora content:
SID_LIST_LISTENER =
+(SID_LIST =+
+(SID_DESC =+
+(SID_NAME = PLSExtProc)+
+(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
+(PROGRAM = extproc)+
+)+
+(SID_DESC =+
+(SID_NAME = CLRExtProc)+
+(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
+(PROGRAM = extproc)+
+)+
+)+
LISTENER =
+(DESCRIPTION_LIST =+
+(DESCRIPTION =+
+(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
+(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
+)+
+)+
DEFAULT_SERVICE_LISTENER = (XE)
How to configure the tnsnames.ora on the client side?
tnsnames.ora content:
XE =
+(DESCRIPTION =+
+(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
+(CONNECT_DATA =+
+(SERVER = DEDICATED)+
+(SERVICE_NAME = XE)+
+)+
+)+
EXTPROC_CONNECTION_DATA =
+(DESCRIPTION =+
+(ADDRESS_LIST =+
+(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
+)+
+(CONNECT_DATA =+
+(SID = PLSExtProc)+
+(PRESENTATION = RO)+
+)+
+)+
ORACLR_CONNECTION_DATA =
+(DESCRIPTION =+
+(ADDRESS_LIST =+
+(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
+)+
+(CONNECT_DATA =+
+(SID = CLRExtProc)+
+(PRESENTATION = RO)+
+)+
+)+
Now I`m trying to initialize this on one machine (database & client) and so the crystal report will be on the same machine where the database exist; Additionally, this machine has OS Windows 7 Ultimate 64bit and include the Oracle 10g Express Database & Oracle 10g Express Client software.
Please check the files content I included above and give me the way on how to establish a connection from the crystal report to the database where both are installed on the same machine.
Thanks in advance... -
How can i export excel 2003(Version 11) from Crystal Report 8.5
how can i export report to excel 2003(Version 11) from Crystal Report 8.5
We i can only see below formats
Acrobat Format (PDF)
Character-separated values
Comma-separated values (CSV)
Crystal Reports (RPT)
Crystal Reports 7.0 (RPT)
Data Interchange Format (DIF)
Excel 5.0 (XLS)
Excel 5.0 (XLS) (Extended)
Excel 7.0 (XLS)
Excel 7.0 (XLS) (Extended)
Excel 8.0 (XLS)
Excel 8.0 (XLS) (Extended)
HTML 3.2
HTML 4.0 (DHTML)
Lotus 1-2-3 (WK1)
Lotus 1-2-3 (WK3)
Lotus 1-2-3 (WK5)
ODBC - AddressBook
OBDC - CRGUP
OBDC - CROR8V36
OBDC - CRSS
OBDC - CRXMLV36
ODBC - dBASE Files
ODBC - Excel Files
ODBC - MS Access Database
ODBC - Visio Database Samples
ODBC - Visual FoxPro Database
ODBC - Visual FoxPro Tables
OBDC - Xtreme Sample Database
Paginated Text
Record style (columns no spaces)
Record style (columns with spaces)
Report Definition
Rich Text (Exact Format)
Tab-separated text
Tab-separated values
Text
Word for Windows document
XML
there is no format with "Microsoft Excel 97-2000 (XLS)"
what should i do? -
How to print directly to Printer from Crystal Report Viewer ?
Hi All,
We are integrating our Java Web Application with Crystal report XI, currently using JRC and export to PDF for user to preview and print to local printer.
Now there is new requirement :
Some clients is using thin client terminal (no harddisk, only has OS +Browser in ROM), so I cannot install Acrobat Reader for them to preview&print the report.
So I am looking at Crystal Report Viewer, the question is : Can I print from Crystal Report Viewer directly to local printer without first converting it to PDF (because I can't have acrobat reader installed) ??
Thank you very much,
Krist
IndonesiaHi,
It can't be achieved through XI.
JRCXI R2 SDK offers the ability to print the report server side
using the PrintOutputController using printReport(PrintReportOptions printReportOptions) method.
Here is the code(for XIR2):
import="com.crystaldecisions.reports.sdk.*"
import="com.crystaldecisions.sdk.occa.report.lib.*"
import="com.crystaldecisions.sdk.occa.report.document.*"
try {
final String REPORT_NAME = "Inventory.rpt";
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(REPORT_NAME, 0);
//Create and set print options.
PrintReportOptions printOptions = new PrintReportOptions();
//Note: Printer with the 'printer name' below must already be configured.
printOptions.setPrinterName("
10.10.45.220
BOBJ 2C");
printOptions.setJobTitle("Sample Print Job from JRC.");
printOptions.setPrinterDuplex(PrinterDuplex.horizontal);
printOptions.setPaperSource(PaperSource.auto);
printOptions.setPaperSize(PaperSize.paperLetter);
printOptions.setNumberOfCopies(1);
printOptions.setCollated(false);
PrintReportOptions.PageRange printPageRange = new PrintReportOptions.PageRange(1,1);
printOptions.addPrinterPageRange(printPageRange);
//NOTE: If parameters or database login credentials are required, they need to be set before.
//calling the printReport() method of the PrintOutputController.
reportClientDoc.getPrintOutputController().printReport(printOptions);
reportClientDoc.close();
out.println("Successfully sent report to the printer.");
catch(ReportSDKException ex) {
out.println(ex);
Please revert in case you have any query.
Thanks,
Neeraj -
How to enhance the Excel export from Crystal Reports
Hello,
I am new in Crystal Reports and I wonder if it is possible to enhance the Excel export from Crystal Reports with post-processing that would be applied to the Excel exported file.
By example, is it possible to freeze the window panes, so rows and columns are frozen in place on the screen?
Is there any possibility to obtain the file exported to excel to work with.
Or maybe there is some ways to parametrize the Excel export from Crystal Reports?
Any suggestions are welcomed.If you are using Crystal Reports 2008 you can use the Report Application SDK that is now available.
It has a object called PrintOutputController that has an export method that allows you to get access to the exported file before you send it to the user.
Check the Developer library and the samples for details.
<a href="/blog/10">Rob's blog - http://diamond.businessobjects.com/robhorne</a> -
How to generate Bar codes from Crystal Report
I understand that Bar Codes can be genrated from Crystal reports. I am using CR 2008 and trying to convert my Inventory items to bar codes. it does convert it and I can see the bar codes but it looks like; just a garbage and scanner does not recognze it plus the numners are missing @ the bottom.
Anybody has ever tried this and have some simple instructions to start with.
Any help will be appreciated highly.
Regards,Hi,
What barcode are you using and what barcode font?
If you are using Code39 or Postnet then you need to make sure your values are formatted properly by creating a formula and using the barcode functions.
Have a search in the forum for barcodes. It's been talked about a lot and you should find your solution.
Good luck,
Brian -
Passing single/multiple values to stored proc parameter from crystal report
I tried below solution posted on this forum to pass either a single value or multi-value to a sql server stored procedure parameter (varchar datatype) from crystal report XI R2.
In my crystal report , I am displaying all the available parameter values to the user and the user will select either a single value or multi value.
This worked when I select single value and when I say show sql query in my subreport I see the following:
{CALL "XYZ"."dbo"."storedprocedurename";1('Product 1')}
But this did not worked when I selected multiple values and when I say show sql query in my subreport I see the following:
{CALL "XYZ"."dbo"."storedprocedurename";1('Product 1,Product 2')}
I think it might work if it is as below:*
For multiple values:
{CALL "xyz"."dbo"."storedprocedurename";1('Product 1', 'Product 2')}
Please advise.
Solution Posted on this forum is as follows:
Hi,
As you must be aware of that a crystal report created of a stored procedure will allow only a single value for inserting a multiple value as a parameter in your report and pass those values to your stored procedure please follow the below work around which will be helpful for you.
Symptom
In Crystal Reports, you want to pass a multi-value parameter to a stored procedure. The problem with doing so is that Crystal Reports considers the multi-value parameter to be an array.
How can you pass a multi-value parameter to a stored procedure?
Resolution
Here are the steps to pass a multi-value parameter to a stored procedure:
1. Create a Crystal report, and add a multi-value parameter.
2. Since the multi-value parameter is treated as an array, create a formula that uses the JOIN function. Create a formula as below:
//Formula: @JoinFormula
Join ({?Multi-value parameter array},";")
====================
NOTE:
In the formula above, a semi-colon (";") is the delimiter.
====================
3. Within the main report, create a subreport based on the stored procedure, and include the parameter to be populated with the multi-value list.
4. Link the Join formula in the main report to the stored procedure parameter in the subreport.
Doing so passes a multi-value parameter to the stored procedure.
Regards,
VinayHi Vinay,
First you need to make sure the stored procedure accepts multiple values in the fashion 'a','b','c'.
Then, create this formula in the Main Report:
numbervar i;
stringvar s;
for i:= 1 to ubound({?Parameter}) do
s := s + "'" + {?Parameter}<i> + "'" + ",";
left(s,len(s)-1);
Link this formula to the sub-report's parameter.
Hope this helps!
-Abhilash
Maybe you are looking for
-
Need help in IP : no authorization issue
Hi, subject: getting authorization error for multiprovider name in RSPLAN, but my role has that name in it. i have created a planning sequence . the aggregation level is built on a mulitprovider which is built upon a realtime infocube. i am able t
-
What are the fundamentals concepts to know about BEX Queries on Multi Cube?
Hi ALL, i have executed a Bex Query on a Multi Cube (2 Cubes: SalesAnalysis, SalesAnalysisHistoric) but i havn't received the same data that we have in R/3, after i have executed the same query on just one cube (SalesAnalysis) and the result it was c
-
My laptop accesses the internet, my pc accesses the internet, but I cannot get the two pc's to talk to each other...read hard drives.
-
Flash form to email not loading message body
I'm creating a form in Flash for a client's website to make online reservations. I've been experimenting with asp scripts and found two that work fine, except that the body of the email won't load. The emails come through fine, but blank. Since it's
-
Tell me if I'm wrong, but after watching a music video, I get a black screen and won't go to the next video. If I hit the fwd button, I get the prior video menu and can select another video. Is this the way its suppose to work? Is there a way to play