Open a Crystal Report preview using a button

Hello. I need to open a Crystal Report preview using a button from my add-on. I've already created my report, so I need to create the object, pass the parameters and open an screen with my preview. Does anyone has a C# example? Thank you.

hi,
this is code for open the crystal report press the button.
First import the crystal report  using Report  and  layout manager
goto administration->setup->general--->Report  and  layout manager
create one button in add-on form.when we press the button the following event triggered.
get the docnumber for that particular form and pass it.
Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
                        If pVal.ItemUID = "btnPrint" Then
                            Dim strAcNcmr As Integer
                            strAcNcmr = objForm.Items.Item("txtDocNo").Specific.Value
                            Dim oRS As SAPbobsCOM.Recordset
                            oRS = objSBOAPI.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                            oRS.DoQuery("SELECT MenuUID FROM OCMN WHERE Name = ' Purchase Indend' AND Type = 'C'")
                            objSBOAPI.SBO_Appln.ActivateMenuItem(oRS.Fields.Item(0).Value.ToString())
                            Dim oForm1 As SAPbouiCOM.Form
                            oForm1 = objSBOAPI.SBO_Appln.Forms.ActiveForm
                            oForm1.Items.Item("1000003").Specific.String = strAcNcmr
                            oForm1.Items.Item("1").Click()
                            oForm1.Items.Item("1").Visible = False
                            oForm1.Items.Item("2").Click()
                        End If
this is easy solution for open the crystal report for add-on form
Thanks & regards
B.lakshmi narayanan

