Running a crystal report xi in batch mode (C# runs a crystal report xi in batch mode)

<p>Does anyone know if it is possible in a C# program to submit a Crystal Report XI? </p><p>Our design is to use C# front end to prompt the user for the parameters for the report.  These parameters would be stored in a table.  At night the C# program would wake up and based on the parameters, the C# program would submit the crystal report to run.</p>

hi..
am using .net version 2005 and crystalreports version 9.0
i pass value from crystalreportviewer page to crystal reports design page using parameter fields but they take only first row data only...
i want to display dynamic values .. values are passed correcltly but not displayed... all fields dispalyed same  value from database first row..
is there any solutions .. please reply me..
my mail id: [email protected]

Similar Messages

  • Running Crystal Reports in background mode

    Ist there any way to run Crystal Reports against R/3 (ECC) in background mode instead of as a dialog user? We're having timeout issues since the dialog timeout is set to 30 minutes. We have several reports that run quite a bit longer than that.
    Update: I just answered my own question. Pages 58-59 of the install and configuration guide shows you how to do this.
    Edited by: Mike Garrett on Jan 22, 2009 4:57 PM
    Edited by: Mike Garrett on Jan 22, 2009 8:41 PM

    Hi,
    SIA should be all you need because it is starting the other processes as well. Keep in mind that if you do that that most likely all you reports will run in batch mode (also those called on demand.)
    Ingo

  • RE: Reporting after many forte tasks run in batch mode?

    Actually, if you're looking for MAKEAPPDISTRIB (I assume that's how you
    create distributable) you can see if the command was succesfull or not.
    <<deployrep.js>> This Jscript will look for this string and it will
    generate a report based on the next line in the log file.
    The script assumes you have an environment variable (DESCARTES_ROOT) that
    points to a folder (let's say "D:\TEST"). Under that folder you have a log
    folder ("d:\test\log") which holds the deploy.log log file. You can easily
    change the script to reflect your systems settings.
    The generated report looks like that : <<deployrep.txt>>
    Norocel Popa
    Forte SysEng
    (519)746-8110 x 2292
    -----Original Message-----
    From: [email protected] [mailto:[email protected]]
    Sent: Tuesday, March 16, 1999 11:58 AM
    To: Forte-Users (Adresse de messagerie)
    Subject: Reporting after many forte tasks run in batch mode ?
    Hi,
    I would like to know if overnight builds went okay, and therefore need to
    parse the log(s).
    The issue is that I don't have a proper string to look for (i.e. for
    grep).
    If I consider 'ERROR", then the following message won't be understandable.
    There might a way to cheat with the indentation (i.e. the lines with only
    two first blank chars)..
    Has anyone experimented such a need ?
    J-Paul Gabrielli
    DTS
    SYSTEM ERROR: Service object MySuperApplicationServer.MySuperMgrSO has
    not been partitioned. Therefore, you cannot move it to an existing
    partition.
    Class: qqsp_UsageException
    Error #: [1602, 606]
    Detected at: qqcf_StandardConfig::MoveServiceObject at 3
    Error Time: Tue Mar 16 17:39:26
    Exception occurred (locally) on partition "Fscript_cl9_Client",
    (partitionId = B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1,
    taskId =
    [B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1.1]) in application
    "fscript", pid 22713 on node rambo in environment SuperEnv.

    Hi,
    To trap error message from Forte log, I usually do this
    egrep '(EXCEPTION|Exception|exception|ERROR|Error|error)' filename
    This takes a regular expression to 'egrep' all occurrences of "exception" or
    "error" not matter they are in upper case or lower case.
    Hope this help.
    Regards,
    Peter Sham.
    -----Original Message-----
    From: [email protected] [SMTP:[email protected]]
    Sent: Wednesday, March 17, 1999 12:58 AM
    To: Forte-Users (Adresse de messagerie)
    Subject: Reporting after many forte tasks run in
    batch mode ?
    Hi,
    I would like to know if overnight builds went okay, and
    therefore need to parse the log(s).
    The issue is that I don't have a proper string to look for
    (i.e. for grep).
    If I consider 'ERROR", then the following message won't be
    understandable.
    There might a way to cheat with the indentation (i.e. the
    lines with only two first blank chars)..
    Has anyone experimented such a need ?
    J-Paul Gabrielli
    DTS
    SYSTEM ERROR: Service object
    MySuperApplicationServer.MySuperMgrSO has
    not been partitioned. Therefore, you cannot move it to an
    existing partition.
    Class: qqsp_UsageException
    Error #: [1602, 606]
    Detected at: qqcf_StandardConfig::MoveServiceObject at 3
    Error Time: Tue Mar 16 17:39:26
    Exception occurred (locally) on partition
    "Fscript_cl9_Client",
    (partitionId =
    B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1, taskId =
    [B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1.1]) in
    application
    "fscript", pid 22713 on node rambo in environment
    SuperEnv.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • How to run a 10g report in quiet\batch mode

    Good Afternoon,
    Please advise if there is a way to run a 10g report from command line.
    We use 6i right now and our job scheduler runs reports using "D:\ORADEV6I\BIN\RWRUN60.EXE ..." executable in batch mode on a separate server. We plan to migrate to 10g Database, Forms, Reports. Is there a way to keep this functionality and create a "command" to request the report server to run a report?
    Thank you,
    Dmitri

    So the server (we will call it server1) you have "Redwood Cronacle 6.0.2" installed on has a C: drive and a D: drive. On the D: drive is installed Developer 6i (D:\ORADEV6I). You can install Developer Suite 10g also on the D: drive (D:\ORADEV10G for example). After that, setup Oracle iAS on server2. The good news is you have to change very little code. You can:
    Not use the iAS server at all and use the following command (similar to how you are doing it now) in Redwood:
    return 'D:\ORADEV10G\BIN\RWRUN.EXE'
    ||' userid=:USRPWD'
    ||' module='
    ||v_path||'\'||p_module
    ||' batch=yes paramform=no destype=file'
    ||' desformat=' || v_printer_driver
    ||' desname=:OUTFILE'
    ||' cmdfile=:CMDFILE errfile=:LOGFILE';If you want to use the iAS server, you have to consider where the report will physicall exist. You can have it exist on the reports server or you can have it brought back to the client. If you bring it back to the client you will lose the ability to run this asynchronously (or in batch mode). You will have to play with some of these parameters to get it to work perfectly, but this should be a good start. These are examples of have the report results saved locally on server1...not server2:
    1. Use rwclient to submit a report request
    return 'D:\ORADEV10G\BIN\RWCLIENT.EXE'
    ||' userid=:USRPWD'
    ||' module='
    ||v_path||'\'||p_module
    ||' paramform=no destype=localfile'
    ||' desformat=' || v_printer_driver
    ||' desname=:OUTFILE'
    ||' cmdfile=:CMDFILE errfile=:LOGFILE'
    ||' server=server2';2. Use rwservlet to submit a report request
    return 'D:\ORADEV10G\BIN\RWSERVLET.EXE'
    ||' userid=:USRPWD'
    ||' module='
    ||v_path||'\'||p_module
    ||' paramform=no destype=localfile'
    ||' desformat=' || v_printer_driver
    ||' desname=:OUTFILE'
    ||' cmdfile=:CMDFILE errfile=:LOGFILE'
    ||' server=server2';I would think that Cronacle 6.0.2 can submit a url as a job and wait for the results to be streamed back, so you could look into doing that also, in which case the url you would submit for the job would be something like:
    return 'http://server2:7777/reports/rwservlet?'
    ||' userid=:USRPWD'
    ||' module='
    ||v_path||'\'||p_module
    ||' paramform=no destype=cache'
    ||' desformat=' || v_printer_driver
    ||' desname=:OUTFILE'
    ||' cmdfile=:CMDFILE errfile=:LOGFILE'
    ||' server=server2';

  • How to run a 10g report in batch mode.

    Good Afternoon,
    Please advise if there is a way to run a 10g report from command line.
    We use 6i right now and our job scheduler runs reports using "D:\ORADEV6I\BIN\RWRUN60.EXE ..." executable in batch mode on a separate server. We plan to migrate to 10g Database, Forms, Reports. Is there a way to keep this functionality and create a "command" to request the report server to run a report?
    Thank you,
    Dmitri

    For those of you interested in following this refer to the same thread in the Reports Forum:
    How to run a 10g report in quiet\batch mode

  • Running Reports 6 files in Batch mode in Portal 3.0

    Hai,
    I want to run reports 6 files from webdb. I want to give input parameter values to the reports and then shedul them to run in batch mode. I would be grateful if u explain me the steps in detail.
    Thanks,
    Mathan
    null

    Mathan,
    Actually the Reports forum may be able to help you a little more than this forum can at this point.
    Sue

  • Reporting after many forte tasks run in batch mode ?

     

    Hi,
    To trap error message from Forte log, I usually do this
    egrep '(EXCEPTION|Exception|exception|ERROR|Error|error)' filename
    This takes a regular expression to 'egrep' all occurrences of "exception" or
    "error" not matter they are in upper case or lower case.
    Hope this help.
    Regards,
    Peter Sham.
    -----Original Message-----
    From: [email protected] [SMTP:[email protected]]
    Sent: Wednesday, March 17, 1999 12:58 AM
    To: Forte-Users (Adresse de messagerie)
    Subject: Reporting after many forte tasks run in
    batch mode ?
    Hi,
    I would like to know if overnight builds went okay, and
    therefore need to parse the log(s).
    The issue is that I don't have a proper string to look for
    (i.e. for grep).
    If I consider 'ERROR", then the following message won't be
    understandable.
    There might a way to cheat with the indentation (i.e. the
    lines with only two first blank chars)..
    Has anyone experimented such a need ?
    J-Paul Gabrielli
    DTS
    SYSTEM ERROR: Service object
    MySuperApplicationServer.MySuperMgrSO has
    not been partitioned. Therefore, you cannot move it to an
    existing partition.
    Class: qqsp_UsageException
    Error #: [1602, 606]
    Detected at: qqcf_StandardConfig::MoveServiceObject at 3
    Error Time: Tue Mar 16 17:39:26
    Exception occurred (locally) on partition
    "Fscript_cl9_Client",
    (partitionId =
    B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1, taskId =
    [B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1.1]) in
    application
    "fscript", pid 22713 on node rambo in environment
    SuperEnv.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • Running Crystal Reports in a batch service.

    Post Author: RichardP
    CA Forum: General
    I have set a Windows service to a run a Crystal Reports, and the code is as follows:-
    Public Class WebForm1
    Inherits System.Web.UI.Page
    Dim crReport As New ReportDocument
    Dim strConn As String = ConfigurationSettings.AppSettings("WebOASISConn")
    #Region " Web Form Designer Generated Code "
    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    End Sub
    Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer
    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object
    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    End Sub
    #End Region
    Public Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'Put user code to initialize the page here
    'CrystalReportViewer1.ReportSource = New WebServ5.STPMBReportService
    'Dim NewServ1 As New WebServ5.service
    Dim crConnectionInfo As New ConnectionInfo
    Dim crConnServer As String = ConfigurationSettings.AppSettings("CrConnServer")
    Dim crConnDbName As String = ConfigurationSettings.AppSettings("CrConnDbName")
    Dim crConnUserId As String = ConfigurationSettings.AppSettings("CrConnUserId")
    Dim crConnPassword As String = ConfigurationSettings.AppSettings("CrConnPassword")
    'Dim err As String
    'Try
    crConnectionInfo.ServerName = crConnServer
    crConnectionInfo.DatabaseName = crConnDbName
    crConnectionInfo.UserID = crConnUserId
    crConnectionInfo.Password = crConnPassword
    'C:\Inetpub\wwwroot\WebServ5
    'crReport.Load("http://localhost/WebServ5/STDPOReportService.asmx")
    crReport.Load("http://localhost/WebServ5/STDPOReportService.asmx")
    ' crReport.Load(Server.MapPath("STDPOReportService.asmx"))
    ' Catch ex As Exception
    'Err = ex.Message
    'End Try
    '(Server.MapPath("STDPOReport.rpt"))
    'Dim reportName As Request.QueryString = "STDPOReport"
    'CrystalReportViewer1.LogOnInfo.Add(CObj(crConnectionInfo))
    'rystalReportViewer1.LogOnInfo.Item()
    SetLogOnInfo(crConnServer, crConnDbName, crConnUserId, crConnPassword, "due_in")
    SetLogOnInfo(crConnServer, crConnDbName, crConnUserId, crConnPassword, "stores_item")
    SetLogOnInfo(crConnServer, crConnDbName, crConnUserId, crConnPassword, "unit_info")
    'CrystalReportViewer1.ReportSource = "http://localhost/WebServ5/STDPOReportService.asmx"
    CrystalReportViewer1.ReportSource = crReport
    Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
    Dim MyLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
    For Each myTable In crReport.Database.Tables
    '&#91;With MyLogonInfo.ConnectionInfo
    'End With
    MyLogonInfo.ConnectionInfo = crConnectionInfo
    myTable.ApplyLogOnInfo(MyLogonInfo)
    Next
    End Sub
    Private Sub SetLogOnInfo(ByVal server As String, ByVal database As String, _
    ByVal userID As String, ByVal password As String, ByVal _
    table As String)
    Dim logOnInfo As New TableLogOnInfo
    logOnInfo = crReport.Database.Tables.Item(table).LogOnInfo
    ' Set the connection information for the table in the report.
    logOnInfo.ConnectionInfo.ServerName = server
    logOnInfo.ConnectionInfo.DatabaseName = database
    logOnInfo.ConnectionInfo.UserID = userID
    logOnInfo.ConnectionInfo.Password = Password
    logOnInfo.TableName = table
    End Sub
    End Class
    But when I attempt to run it I get this message:-
    Server Error in '/WebApp5' Application.
    Load report failed.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load report failed.
    Source Error:
    Line 56:         crConnectionInfo.UserID = crConnUserId
    Line 57:         crConnectionInfo.Password = crConnPassword
    Line 58:         crReport.Load("http://localhost/WebServ5/STDPOReportService.asmx")
    Line 59:
    Line 60:
    Source File: c:\inetpub\wwwroot\WebApp5\WebForm1.aspx.vb    Line: 58
    Stack Trace:
    &#91;LoadSaveReportException: Load report failed.&#93;
       &#91;1&#93;.&#91;1&#93;I(String   , EngineExceptionErrorID  )
       &#91;1&#93;.&#91;1&#93;E(String  , Int32  )
       CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
       CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName)
       WebApp5.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApp5\WebForm1.aspx.vb:58
       System.Web.UI.Control.OnLoad(EventArgs e)
       System.Web.UI.Control.LoadRecursive()
       System.Web.UI.Page.ProcessRequestMain()
    Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
    Any ideas anyone?

    Hi,
    I came across this and a hundred other problems when
    trying to integrate Crystal into our application
    framework. I agree with the previous post - crystal
    either don't have a testing department for the JRC or
    don't care about us :(
    Anyhow, the solution I found was to create a pretend,
    wrapper JDBC connection driver, which I fix in my
    web.xml to the ODBC name my reports use. When the
    Crystal control transfers to the connect method of my
    driver, I route it to the correct database with
    credentials and return a connection from the real
    JDBC driver. Works a treat.
    Hope this helpsHi,
    How and where do you 'route' your handmade connection to JRC?
    I set the user and password as in the documentaion described to the ConnectionInfo - collection, provide this to the viewer and nothing works...
    When appending user & password info to the jdbc connect url (definied in web.xml, jndi) the report runs. But this solution isn't very flexible ...

  • Running reports 10g in batch mode in a remote server

    Hi all
    I have 10g AS and reports servives running in server1. I want to invoke some reports deployed in server1 from another server (server2) and create the output files (PDFs) in server 2.
    Is this possible?
    Any help is appreciated.

    Use the thin client on server2:
    http://www.oracle.com/technology/products/reports/htdocs/getstart/examples/Tools/thinclient/thinclient/Readme.html
    To put the output on server2 you either have to map a drive to server2 on server1 or ftp the output from server1 to server2.
    http://www.oracle.com/technology/products/reports/htdocs/faq/faq_deployment.htm#55

  • Can Crystal Reports reports run unattended?

    Can Crystal Reports run in an unattended mode as in:
    1) Being run by a batch process to produce a file for mailing
    2) Being run within the scope of an NUnit unit test?

    And if you Ido's solutions do not work for you, and he has been using CR for years and very familiar with CR products, and you have a Developer available you can write your own application or possibly look at using Crystal Reports Server which can handle all of this for you.
    See this page for more info also: http://www.sdn.sap.com/irj/boc/bi
    Thank you
    Don

  • Error while running Java application using Crystal Reports 2011

    Hello,
    I would like to ask for your help.
    Environment details:
    Java based standalone application in Development environment.
    Crystal Reports 2011 (no SP applied)
    Oracle 11g ( 32 bit client installed)
    Win7 64 bit OS.
    Workflow:
    While running the java application, which will display the reports I am getting the below mentioned error. I guess that is because I am missing the Crystal runtimes (Correct me if I am wrong).
    I know that CR2011 do not have any sdks/ jar available for deployment. In this case, which runtimes should I be using? Does installing CR2011 be enough in the development box?
    Please provide me the link from which I can download the same.
    Let me know if I need to provide more details on this. Any suggestions are most welcome.
    Thank You.
    Code used:
    reportClientDoc = new ReportClientDocument();
    System.err.println("Opening the Report ");
    reportClientDoc.open(REPORT_PATH, 0);
    // this is where the error or exception is thrown
    _Error: _
    log4j:WARN No appenders could be found for logger (com.crystaldecisions.reports.reportdefinition.ReportDocument).
    log4j:WARN Please initialize the log4j system properly.
    com.crystaldecisions.sdkreport.lib.ReportSDKException: com/businessobjects/reports/jdbinterface/common/DBException---- Error code:-2147467259 Error code name:failed
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:286)
                    at com.businessobjects.sdk.erom.jrc.a.<init>(SourceFile:43)
                    at com.businessobjects.sdk.erom.jrc.ReportAgentFactory.createAgent(SourceFile:46)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.<init>(SourceFile:703)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:662)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:632)
                    at com.crystaldecisions.sdk.report.application.ClientDocument.if(SourceFile:504)
                    at com.crystaldecisions.sdk.report.application.ClientDocument.open(SourceFile:669)
                    at com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
                    at rp.batch.bo.RpJRCExportReport.runReportExport(RpJRCExportReport.java:517)
                    at rp.batch.bo.RpSchedReportRun.process(RpSchedReportRun.java:163)
                    at rp.batch.bo.RpSchedReportRun.drive(RpSchedReportRun.java:240)
                    at rp.batch.bo.RpSchedReportRun.main(RpSchedReportRun.java:265)
    Caused by: java.lang.NoClassDefFoundError: com/businessobjects/reports/jdbinterface/common/DBException
                    at com.crystaldecisions.reports.queryengine.Session.a2(SourceFile:244)
                    at com.crystaldecisions.reports.datafoundation.DataFoundation.do(SourceFile:376)
                    at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.do(SourceFile:111)
                    at com.crystaldecisions.reports.dataengine.datafoundation.CreateDataConnectionCommand.new(SourceFile:81)
                    at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
                    at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
                    at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:442)
                    at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:231)
                    at com.businessobjects.reports.reportconverter.v12.d.m(SourceFile:192)
                    at com.businessobjects.reports.reportconverter.v12.f.if(SourceFile:210)
                    at com.businessobjects.reports.reportconverter.v12.V12SaveLoader.a(SourceFile:242)
                    at com.businessobjects.reports.loader.ReportLoader.a(SourceFile:205)
                    at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:137)
                    at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:76)
                    at com.businessobjects.reports.sdk.requesthandler.ReportDocumentRequestHandler.a(SourceFile:136)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:229)
                    ... 12 more
    Caused by: java.lang.ClassNotFoundException: com.businessobjects.reports.jdbinterface.common.DBException
                    at java.net.URLClassLoader1.run(URLClassLoader.java:200)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
                    at sun.misc.LauncherAppClassLoader.loadClass(Launcher.java:301)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                    ... 28 more

    Help me ...
    Ambient:
    Crystal Reports Viewer 14.0.0.0
    java.vendor = Sun Microsystems Inc.
    java.version = 1.6.0_37
    os.name = Windows NT (unknown)
    os.version = 6.2
    os.arch = amd64
    Exception:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects.sdk.erom.jrc.ReportAgentFactory---- Error code:-2147215357 [CRSDK00000026] Error code name:internal
              at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ReportSDKException.java:112)
              at com.crystaldecisions.proxy.remoteagent.RemoteAgent.createDefaultAgent(RemoteAgent.java:1000)
              at com.crystaldecisions.sdk.occa.report.application.ClientDocument.initRemoteAgent(ClientDocument.java:770)
              at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(ClientDocument.java:961)
              at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.open(ReportClientDocument.java:226)
              at src.HelloWorldSwing.createAndShowGUI(HelloWorldSwing.java:54)
              at src.HelloWorldSwing.main(HelloWorldSwing.java:24)
    Source:
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import com.crystaldecisions.ReportViewer.ReportViewerBean;
    import com.crystaldecisions.sdk.occa.report.application.DatabaseController;
    import com.crystaldecisions.sdk.occa.report.application.OpenReportOptions;
    import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
    import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
    public class HelloWorldSwing {
               * @param args
              public static void main(String[] args) {
                        HelloWorldSwing pgm = new HelloWorldSwing();
                        try {
                                  pgm.createAndShowGUI();
                        } catch (Exception e) {
                                  e.printStackTrace();
                                  //JOptionPane.showMessageDialog(null, e.toString());
               * @throws Exception
              public void createAndShowGUI() throws Exception {
                        // Make sure we have nice window decorations.
                        JFrame.setDefaultLookAndFeelDecorated(false);
                        // Create and set up the window.
                        JFrame frame = new JFrame("HelloWorldSwing");
                        frame.setTitle("Titolo del Report");
                        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        ReportViewerBean viewer = new ReportViewerBean();
                        viewer.init(new String[0], null, null, null);
                        ReportClientDocument rpt = new ReportClientDocument();
                        rpt.setReportAppServer(ReportClientDocument.inprocConnectionString); // inproc:jrc
                        rpt.open("Report.rpt", OpenReportOptions._openAsReadOnly);
                        IReportSource rptSource = rpt.getReportSource();
                        viewer.setReportSource(rptSource);
                        frame.getContentPane().add(viewer, BorderLayout.CENTER);
                        frame.setSize(1930, 1030);
                        frame.setVisible(true);
                        viewer.start();

  • Can't run report in ASYNCHRONOUS mode

    Hi All,
    I'm trying to make a report run in ASYNCHRONOUS mode. I want to press a button on a form, submit the report to the reports server and be able to navigate within the form while the report is being executed on the reports server.
    My problem is, no matter what mode I choose (ASYNCHRONOUS or SYNCHRONOUS), the mode ALWAYS ends up being SYNCHRONOUS. After I press the button (code below), I get the hourglass and I can't navigate within the form until the report is finished. Then I can view it.
    The reports server I'm using is installed locally on the same PC I'm testing the form.
    Can someone help me please? I'm using using Forms Builder 9.0.2.9.0.
    Thank you,
    Artur
    declare
         v_repid REPORT_OBJECT;
    v_rep in varchar2(100);
    begin
    v_repid := find_report_object('TEST');
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_EXECUTION_MODE, BATCH);
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_COMM_MODE, ASYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESTYPE, 'CACHE');
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESFORMAT, 'PDF'); -- OR HTMLCSS
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_SERVER, :TI_REPORTS_SERVER); -- local pc reports server
    v_rep := RUN_REPORT_OBJECT(v_repid, v_param_list);
    end;

    Arthur,
    Communication mode is soemthing forms handles when calling the run report object. Your code looks fine. You might get a quikc answer if you can post this in Forms mailing list
    Thanks
    The Oracle Reports Team

  • Running a Dynpro-based Report as a Job/in Background mode

    Hello,
    i've got a report which hasn't got a selection-screen as its startscreen, but a complex dynpro and is based on different start-buttons and not only the "basic" F8/Run-Button. the users still would like to be able to run the report in background mode and as an automated weekly job. moreover they want to use their own configuration/variant for date-fields etc., just like they are used from a selection-screen. is this possible "out of the box" with a dynpro-based report or how can i archive this through my own programming logic?
    thanks for your help,
    dsp

    Hi,
    I guess yes, but since you seem to have several processes possible at startup (those buttons), you will have to code a new bit of code at the start of your application. This to choose the correct process... you should have a new statement like
    IF sy-batch IS NOT INITIAL.
         "Perform batch process
    ELSE.
         "Perform normal run
    ENDIF.
    For the variant, I'm not sure to really get the idea... Do the users already use variants with the actual version? or is there no selection screen at all? If not, you should use one and set-up parameters to pre-fill your dynpro fields...
    Kr,
    Manu

  • Export from Crystal Reports 2008 viewer fails if run on separate thread

    I have a windows desktop application written in Visual Basic using Visual Studio 2008.  I have installed and am trying Crystal Reports 2008 to run a report.  Everything seems to work well except that when I preview a report (using the viewer control) and click the export button found in the upper left corner of that control, I get the following message:
    Error 5: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.  Ensure that your Main function has STAThreadAttribute marked on it.  This exception is only raised if a debugger is attached to the process.
    I am a little confused on what to do exactly.  Is the problem because I am running in the Visual Studio 2008 IDE?  It says this exception is only raise if a debugger is attached to the process.  No, I tried running it outside the IDE.  The exception wasn't generated but the application hung when the button was clicked.
    It says the current thread must be set to single thread apartment (STA) mode.  If the report is run on its own thread, is the "current" thread the thread the report is running on or is the main application's UI thread?  I don't think I want to set my main application to single thread apartment mode because it is a multi-threaded application (although I really don't know for sure because I am new to multi-threaded programming). 
    My objective is to allow reports to run asynchronously so that the user can do other things while it is being generated.  Here is the code I use to do this:
        ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim backgroundProcess As System.ComponentModel.BackgroundWorker
            ' Start a new thread to run this report.
            backgroundProcess = New System.ComponentModel.BackgroundWorker
            Using (backgroundProcess)
                ' Wire the function we want to run to the 'do work' event.
                AddHandler backgroundProcess.DoWork, AddressOf PreviewReportAsynch_Start
                ' Kick off the report asynchronously and return control to the calling process
                backgroundProcess.RunWorkerAsync(sourceDatabase)
            End Using
        End Sub
        Private Sub PreviewReportAsynch_Start(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
            ' The source database needed to call preview report was passed as the only argument
            Call PreviewReport(CType(e.Argument, clsMainApplicationDatabase))
        End Sub
        ' Previews the report.  From the preview window, the user can print it.
        Public Function PreviewReport(ByVal sourceDatabase As clsMainApplicationDatabase) As FunctionEndedResult
            Dim errorBoxTitle As String
            Dim frmPreview As frmReportPreview
            ' Setup error handling
            errorBoxTitle = "Preview " & Name & " Report"
            PreviewReport = FunctionEndedResult.FAILURE
            On Error GoTo PreviewError
            ' Set up the crxReport object
            If InitializeReportProcess(sourceDatabase) <> FunctionEndedResult.SUCCESS Then
                GoTo PreviewExit
            End If
            ' Use the preview form to preview the report
            frmPreview = New frmReportPreview
            frmPreview.Report = crxReport
            frmPreview.ShowDialog()
            ' Save any settings that should persist from one run to the next
            Call SavePersistentSettings()
            ' If we got this far everything is OK.
            PreviewReport = FunctionEndedResult.SUCCESS
    PreviewExit:
            ' Do any cleanup work
            Call CleanupReportProcess(sourceDatabase)
            Exit Function
    PreviewError:
            ' Report error then exit gracefully
            ErrorBox(errorBoxTitle)
            Resume PreviewExit
        End Function
    The variable crxReport is of type ReportDocument and the windows form called 'frmPreview' has only 1 control, the crystal reports viewer. 
    The print button on the viewer works fine.  Just the export button is failing.  Any ideas?

    Hi Trevor.
    Thank you for the reply.  The report document is create on the main UI thread of my application.  The preview form is created and destroyed on the separate thread.  For reasons I won't get into, restructuring the code to move all the initialization stuff inside the preview form is not an option (OK, if you a really curious, I don't always preview a report, sometimes I print and/or export it directly which means the preview form isn't used).
    What I learned through some other research is that there are some things (like COM calls and evidently some OLE automation stuff) that cannot be run on a thread that uses the MTA threading model.   The export button probably uses some of this technology, thus the message stating that an STA threading model is required.  I restructured the code as follows to accomodate this requirement.  Here is a sample:
    ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim staThread As System.Threading.Thread
            ' Start the preview report function on a new thread
            staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep1)
            staThread.SetApartmentState(System.Threading.ApartmentState.MTA)
            staThread.Start(sourceDatabase)
        End Sub
        Private Sub PreviewReportAsynchStep1(ByVal sourceDatabase As Object)
            Dim staThread As System.Threading.Thread
            ' Initialize report preview.  This includes staging any data and configuring the
            ' crystal report document object for use by the crystal report viewer control.
            If InitializeReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase)) = FunctionEndedResult.SUCCESS Then
                ' Show the report to the user.  This must be done on an STA thread so we will
                ' start another of that type.  See description of PreviewReportAsynchStep2()
                staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep2)
                staThread.SetApartmentState(System.Threading.ApartmentState.STA)
                staThread.Start(mcrxReport)
                ' Wait for step 2 to finish.  This blocks the current thread, but this thread
                ' isn't the main UI thread and this thread has no UI anymore (the progress
                ' form was closed) so it won't matter that is it blocked.
                staThread.Join()
                ' Save any settings that should persist from one successful run to the next
                Call SavePersistentSettings()
            End If
            ' Release the crystal report
            Call CleanupReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase))
        End Sub
        ' The preview form must be launched on a thread that use the single-threaded apartment (STA) model.
        ' Threads use the multi-threaded apartment (MTA) model by default.  This is necessary to make the
        ' export and print buttons on the preview form work.  They do not work when running on a
        ' thread using MTA.
        Public Sub PreviewReportAsynchStep2(ByVal crxInitializedReport As Object)
            Dim frmPreview As frmReportPreview
            ' Use the preview form to preview the report.  The preview form contains the crystal reports viewer control.
            frmPreview = New frmReportPreview
            frmPreview.Report = DirectCast(crxInitializedReport, ReportDocument)
            frmPreview.ShowDialog()
        End Sub
    Thanks for your help!
    Andy

  • Multiple ALV reports not working in batch mode

    All,
    I have a report that creates a detail and a summary ALV report in one program.
    When run in the foreground it works great  - runs the ALV detail first and displays it and you arrow back and then the runs the ALV summary report and displays it.
    But when run in the background - I get the ALV detail report sent to the spooler but nothing for the ALV summary report.  Well I do get a second report sent to the spooler but it does not have any data displayed.
    I ran this in debug mode - faking out the program to believe it was in Batch Mode.
    Everything appears to look correct when it does the call to ALV - the outtab table has the summary data in it.
    Here is the calls to ALV:
    Function Module to display report in ALV List Format
      IF l_detail = 'X'.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program      = l_repid
            i_callback_user_command = c_ucomm
            i_grid_title            = p_title
            i_grid_settings         = w_alv_grid
            is_layout               = w_alv_layout
            it_fieldcat             = w_alv_field
            it_sort                 = w_alv_sort
            i_default               = 'X'
            i_save                  = ' '
            it_events               = w_alv_event
            is_print                = w_alv_print
          TABLES
            t_outtab                = t_detail
          EXCEPTIONS
            program_error           = 1
            OTHERS                  = 2.
      ELSEIF l_summry = 'X'.
    be sure th file has the new SNO values assigned B4 calling!
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program      = l_repid
            i_callback_user_command = c_ucomm
            i_grid_title            = p_title
            i_grid_settings         = w_alv_grid
            is_layout               = w_alv_layout
            it_fieldcat             = w_alv_field
            it_sort                 = w_alv_sort
            i_default               = 'X'
            i_save                  = ' '
            it_events               = w_alv_event
            is_print                = w_alv_print
          TABLES
            t_outtab                = t_summry
          EXCEPTIONS
            program_error           = 1
            OTHERS                  = 2.
      ENDIF.
    Maybe there something I should be calling or clearing out in the above parms when trying to create to spoolfiles from ALV in background mode.
    Any suggestions are most apprecaited.
    Thanks.
    Scott

    before calling the ALV create a separate spool for each list.
    if sy-batch = 'X'.
    get the print parameters with FM GET_PRINT_RARAMETERS
    pass the parameters (you can change them if you like) to
    NEW-PAGE PRINT ON PARAMETERS your_parameters NO DIALOG
    endif.

Maybe you are looking for

  • Prompted for authorization to play songs

    I am constantly getting prompted to authorize computer when I play a song

  • Buying an E72 with Scandinavian keyboard outside o...

    For some reason it seems to be impossible to buy an E72 with Scand. keyboard from outside of Finland. I am living in Italy and my employer wants to buy me a phone. Fine. I tell them to buy E72 with the above simple specs. But, no one provides such a

  • SQL Service monitoring

    Hi Experts I have a very basic question on SQL Server 2005&2008 service monitoring. We have SCCM 2012 in our environment and i would like to know if SCCM 2012 has the capability to monitor/ to know all the SQL Services(SQL,SQLAgent,FTS,SSAS,SSRS,SSIS

  • Load Embedded Report failed - System cannot find the file specified

    Hi, Using VS2005 and Crystal report that comes shipped with it. I created a crystal report in my project. I am trying to load an embedded crystal report from my project using             Dim thisCrystalReport As New ReportDocument             Dim rpt

  • Applying patch (qemu)

    im trying to apply a patch to qemu to be able to compile with gcc4. the patch is taken from here which i cut-n-paste from the html. however, i get the following error on applying the patch: patching file dyngen-exec.h Hunk #1 FAILED at 155. Hunk #2 F