Calling a Crystal Report using the ReportViewerBean

Hello...I am writing a java application to display a Seagate Crystal report using the ReportViewerBean.
The problem I am having is trying to display the report within the viewer.
The following is a sample from my code where I create an instance of the viewer bean.
ReportViewerBean rvb = new ReportViewerBean();
JFrame frame = new JFrame();
frame.setSize(1000,1000);
frame.getContentPane().add(rvb,BorderLayout.CENTER);
frame.show();
rvb.start();
try
String strUrl = "http://localhost:8080/Report1.rpt";
rvb.setReportName(strUrl);
catch(java.beans.PropertyVetoException pve)
System.err.println("Property change vetod");
The Sys-out from the Report Viewer bean is "No reponse from server".
The sysout from my server (Tomcat 3.2.3) is:
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): FileHandler: Ends with \/. D:\jakarta
-tomcat-3.2.3\jakarta-tomcat-3.2.3\webapps\Report1.rpt\
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): 404 R( /Report1.rpt + + null) null
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): FileHandler: Ends with \/. D:\jakarta
-tomcat-3.2.3\jakarta-tomcat-3.2.3\webapps\Report1.rpt\
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): 404 R( /Report1.rpt + + null) null
Any suggestion/help would be greatly appreciated...TY

I am getting the same 'No Response from Server' Message.
URL = http://Pepperland/STPARMListing.rpt?viewer=java&vfmt=encp&vgen=728&pversion=3&language=en&promptOnRefresh=1
Parameters = cmd=get_pg&page=1&incomplete_page=1&incomplete_page_count=1&smart_images=1
No response from server.
The WWW service and the Default Web Site are up and running.
I tried configuring the application settings in the IIS MMC but I was unable to determine which .dll to associate with the .rpt extension.