Similar Messages

  • Open a Crystal Report preview from an Add-on

    Hi All,
    I'm just trying to open a Crystal Report preview using a button from my add-on.
    I want to use the SAP Crystal report, (the runtime integrated with SAP 8.8)
    Basically I have my report created, so I need to create the object, pass the parameters and open an screen with my preview.
    The main idea is open this Crystal report object when the addon starts and then just use that object.
    I've found an example with this object SAPbobsCOM.ReportLayoutsService but this is for SAP 8.8.1 and I'm working with 8.8. I don't know if i can use SAPbobsCOM.ReportLayout.
    I need a simple example please.
    Thanks .

    Hi,
    Have you read through this: View Crystal Report from add-on ?
    Thanks,
    Gordon

  • How to open Crystal report 11 using the Visual c++ 6.0 code

    I am using Visual c++ 6.0.I can't open crystal report X1 from my vc++ application. The same code which I have used for crystal report 7.0 is using for crystal report X1.But it shows "Unbale to load the report". Please help me out.
    The code snippet I have used is given below for the reference
    //m_Crystal_Image - Object of CCrystalCtrl class
    //csDBFilePath - Access Database File path
    //csReportFilePath - Crystal report 11 file path
    m_Crystal_Image.SetReportFileName(csReportFilePath);
    m_Crystal_Image.SetWindowTitle("Test Report");
    m_Crystal_Image.SetDataFiles(0,csDBFilePath);
    m_Crystal_Image.SetDiscardSavedData(true);
    m_Crystal_Image.SetDestination(0);
    m_Crystal_Image.SetWindowState(2);
    m_Crystal_Image.SetAction(1);
    Thanks for ur help in advance.....

    same as:
    How can I open the crystal report X1 report from the vc++ application?
    Locking thread
    Ludek

  • Crystal report preview window freezes if I push any key on the keyboard

    our system is a pretty old one, and we are still using crystal report 7 and vc6(mfc6).
    It is a simple dialog based application with a button and a flex grid7.1 component on it.
    when the button is clicked, a crystal report preview window will be opened and become the active window.
    the problem is that, when i pushed a key on the keyboard ('a' for example) the whole application will freeze, and CPU Occupancy Rate is 100%.
    but if I switch the dialog to be current active window after a preview window opened, keyboard input won't make the application freeze.
    It seems that crystal report preview window don't know how to deal with the keyboard input.
    BTW:
    I use the methods below to open a preview window.
    PEOpenEngine
    PEOpenPrintJob
    PEPrintReport
    have anyone here met any similiar problems before?
    I really need your help.
    thanks in advance.
    Edited by: zhengli on May 26, 2010 4:36 AM

    Moved to Legacy Application Development SDKs forum.
    I have nothing for you, other than; consider upgrading - after all CR 7 shipped in 1998(!). I don't know what OS you are on, but I suspect what ever OS it is, it was not even in a concept stage of thought when CR 7 shipped. E.g.; this may be an OS issue more than anything else.
    BTW., print engine APIs were retired in version 9 of Crystal Reports. At this time, your best option is to upgrade to CR 2008 (12.0)and use .NET or Java. If you are using VB 6 or equivalent, you could still upgrade to CR XI r2 (11.5) and use the Report Designer Component (RDC). However, note that CR XI r2 will be out of support in June of this year. And CR XI R2 is the last version of CR to include the RDC.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Edited by: Ludek Uher on May 26, 2010 8:28 AM

  • Opening a Crystal Report in B1 8.8 in a User Defined Form representing UDO

    Hi Experts,
    Is it possible to open a Crystal Report from a User Defined Form representing my UDO?
    I had developed a 'Vendor Quotation' UDO and its  User Defined Form
    I wanted to show the report while clicking the Preview menu in SAP B1 8.8 toolbar.
    I have created the Crystal report and used the record selection as {@OVQT.DocEntry} = {DocKey@}
    Please help
    Also, is it possible to add Print layout and assign a default Print layout to this User Defined Form?
    Thanks in advance
    Regards
    Arun

    Hi,
    I also face the same problem. I make a master type using UDO. But i want to print it.
    In my opinion ( i haven't tried this way ). If we make a UDO ( master or document type ) , we will find the docentry and object field in our UDT. Both of these will connect between SAP form and Crystal report. In crystal report we select the tmsp_doclinetypelayout. It is a store procedure which will connect between SAP form and CR. Before that try to modify this SP by adding the udo object.
    Fyi, if i'm not mistake dockey is connected to docentry SAP form.
    Thanks
    regards
    bodhi86

  • Open a crystal report on B1 look in feel

    There's a way to open a crystal report on B1 look in feel?
    In SAP B1 8.8 we have a way to open a external crystal file. In menu Tolls >> Preview External Crystal Reports File, you inform the file and the report will open in a SAP B1 form.
    I need open a report from my add-on, and I'll wish make this way.
    any suggestions?
    Regards!

    Hi
    You can use Report and Layout Manger for uploading reports in SAP B1 Administration>Setup>General--->Report And Layout manager. Try this link for displaying report from your addon
    Possible solution: Open Crystal Reports Print Layout from UDO form
    Hope this helps
    Regards
    Arun

  • Crystal Report Intigration using screen programming

    I am having 2 problems regarding crystal report.
    1) I have developed crystal report using crystal report wizard for table 'MARA'
    now i want to call this crystal report using screen programming. How i can do this.
    2) and how i can call parameterised crystal report using abap programming.
    can any one help me ?
    Thanks.

    hi,
    this is code for open the crystal report press the button.
    First import the crystal report  using Report  and  layout manager
    goto administration->setup->general--->Report  and  layout manager
    create one button in add-on form.when we press the button the following event triggered.
    get the docnumber for that particular form and pass it.
    Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
                            If pVal.ItemUID = "btnPrint" Then
                                Dim strAcNcmr As Integer
                                strAcNcmr = objForm.Items.Item("txtDocNo").Specific.Value
                                Dim oRS As SAPbobsCOM.Recordset
                                oRS = objSBOAPI.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                oRS.DoQuery("SELECT MenuUID FROM OCMN WHERE Name = ' Purchase Indend' AND Type = 'C'")
                                objSBOAPI.SBO_Appln.ActivateMenuItem(oRS.Fields.Item(0).Value.ToString())
                                Dim oForm1 As SAPbouiCOM.Form
                                oForm1 = objSBOAPI.SBO_Appln.Forms.ActiveForm
                                oForm1.Items.Item("1000003").Specific.String = strAcNcmr
                                oForm1.Items.Item("1").Click()
                                oForm1.Items.Item("1").Visible = False
                                oForm1.Items.Item("2").Click()
                            End If
    this is easy solution for open the crystal report for add-on form
    Thanks & regards
    B.lakshmi narayanan

  • Reports are note retreieved by the application if opened in Crystal Report

    Hi to all.
    I am trying to modify one report used by an application I use. The application is made with .NET and, when I launch a preview or a print of this report, the report is not loaded if it is already opened in Crystal Report. To have it loaded, I must close it from Crystal.
    Some time ago (july 2011), this was not a problem. I don't know if .NET version is changed or if Crystal is upgraded. I have CR Developer 12.2.0.290 version installed and the application runs under .NET frameworks from 2 to 4. In tehs erver machine are also installed CR Basic Runtime for V.S. 2008 and C.R 11_5 NetSetup.
    Does anybody know if I can try previews whit RPT opened in C.R ?
    Many Thanks.

    You should be able to. I am not aware of this being a problem with CR 2008 (12.x). There was an issue like this with CR2010, but SP2 solved that. Lets' see what SP4 for CR 2008 does for you:
    SP4
    https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
    SP4 MSI
    https://smpdl.sap-ag.de/~sapidp/012002523100008782532011E/cr2008sp4_redist.zip
    SP4 MSM
    https://smpdl.sap-ag.de/~sapidp/012002523100008782522011E/cr2008sp4_mm.zip
    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]

  • Error when Opening a Crystal Report in a Web Application

    Hi All,
    How are things?
    We are trying to open a Crystal report in a Web Application based on a Web service on Appache Tomcat.
    The report is in the Test Environment poiting to a SQL 2005 Database.
    The report opens and runs fine in Crystal Reports and in Infoview.
    The Web application throws back a long error as shown below.
    Looks to be like a SDK Issue ( Not pretty sure )...
    Could anyone help me out on this?
    STACK TRACE: at BusinessObjects.DSWS.ReportEngine.ReportEngine.GetDocumentInformation(String documentReference, RetrieveMustFillInfo retrieveMustFillInfo, Action[] actions, Navigate navigate, RetrieveData retrieveData) at Service.GetReportWithParms(String rptName, String folderName, String parms, String user, String password, String output, String& strError) MESSAGE: Failed to retrieve binary view of the report. (Error: WRE 02527) CALL STACK TRACE: com.businessobjects.dsws.wsc.common.axis.WSExceptionFactory$ExportReportFailed at com.businessobjects.dsws.wsc.reportengine.Report.getBinaryDocument(Unknown Source) at com.businessobjects.dsws.wsc.reportengine.DocumentAgent.handleGetBinaryView(Unknown Source) at com.businessobjects.dsws.wsc.reportengine.DocumentAgent.handleRetrieveData(Unknown Source) at com.businessobjects.dsws.wsc.reportengine.DocumentAgent.handleActions(Unknown Source) at com.businessobjects.dsws.wsc.reportengine.CrystalReportEngineSoapImpl.getDocumentInformation(Unknown Source) at com.businessobjects.dsws.reportengine.ReportEngineSoapImpl.getDocumentInformation(Unknown Source) at com.businessobjects.dsws.reportengine.ReportEngineSoapSkeleton.getDocumentInformation(Unknown Source) at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.businessobjects.dsws.wsc.common.axis.FlashFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error in File XYZ.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code: 408 ]---- Error code:-2147215357 Error code name:internal at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.export(Unknown Source) ... 49 more
    Thanks,
    Raj

    Moving post to .NET SAP Crystal Reports forum
    Hello Scott
    What browser are you using and what is the version of the browser?
    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]

  • Open a crystal report from WAD with passing  the variables values

    Hi,
    I need to know is there any way to link SAP WAD to crystal reports (open a crystal report from WAD)and pass the values of the variables which are entered in the Web App. (e.g. Customer id,year) should be passed to the Crystal Report.
    Maybe we need to pass parameter by WAD URL but this is just my assumption and have no idea how to do this with passing variable values.
    right now I know the method of how Bex queries which are used as data source for crystal reports but in my current scenario we have the structure like this that bex queries link with WAD and then WAD is linked with crystal reports.
    No doubt that Crystal report is target option in RRI but there the source is Bex Query only but in current scenario we are looking  WAD (web template) as a source to crystal report or crystal report called in WAD.
    Please suggest something on same.
    Thanks
    Take care
    Vishal sharma

    Hello Vishal.
    Did you find a solution for this problem?
    I'm facing right now the same problem, I need a way to link SAP WAD to crystal reports (open a crystal report from WAD) and pass the values of the variables which are entered in the Web App. (e.g. Customer id,year) should be passed to the Crystal Report.
    Have found an answer to this issue? If yes, please kindly inform how have you solved this.
    Best Regars
    Armando Santos

  • Logon Screen when opening a Crystal Report from Add-on

    Hello everyone,
    I have a problem that I've been trying to solve. I have an addon that opens a Crystal Report with the information that the user wants. I tried it in SBO using a SQL db and it worked without problems, but now I've test it in SBO using IBM DB2 db (the client has that db implemented) and the report doesn't open, instead of the report it appears a log in screen asking for the server name, database, user and password.
    I've tried every possibility without success, it returns a message saying that my login is not correct, the thing is that all I've written in that login screen is the correct info, even tried many possibilities... and I can't access to the report!
    I've searched lots of forums for an answer, but none of them helped me. Can anybody help me with this issue?
    Thank you very much,
    Regards,
    Mariana Mazzero

    in case you do sure that is just lose some dll file,I think maybe you can create a install package by using Visual Studio.
    you can create a form and put a crysyal object on the form. and use the wizard.
    Visual Studio will auto collect all dll you needed.
    than you can compare the file list,
    or, you can just install the package on the standalone PC.
    It's a stupid solution.
    but, I think it is effective. :P

  • Open a Crystal Report, run and export

    I am looking for help with respect to running a .rpt report developed in crystal report 2008 from a jsp or java. I need to set the parameters and export the report to PDF. I am looked at many different examples and still I am getting various kinds of error. Please can any one help me out on this.
    Thanks a lot.

    I am getting the below error message when I am trying to open a crystal report from the repository which is using a universe.
    java.lang.NoSuchMethodError: com.crystaldecisions.proxy.remoteagent.ICommunicationAdapter.setProductLocale(Ljava/util/Locale;)V
         com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
         com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
         com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
         com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
         org.apache.jsp.test3_jsp._jspService(test3_jsp.java:93)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    I am using the below code
         // Get the Report Application Factory service from Crystal Enterprise
         IReportAppFactory rptAppFactory = (IReportAppFactory)boEnterpriseSession.getService("", "RASReportService");
         // Get the InfoStore service from Crystal Enterprise
         IInfoStore boInfoStore = (IInfoStore)boEnterpriseSession.getService("", "InfoStore");
         // Retrieve the report by name from Crystal Enterprise
         IInfoObjects boInfoObjects = boInfoStore.query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME = '" + reportName + "'");
         // Open the report into a Report Document object
         ReportClientDocument rcd = rptAppFactory.openDocument((IInfoObject)boInfoObjects.get(0), 0, Locale.ENGLISH);
    Can I please get some help in how to resolve this issue.
    Thank you very much.

  • Interactive Crystal Report - (Opening another crystal report)

    Hello Friends,
         I have crystal report designed using SAP Bex Query. This report shows multiple Key Figure on report.
    I would like to add fature that double click on each of key figure, should open another report {may be subreport} and values get pass from one report to second report.
       The second/sub report should not execute untill its on demand.
       Thanks,
       Ajay

    Hi
    you can use openDocument for this. Take a look here: [http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf]
    Regards,
    Stratos
    PS: If you have another version other than XI 3.1 you can find the related documentation here:
    [http://help.sap.com/businessobject/product_guides]

  • Issue while opening BI4 webi report instance using CMC on IE8 browser

    Hi,
    Having issue while opening BI4 webi report instance using CMC on IE8 browser.
    Steps to reproduce the error:
    1. Login to CMC
    2.  View Webi History.
    3.  Open successful instance  (For the 1st or 2nd time reports are opening up, from the 3rd time it just freeze the session)
    4. After it get freeze we need to close the IE using Task Manager.
    Can any one please suggest a resolution for this issue.
    Thanks,
    Ganesh.M

    Hello Gokul,
    first thing is to check is if your chrome version is supported by your current BO version as specified in the PAM (is it?). If the chrome version is supported, and you still have an issue, then you can check with a sap support engineer.
    best regards,
    Victor

  • SAP crashes every time I open a crystal report

    Hello all,
    Every time I try to open a crystal report, the SAP B1 8.81 PL08 client crashes. Any ideas as to why?

    Hi,
    Please check this in Server Machine.In server Machine also you face the same issue then better
    you post the message to SAP Support Center.
    Regards
    jambulingam.P
    Edited by: Jambulingam P on Nov 18, 2011 8:17 AM

Maybe you are looking for

  • How I can use old iPhoto library?

    Good day! I've re-installed Lion on my Mac. Before that I had copied my iPhoto Library on external HD (copy&paste iPhoto Library folder). When i've installed Lion - i copy my iPhoto Library to Pictures folder. But iPhoto don't work with it. I try to

  • SAP exit  -- user entry variable

    Hello, In my report i need two columns: one is for displaying the value of the current period and the other one is for displaying the cumulated value up to the current period. The info object is 0FISCPER. 1. The current period should be entered via u

  • Organize within a stack

    I have many stacks of multiple photos. Often due to pre-Aperture methods of created various versions for high res, printing, low res,b&w,email,web use, etc. Is there a way in AP2 to open a stack and arrange it by file size with the largest file being

  • Step backward, undo and automatic layer changes.

    A feature of Photoshop that has always annoyed is the way the Photoshop handles stepping backwards. It's taken me years to finally get motivated enough to post something about it, but so be it, lol. Say I'm working on layer 2, and switch to layer 3.

  • Help Choosing specific image for a button - slider not precise enough!

    I am using an image from my movie as a menu button. The slider is not giving me enough precision to seleect the image I want. It seems to move a few frames at a time. Is there anyway to make the slider more precise as it scrolls through the movie? Po