Similar Messages

  • Display structure in crystal report using structure created in BEx.

    I created a structure in BEx query designer and trying to display the structure as a hierarchy in crystal report.
    Iam not able to accomplish it. the crystal report is displaying the structure with no nodes. please help

    Hi,
    in case you created a BEx query with 2 structure - one for keyfigures and one as characteristic structure - then the structure for the characteristics will result in Crystal REports using the BW MDX Driver as a single field and each element of the structure will result in a row of data.
    regards
    Ingo Hilgefort

  • How to get a report "closed" when using the ReportViewerBean

    I read the article /people/ted.ueda/blog/2008/12/20/crystal-reports-for-eclipse--ensuring-report-cleanup from Ted Ueda regarding cleaning up reports for the RAS server.  However, I'm trying to figure out how to get this accomplished for a thick client accessing a local rpt file and then displaying that file using the ReportViewerBean.  I can't seem to get the report closed. I tried the dispose() techniqe from the article, but with no success.
    My basic process is:
    1) Press button on main frame to open and set up report
    2) Pass open report (via ReportClientDocument) object to the viewer frame class (which views report in separate window using ReportViewerBean)
    3) Close viewer window when done, destroy ReportVieweBean and close ReportClientDocument
    4) Press button again on main frame later to view report
    If I set up the report but skip the step of sending the report to the viewer frame, ReportClientDocument.isOpen() will go from true to false after I execute just  the ReportDocumentClient.close() command.  However, if open the viewer frame, I cannot get the report closed.
    In the window closing event for my viewer window I have:
    public void quit() {
                try {
                    CrystalReportViewer crv1 = new CrystalReportViewer();
                    crv1.setReportSource(reportClientDoc.getReportSource());
                    reportViewer.destroy();  //this is a ReportViewerBean
                    reportClientDoc.close();  //this is a ReportClientDoc
                    crv1.dispose();
                    //the following is always true
                    System.out.println("ReportClientDoc.isOpen: " + reportClientDoc.isOpen());
                    this.dispose();
                catch(ReportSDKException ex) {
                    ex.printStackTrace();
                catch(ReportSDKExceptionBase ex) {
                    ex.printStackTrace();
    I'm using the latest Java CR4E 12.2.205.825 downloaded from the CR4E website.  Any ideas?
    Edited by: Joseph Huber on Mar 16, 2010 8:13 PM

    The webservices you are trying to use are not the ones used for enterprise, they are used for non-enterprise applications accessing reports that are stored in a specific location on the web server.
    Here are samples that use our Enterprise SDK:
    [https://boc.sdn.sap.com/samples/84/1193|https://boc.sdn.sap.com/samples/84/1193]
    Here are samples that use our Enterprise Web Service SDK:
    [https://boc.sdn.sap.com/samples/84/1197|https://boc.sdn.sap.com/samples/84/1197]
    You can also look at the SDK documentation available here:
    [http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]

  • Problem in Display the Crystal report using Crystal report Viewer 2008

    Hi All,
    I have developed crystal web project with crystal report using Eclipse IDE. when I deploy this web application using Tomcat server 6.0 in Windows xp, Windows Vista.. It is working fine..
    But When I deploy it into Windows 2000 server ,  I am not able to see Last 2 columns of the report page in the Viewer.
    But When I tried to Export as Excel, I got all the datas in the Report and also when I preview the report in Eclispe IDE using crystal viewer plugin it is working fine in Windows 2000 server also..
    Thanks in Advance for your help..
    Regards,
    SathiyaMBPS

    Windows 2000 is not supported in current versions of CR. Check the platforms PDF file.

  • Print a report in crystal Report using SDK

    Hi Dear;
    any body can publish a sample code how can i print a report built in crystal report using SDK?
    regards;

    Hi Dany,
    Hope the following code will help u .
    before calling the function make a XML by using dataset.writexml, in which you have to pass the name of your stored procedure.
    for this you have to decalre commantype as stored procedure.
    first parameter of this is rpt name . asecon paramer is ur xml name which you got from DAtaset.writexml.
    Sub ShowReport(ByVal rptName As String, ByVal SourceXML As String)
            Try
                Dim oSubReport As CrystalDecisions.CrystalReports.Engine.SubreportObject
                Dim rptSubReportDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument
                Dim rptView As New CrystalDecisions.Windows.Forms.CrystalReportViewer
                Dim rptPath As String = System.Windows.Forms.Application.StartupPath & "\" & rptName
                Dim rptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                rptDoc.Load(rptPath)
                For Each oMainReportTable As CrystalDecisions.CrystalReports.Engine.Table In rptDoc.Database.Tables
                    oMainReportTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                Next
                For Each rptSection As CrystalDecisions.CrystalReports.Engine.Section In rptDoc.ReportDefinition.Sections
                    For Each rptObject As CrystalDecisions.CrystalReports.Engine.ReportObject In rptSection.ReportObjects
                        If rptObject.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                            oSubReport = rptObject
                            rptSubReportDoc = oSubReport.OpenSubreport(oSubReport.SubreportName)
                            For Each oSubTable As CrystalDecisions.CrystalReports.Engine.Table In rptSubReportDoc.Database.Tables
                                oSubTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                            Next
                        End If
                    Next
                Next
                rptView.ReportSource = rptDoc
                rptView.Show()
                Dim oFrm As New System.Windows.Forms.Form
                rptView.DisplayGroupTree = False
                rptView.Dock = System.Windows.Forms.DockStyle.Fill
                rptView.Location = New System.Drawing.Point(0, 0)
                oFrm.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
                oFrm.Controls.Add(rptView)
                oFrm.Name = "rptForm"
                oFrm.Text = "rptForm"
                oFrm.ResumeLayout(False)
                oFrm.WindowState = System.Windows.Forms.FormWindowState.Maximized
                oFrm.TopMost = True
                oFrm.ShowDialog()
            Catch ex As Exception
                oApplication.MessageBox(ex.Message)
            End Try
        End Sub

  • How to Call a Crystal Report from Form 6i?

    Dear All,
    Can anybody tell me how to call a crystal report, designed using Crystal Report 9, in form 6i? I tried one solution by using the host command but it was not working properly. The code I was tried is like:
         f_name varchar2(240);
         f_name :='C:\Program Files\Crystal Decisions\Crystal Reports 9\crw32.exe D:\Form16\Form16_Rep\bin\Debug\Form_16_character_emp.rpt';
                   host(f_name);
    This open the crystal report in design view. So how we call a report which run automatically like in .Net. How to pass the connection info of the database schema?
    Thanks & Regards
    Sunil

    Hi
    First see the built in run_product function.
    You can create a parameter list, add the
    "MAXIMIZE" paramter in it and then call your
    report with run_product passing your parameter list in it.
    hence the called report will be maximized.
    null

  • Bapi Function call from Crystal reports 2008. import parameters syntax.

    Dear,
    I have an issue with calling a function directly from Crystal reports (2008) in the R3 system.
    (if this belongs in another thread , please add the link if moved !)
    I try to get data through function "BAPI_CLASS_GET_CLASSIFICATIONS".
    Till now all possible input parameters have no data-result.
    I already read other threads stating that 'for example' the Language key needs to be provided in a single character. 'E' in stead of 'EN'.
    I also already created a Z-wrap-function that fills out all input parameters 'hardcoded'. This works.
    clearly there are som syntax changes in passing the values to R3 when called from Crystal Reports.
    Can someone state which syntax has to be followed for numeric fields, for datefields etc. (so when i make these dynamical, I know which syntax should be the outcome of the formula)
    in my function that doesn't work I use these selections:
    (this function is called in a standard report only calling this function)
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_LANGU_ISO} = "E" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_LANGU_INT} = "E" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.T_CLASS_OBJECTS.OBJECT_TYPE} = "MARA" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.T_CLASS_OBJECTS.OBJECT_KEY} = "000000000000000085" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_CLASSNUM} = "DSWTEST" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_CLASSTYPE} = "001" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_KEY_DATE} = Date (2011, 08, 05)
    I already tried other languages or the 'EN' as input.
    (I would like to know how the date is passed exaclty to R3.)
    The function is of course RFC enabled.
    when I call the my Z-function with predefined inputparameters in R3 it does give the wanted result.
    FUNCTION ZBAPI_CLASS_GET_CLASSIFICATION.
    ""Local Interface:
    *"  TABLES
    *"      OBJECT_CLASSIFICATION STRUCTURE  BAPI_OBJECT_VALUES
    *"      CLASS_OBJECTS STRUCTURE  BAPI_CLASS_OBJECTS
    data ZOBJECT_CLASSIFICATION type TABLE OF BAPI_OBJECT_VALUES.
    data ZCLASS_OBJECTS  type TABLE OF BAPI_CLASS_OBJECTS WITH HEADER LINE.
    ZCLASS_OBJECTS-OBJECT_KEY = '000000000000000085'.
    ZCLASS_OBJECTS-OBJECT_TYPE = 'MARA'.
    Append ZCLASS_OBJECTS.
    CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
      EXPORTING
        CLASSTYPE                    = '001'
        CLASSNUM                     = 'DSWTEST'
    *   KEY_DATE                     = SY-DATUM
    *   LANGU_ISO                    =
    *   LANGU_INT                    =
    *   CHARACTS_OF_CLASS_ONLY       =
    * IMPORTING
    *   RETURN                       =
      TABLES
        OBJECT_CLASSIFICATION        = ZOBJECT_CLASSIFICATION
        CLASS_OBJECTS                = ZCLASS_OBJECTS
    OBJECT_CLASSIFICATION[] = ZOBJECT_CLASSIFICATION[].
    ENDFUNCTION.
    please advise.
    once again if this should be moved to another forum , add the link please!

    Dear,
    I just debugged my Z-function, after adding all input parameters as in the standard BAPI function.
    All parameters seems to be passed correctly except from the table parameters from
    CLASS_OBJECTS
    So all I_parameters are passed :
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_INT} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_ISO} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_KEY_DATE} = Date (2011, 08, 05) and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSNUM} = "DSWTEST" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSTYPE} = "001" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CHARACTS_OF_CLASS_ONLY.BAPIFLAG} = ""
    but the table parameters aren't coming through:
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_TYPE} = "MARA" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_KEY} = "000000000000000085" and
    these are 'blanco' in the function.
    also after the function is executed and all data is retrieved, when passing the data back to Crystal reports, once again, the table result isn't passed to Crystal Reports.
    please advise

  • Error in switching from one database location  to another database location in Crystal Reports using JSP

    Hi,
    Please help me in resolving the issue while changing the database dynamically in crystal reports using JSP. I followed the below link to change DB connection dynamically.
    CRJava Modify DB Location
    Please help me on this.
    While switching from one database to another i found the issue.
    dbController.replaceConnection(oldConnectionInfo, newConnectionInfo,pFields,replaceParams);
    The Error is:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Subreport does not exist.---- Error code:-2147467259 Error code name:failed
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2284)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:732)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)
        at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:480)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:421)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)
        at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
        at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
        at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.char(SourceFile:220)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.new(SourceFile:240)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.do(SourceFile:452)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.if(SourceFile:429)
        at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:156)
        at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)
        at com.crystaldecisions.sdk.occa.report.application.an.a(SourceFile:65)
        at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.a(SourceFile:1921)
        at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.setCurrentValues(SourceFile:2237)
        at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.setCurrentValue(SourceFile:2328)
        at org.apache.jsp.DynamicDB_jsp._jspService(DynamicDB_jsp.java:255)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.crystaldecisions.reports.reportdefinition.ReportModificationException: Subreport does not exist.
        at com.businessobjects.reports.sdk.requesthandler.ParameterRequestHandler.a(SourceFile:229)
        at com.businessobjects.reports.sdk.requesthandler.ParameterRequestHandler.for(SourceFile:214)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1492)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)
        ... 47 more
    Any help Appreciated.
    Thanks
    Penchal

    Do you have subreports in your reports?
    If yes, set the connection info for the subreports as well.
    Additionaly refer to the below discussion
    http://scn.sap.com/thread/3153289
    As you are using Crystal reports for ecllipse runtime libraries to build your jsp, you would need to post your dicussions in the below forum to get better response.
    http://scn.sap.com/community/crystal-reports-for-eclipse
    The above space is dedicated for the issues with crystal reports for ecllipse.
    Thanks,
    Prithvi

  • Calling a Crystal Report from and Oracle Form6i

    I am attempting to call a crystal report from within an oracl form. I would appreciate documentation/suggestions on how to accomplish this task.
    Thanks
    NBranson

    HI Nicole,
    I have used crystal reports from oracle forms in one of my project. Send a mail to this address, i ll reply you back with the source code. My email address is [email protected] .
    But if you just want to know the steps here it is :
    STEPS TO display the Crystal Report in Oracle Forms :
    1. Create a new form.
    2. Create a control block, name it 'CONTROL'.
    3. Create a CONTENT canvas, name it 'REPCAN'.
    4. Create an ActiveX control on the canvas, name it 'CrystalReport1'.
    5. Create a Image item , name it 'REP'. Make sure that image item overlaps the ActiveX control completely, this image item is used to get the item handle. Enlarge this object such a way that it will fit the window, the report gets displayed in this item so the item size should be adeqately large.
    6. Right click on the ActiveX control item, select Insert Object from the menu.
    7. From the list select Crystal Reprot Control.
    8. Select the Progrm=> Import OLE Library Interface Menu in the form.
    9. Select Crystal.CrystalReport from the List, this will list two methods and one Event . The two methods are CrystalCtrl and IRowCursor, the event is CrystalReprotEvent.
    10. Select all the three and click on the OK button to accept. This will create the program units.
    11. In the When-New-Form-Instance trigger of the form write the following code.
    Declare
         charWinHandle varchar2(50);
         numWinHandle Number;
    Begin
         Set_Application_Property(Cursor_Style,'BUSY');
         charWinHandle := Get_Item_Property('Control.Rep',Window_Handle);
         numWinHandle := To_Number(charWinHandle);
         :Item('Control.CrystalReport1').OCX.Crystal.CrystalReport.WindowParentHandle := numWinHandle;
         :Item('Control.CrystalReport1').OCX.Crystal.CrystalReport.WindowState := 2;
         :item('CONTROL.CRYSTALREPORT1').OCX.Crystal.CrystalReport.Connect := 'DSN=;UID='||Get_Application_Property(UserName)||';pwd='||Get_Application_Property(password)||';dsq=;';
         Crystal_CrystalCtrl.ReportFileName (:Item('Control.CrystalReport1').interface,'C:\Sample_Rep.Rpt');
         Set_Window_Property(Forms_Mdi_Window,Window_State,Maximize);
         Set_Window_Property('MAIN',Window_State,Maximize);
         :reptitle := 'Report Preview Window';
         numWinHandle := Crystal_CrystalCtrl.PrintReport(:Item('Control.CrystalReport1').interface);
         Set_Application_Property(Cursor_Style,'DEFAULT');
    End;
    One thing to mark here is the, change the report name and path according to your required file name and path in
    Crystal_CrystalCtrl.ReportFileName (:Item('Control.CrystalReport1').interface,'C:\Sample_Rep.Rpt');
    12. If you want to run multiple reports then create a parameter and pass the file name to the form through the parameter. In the above line of code, you can replace the file name with parameter, so each time the form is called with different parameter with the file name , it displays different reports.
    13 Run the Form.

  • Is it possible to call a Crystal Report from Oracle Forms.

    Hi Everybody,
    I got a Dout about Crystal Reports. Is it possible to call Crystal Reports from Oracle Forms.

    Hello,
    That depends are you running Forms via the WEB or client/server. I will assume you are running client/server since you are running crystal reports. The answer is yes. All you will have to do is use the HOST command or the win_api_shell to run the report. Look in the Forms manual for information on the commands and what else you may need.
    John

  • Internal error exception when try to export Crystal Report using V2008 C#

    Hello
    Im working in an application that should send a parameter to a crystal report. Everything works fine when i test the report in the CR 2008 and shows the information correctly
    After has the report working, i design a Visual C# application using forms and loading and exporting the report, which still works ok (generates the pdf file with the information)
    Then i convert this application as a console application. The point is i need the report working as a windows service, to generate it every 15 minutes without user intervention (but try it as a console application first to be sure it will work ok before creating as a service)
    Then i started the service. But when i call the report it sends an exception that i cannot understand:
    Internal exception No se pudo abrir la conexion.
    No se pudo abrir la conexion.
    Prueba {DDE88B40-8A22-4EDB-9DEE-A5033DAA0140}.rpt
    This is my code for the report that works fine as long as i don´t put any parameter into the sql command:
    ReportDocument cryRpt = new ReportDocument();
    cryRpt.Load(nomRepU);
    cryRpt.Refresh();
    cryRpt.SetParameterValue("EVAId", evaID);
    ExportOptions CrExportOptions = new ExportOptions();
    DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
    PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
    CrDiskFileDestinationOptions.DiskFileName = @"" + path + "
    " + nomRepPDF_Exp;
    CrExportOptions = cryRpt.ExportOptions;
    CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
    CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
    CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
    CrExportOptions.FormatOptions = CrFormatTypeOptions;
    cryRpt.Export(); -
    here i get the exception
    I checked that the parameter is being read correctly in the crystal report as i remove all the sql commands and just put the parameter in the heading of the report, and is show as supposed and generates the pdf file automatically, but when i assign the parameter to the sql command (select * from myTable where idTable = {?EVAId}  ) the crystal report send the exception i mentioned above
    I don't know what to do, i don't know if i configuring correctly the report or something is missing. I would appreciate any help. If need more information please let me know. This is making me crazy
    Thanks in advance
    Veronica Estrada

    Hello all
    I just fixed my issue, i made some changes in the code as well as in the crystal report:
    *Crystal report changes*
    I removed the parameter that i have to filter the information, instead i in the C# code i let the crystal report which records to show
    Note: in the preview of the report all information will be shown, however i won´t use it this way so is not a problem
    *Visual C# changes*
    // Load the crystal report
    cryRpt.Load(nomRepU);
    // Establish SQL conection parameters - below the code for the function
    SetTableLocation(cryRpt.Database.Tables);
    //This is really the main change, because if i use "setParameter" function still generates "Internal exception"
    cryRpt.DataDefinition.RecordSelectionFormula = "{EVAPrincipal.EVAId} = " + evaId;  // ---> Should be the same name of the table and the recordID i want to show
    // Export function
    cryRpt.Export();
    private void SetTableLocation(Tables tables)
                ConnectionInfo connectionInfo = new ConnectionInfo();
                connectionInfo.ServerName = @"" + server;  // ODBC
                connectionInfo.DatabaseName = @"" + initialCatalog;  // data base name
                connectionInfo.UserID = @"" + user;
                connectionInfo.Password = @"" + password;
                foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                    TableLogOnInfo tableLogOnInfo = table.LogOnInfo;
                    tableLogOnInfo.ConnectionInfo = connectionInfo;
                    table.ApplyLogOnInfo(tableLogOnInfo);
    My notes:
    I guess i had two problems: the first with the SQL connection, in connectionInfo.ServerName i was using the name of the instance instead of the ODBC name. The second is the way the parameter is received in the crystal report as it works as windows service (this is my guess) then if i control everything through the C# code it runs perfect!
    Hope this helps if anyone has a similar problem
    Regards
    Veronica Estrada

  • Call a Crystal report program

    Hi there,
    anybody has a statement sample program to call a CRYSTAL REPORT program

    Hey,
    Your answer is not funny, just I thiink you are a
    little boy??Actually you're 100% accurate. I'm too young to dictate my thoughts clearly, so I tell my parents what I'm thinking and they write it.
    >
    Sorry, just I thought this will be a serius Forum,
    but is notThis is a serious forum. Ask a decent question and you will receive a decent answer. Ask a completely open-ended question about something and show absolutely no initiative to solve the problem yourself, and you will get me telling you to search Google.
    Which by the way is a valid suggestion. This is a Java forum, not a crystal report forum. Google is your friend. Do some research on your own, and come back here if you have a specific, java-related question.
    By the way unlike most people I actually tried to help you out by posting a link to something (that I found in five seconds by doing a Google search) that looked useful. Did you look at it? The title of the article is "Interface to control Crystal Reports", and it explains how to do so using Java.
    Message was edited by:
    Djaunl

  • Report using the feature of opening Excel in SAP.

    We are building a custom report using the feature of opening Excel in SAP.
    We need to do things like:
    Protect the worksheet, but leave some rows unprotected
    Freeze the windows
    Have any one ever used this feature before? Can any know how to do this?
    Thank you,
    PV

    No, no extra somewhere.  What it actually is, is that you are calling the methods of the application(sort of).  Here is an example application which does to the freeze panes.
    report zrich_0001.
    include ole2incl.
    data: e_sheet type ole2_object.
    data: e_appl  type ole2_object.
    data: e_work  type ole2_object.
    data: e_col1  type ole2_object.
    data: e_col2  type ole2_object.
    data: e_cols  type ole2_object.
    data: e_cell  type ole2_object.
    data: e_wind  type ole2_object.
    data: field_value(30) type c.
    parameters: p_file type localfile default 'C:RichTest.xls'.
    start-of-selection.
    * Start the application
      create object e_appl 'EXCEL.APPLICATION'.
      set property of e_appl 'VISIBLE' = 1.
    * Open the file
      call method of e_appl 'WORKBOOKS' = e_work.
      call method of e_work 'OPEN'
              exporting
                   #1 = p_file.
    * Write data to the excel file
      do 20 times.
    * Create the value
        field_value  = sy-index.
        shift field_value left deleting leading space.
        concatenate 'Cell' field_value into field_value separated by space.
    * Position to specific cell  in  Column 1
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 1.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 2
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 2.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 3
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 3.
    * Set the value
        set property of e_cell 'Value' = field_value .
      enddo.
      call method of e_appl 'Columns' = e_col1
             exporting
                  #1 = 1.
      call method of e_appl 'Columns' = e_col2
              exporting
                  #1 = 2.
      call method of e_appl 'Range' = e_cols
              exporting
                #1 = e_col1
                #2 = e_col2.
      call method of e_cols 'Select' .
      get property of e_appl 'ActiveWindow' = e_wind.
      set property of  e_wind 'FreezePanes' = 1.
    ** Close the file
    *  call method of e_work 'close'.
    ** Quit the file
    *  call method of  e_appl  'QUIT'.
    *  free object e_appl.
    Regards,
    Rich Heilman

  • ALV report using the field catalog

    which is the quickest way to generate an ALV report using the field catalog merge.  without needing to build the field catalog manually .
    is it easier to create a structure and passe it in the field catalog merge .  if yes can i have an example plzzzz

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
                             Data declaration
                             Data retrieval
                             Build fieldcatalog
                             Build layout setup
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    *            i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL

  • Calling BI Publisher report  using FND_SUBMIT.SUBMIT_REQUEST---

    Hi Experts,
    We have a requirement in which BI Publisher report will be called using a PL/SQL procedure.
    i am successfully able to call BI publisher report using FND_SUBMIT.SUBMIT_REQUEST function.
    Business requirement is that the BI publisher report can be generated in PDF,Excel or HTML format.
    but i am able to generate the report only in xml format.
    Please guide me how to achieve this.
    Thanks in Advance,
    Cheers
    Andy.

    Make sure you register the Data Definition (with same code as concurrent program short name) and register/upload the Template correctly.
    Call fnd_request.add_layout
    Then call FND_SUBMIT.SUBMIT_REQUEST
    Regards,
    Gareth

Maybe you are looking for

  • NEED TO KNOW HOW CONVERT GIF FILE TO SYMBOL FROM DOCUMENT CLASS

                                                ROBERT LEAHONG                                   COMPUTER PROGRAMMER / ASP Web Devloper Hello,         I need to convert a GIF file (PICTURE) to a symbol (Button) From within The Document Class using Action

  • How to debug Abap List in New Debugger?

    Hi All How can we debug the ABAP list in the new debugger? I know that it can be done by switching to old debugger. Or Did SAP by any chance missed this option? Regards, Rupesh

  • Activation of split valuation

    Gentlemen I would like to activate split valuation for many of MROs.  This is required to implement refurbished process in plant maintenance.  We have stock of many of the materials and open PO and PRs as well. Under this condition is there any way t

  • In what steps does currency conversion take place in BW?

    Hi Experts, could someone explain me in what steps BW performs the currency conversion making use of the TCUR....  tables. E.g. we have a certain rate and ratios in TCURR table but these are overruled by settings in TCURF (alternative exchange rate)

  • Blank grey panel showing up in PS 2014, panel not loading

    Not an issue with the extension. Sometime loads properly. Sometimes after clicking into the window. How to fix? Is there a log somewhere that would provide clues?