Catching exception from inherited constructor

Hi all,
If I'm extending a class and the constructor of the parent class throws an exception, is there any way to catch that exception in my constructor? What I would like to do is something like this.
public class MyClass extends OtherClass {    // the constructor for OtherClass throws an exception
    public MyClass() {
        try {
            super();
        } catch (Exception e) {}
}But of course you can't do that because super() has to be the first command in the method. Is there any other way to accomplish this? My objective is to chain this exception to a different type of exception.

Write a factory method? For example:
class ABCException extends Exception {}
class XYZException extends Exception {}
class OtherClass {
    public OtherClass()  throws ABCException {
        throw new ABCException();
class MyClass extends OtherClass {    // the constructor for OtherClass throws an exception
    protected MyClass() throws ABCException {
       super();
    public static MyClass instance() throws XYZException {
        try {
            return new MyClass();
        } catch (ABCException e) {
            throw new XYZException();
}

Similar Messages

  • Find out who catches exception from within exception

    Hi,
    I am writing some generic Exception for our project. The aim is to simplify exception handling by making the exceptions log the necessary information with Log4J.
    It seems pretty easy to find out which class actually threw the exception (top of stack trace) but I would much rather like to log the exception in the name of the class that will catch the exception.
    The problem is that the stacktrace (it can be retrieved within an exception as of J2SE 1.4) does not contain information about which class will actually be catching the exception.
    Is there any way to accomplish that? Would be very grateful if someone could point me into the right direction if there is a possibility.
    Thank you very much in advance
    Greets Robbi

    Thanks for the quick reply.
    What I actually really wanted is to log from within the Exception. Right now I am doing this from within the Exceptions constructor.
    I see your point with the constructor being supposed to be lightweight, but in most cases the logging will be turned off and log4J does not take a lot of time to find that out.
    The logging within the catch blocks is what we wanted to circumvent as that would be the same in all catch blocks. Additionally it would be easy to simply change the topmost Exception in our hierarchy to log somewhere else instead.
    Performance is not too crucial on our application, but traceability is, as a lot of money is tied to a single transaction. That is why we decided to for Exceptions to log, as thus even when a developer would forget to log, the exception is still logged.
    Anyway, I thought that it is quite likely not possible to determine who catches an exception from within that exception. I guess the virtual machine wouldn't like to unseal that information. Maybe this is something that might work in a future Java version.
    Thanks for the input anyway.
    Regards Robbi

  • How to catching exceptions from another thread

    hi,guys,i have some code like this:
    public static void main(String[] args) {
    TimeoutThread time = new TimeoutThread(100,new TimeOutException("超时"));
         try{
         t.start();
         }catch(Exception e){
         System.out.println("eeeeeeeeeee");
    TimeoutThread will throws an exception when it runs ,but now i can't get "eeeeeeeeeee" from my console when i runs the main bolck code.so ,somebody help me ,thk.

    hi,ejp,this is my scene:
    getHttpParty(String name) is a method get some information from a web site,this maybe cause many times.now this method is called in my main(String args[]) method.
    i want to terminate getHttpParty if it runs 2s, can you give some simple code to do this.
    thank you very much.
    Edited by: user5449747 on 2010-11-17 上午12:03

  • Any way to catch exceptions from asynchronous call that short dumps?

    Hi,
    We have a requirement for a program that we know will occasionally short dump under normal conditions. We want to use an asynchronous call to let it plow ahead. To that end I've created a test program that calls a divide by zero func that short dumps. It tests fine because it proceeds afterward. Better yet would be a way to capture some information from the function where the dump happens and raise it to the calling program. Any ideas?
    Thanks,
    Doug
    Example:
    REPORT  ZJUNK2
    data: junkdone TYPE c VALUE space,
    write: / 'before'.
    CALL FUNCTION 'ZJUNK2'
      STARTING NEW TASK 'z_junktask'
      PERFORMING junk ON END OF TASK
          EXCEPTIONS
             communication_failure = 1
             system_failure        = 2
             other_exception = 3.
    Receive remaining asynchronous replies
      wait until junkdone = 'X'.
    write: / 'after'.
    FORM junk  USING taskname.
    RECEIVE RESULTS FROM FUNCTION 'ZJUNK2'
          EXCEPTIONS
             communication_failure = 1
             system_failure        = 2
             other_exception = 3.
      junkdone = 'X'.
    ENDFORM.
    FUNCTION ZJUNK2.
    ""Local Interface:
    data: i type i.
    i = 1 / 0.
    ENDFUNCTION.

    Hey Doug.  You need to catch the class exception cx_root in your function, then pass back the message.  This will catch a lot of system exceptions, but probably not all.
    DATA: junkdone TYPE c VALUE space.
    DATA: lv_message TYPE char255.
    WRITE: / 'before'.
    CALL FUNCTION 'ZJUNK2'
      STARTING NEW TASK 'z_junktask'
      PERFORMING junk ON END OF TASK
      EXCEPTIONS
        communication_failure = 1
        system_failure        = 2
        other_exception       = 3.
    * Receive remaining asynchronous replies
    WAIT UNTIL junkdone = 'X'.
    WRITE: / 'after'.
    IF lv_message IS NOT INITIAL.    "<-- Check for error and write message
      WRITE:/ lv_message.
    ENDIF.
    *&      Form  junk
    FORM junk USING taskname.
      RECEIVE RESULTS FROM FUNCTION 'ZJUNK2'
           IMPORTING
                e_message = lv_message   "<-- Import the message
           EXCEPTIONS
                communication_failure = 1
                system_failure = 2
                other_exception = 3.
      junkdone = 'X'.
    ENDFORM.                    "junk
    FUNCTION zjunk2.
    *"*"Local Interface:
    *"  EXPORTING
    *"     VALUE(E_MESSAGE) TYPE  CHAR255
      DATA: lo_exception TYPE REF TO cx_root.
      DATA: i TYPE i.
      TRY.
          i = 1 / 0.
        CATCH cx_root INTO lo_exception.
          e_message = lo_exception->get_text( ).
      ENDTRY.
    ENDFUNCTION.
    Regards,
    Rich Heilman

  • How to catch exception from shared library on Linux?

    Description:
    JNI dynamically loads shared library. Shared library throws exception (class CTestException). JNI can not catch it by CTestException name, only (...) works.
    My config:
    Linux RH AS 4 (x86 64)
    gcc: 3.4.5
    glib: 2.2.5
    Java 1.5.0_06
    g++ compiler options for JNI and shared libraries:
    g++ -Wl,-E -fPIC -shared ...
    There are multiple bugs on Java bugs database regarding C++ ABI incompatibility between Java binaries and stdc++ libraries linked with native code. But I could not find any conclusions on these bugs. Only plans/suggestions to recompile Java on new gcc. These bugs were quite old (regarding Java 1.3, 1.4). Now 1.6 is available but still there is same incompatibility. Maybe I am missing something and there is a way to fix this problem? Like to use specific gcc/glib versions for compilation? How people solve such problems? Any help is appreciated.

    It isn't any different; the commands are the same. You can find the exp executable in tehe $ORACLE_HOME/bin directory.

  • To catch exception from a batch file

    Hi,
    I am running a batch file using java,the batch file is used for running SQL Loader.It is working OK,but I am unable to catch any exception or sucess message.Can anyone help?
    regards,
    Anshuman

    Have your Java main() catch Throwable and then use System.exit(an errror code); inside the catch. Your batch file can then examine the process return code.

  • Can i catch an exception from another thread?

    hi,guys,i have some code like this:
    public static void main(String[] args) {
    TimeoutThread time = new TimeoutThread(100,new TimeOutException("超时"));
    try{
    t.start();
    }catch(Exception e){
    System.out.println("eeeeeeeeeee");
    TimeoutThread will throws an exception when it runs ,but now i can't get "eeeeeeeeeee" from my console when i runs the main bolck code.
    i asked this question in concurrent forums,somebody told me that i can't.so ,i think if i can do this from aspect of jvm.
    thank you for your help
    Edited by: Darryl Burke -- Double post of how to catching exceptions from another thread locking

    user5449747 wrote:
    so ,i think if i can do this from aspect of jvm. What does that mean? You think you'll get a different answer in a different forum?
    You can't catch exceptions from another thread. It's that easy. You could somehow ensure that exceptions from that other thread are always caught and somehow passed to your thread, but that would be a different thing (you would still be catching the exception on the thread it is originating from, as is the only way).
    For example you can use setUncaughtExceptionHandler() on your thread to provide an object that handles an uncaught exceptions (and you could pass that uncaught exception to your other thread in some way).

  • Catch exception inside function arguments

    Class A is a core class in my application. When users create it with bad name format, they get an exception.
    public class A{
        public A(String name) throws FormatException{
            // Check if the name the user entered is valid or not.
    }But during the startup of my application I also create some instances of A. At startup time, any exception caught means that my source code is wrong: a bug on my own!
    In this context I got myself with the following problem, how to catch an exception (that should not happen, because it comes from inside my source code) inside a function call:
        // Create an instance of B that wraps A.
        B b = B( new A("a_name_in_a_good_format") , some_other_parameter); // Possible exception from the constructor of A.Is there any way to catch that, or I'm obliged to create the instance of A before calling any function?
    Edited by: ffrantz on Apr 1, 2010 10:15 AM
    Edited by: ffrantz on Apr 1, 2010 10:17 AM

    Thanks. I guess that is the only solution.
    My problem is that I'm using that in the initialization of an enum, and there's no way to put that construction inside a try/catch block. Code looks like.
    public static enum myReferenceInstancesToClone {
        SIGNAL_MAGNITUDE(new C("mag"), some_other_parameters), // C extends A
        SIGNAL_FREQUENCY(new D("freq"), some_other_parameters), // D extends A
        RESISTIVITY     (new A("R")), some_other_parameters),
        INDUCTANCE      (new A("L") , some_other_parameters),
        CAPACITANCE     (new A("C"), some_other_parameters);
        // FIELDS
        private A _referenceInstance;
        private Object[] _refParameters; // A set of private fields that interest me
        // METHODS
        private OutputPropertiesA property, Object[] some_other_parameters){
         _value = property;
            _refParameters = some_other_parameters
        // Other methods that are convenient to get fields.I'm doing it that way because i'm designing the data model for our application and it is uncertain what is the number and nature of properties that we will need to use. This construction with enums seemed good for me because:
    1) Other designers can add properties in a single line. Without looking around on the rest of the source code.
    2) The initialization process keeps probing the same enumeration, independent on the number/nature of the elements contained in it.
    It is in this context that I cannot catch the exception thrown by the constructor of A:
    public static enum myReferenceInstancesToClone {
        SIGNAL_MAGNITUDE(new C("mag"), some_other_parameters), // Java compiler tells me I have an unhandled exception from 'new C()'
        // ...If there is no way to catch that exception or propagate it.. then I'll do it with static arrays and static initialization blocks... but this means that I'll have to break my 'some_other_parameters' in different arrays.

  • ABAP debugging, catch exception

    Hello, experts!
    Is there any way for catching exception from "insert <tabname> from table itab" during debugging, if there's no any exception handling in code? I want to know what is the error text to analyze it in more detail. I can't modify a program, because it has been generated automatically (it is a data loading program for BW extractor), so I need any case to insert error handling or get the error message while debug before program exit.
    Any suggestions would be appreciated.
    Thanks,
    Andrew.

    hi andrew,
    There is a catchable exception which you can try
    TRY.
         insert <tabname> from table itab
        CATCH CX_SY_ITAB_DUPLICATE_KEY.
    ENDTRY.
    There are also non-catchable exceptions which you can refer at
    ABAP Keyword Documentation

  • Catch exceptions that occur in the constructor of a managed bean

    Hello,
    I would like to catch exceptions that might occur in the constructor of a managed bean and redirect to an error page. My beans need to get data from a database and if the database is not accessible, an error page is to tell the user "try again later". I don't want to write an action or actionListener that is invoked by a button klick on the previous page to make error handling easier, because an actionListener should not know about the next page and what data the next page will need.
    I read all postings about this topic I could find in this forum. And there are three solutions I tried:
    1) register an error-page in web.xml
    Is there an example for using this in a JSF application? It did not work. I got a "Page not found" exception
    2) Use a phase listener. But how can a phase listener do this? Is there an example? I don't think it can do it in the beforePhase method because this method is called before the constructor of the managed bean is called.
    3) Use a custom ViewHandler. This is my renderView method which creates a "Page not found" Exception.
    public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException {
    ViewHandler outer = context.getApplication().getViewHandler();
    try {
    super.renderView(context, viewToRender);
    } catch (Exception e) {
    context.getExternalContext().redirect("/error.jspx");
    Several people write they've done it one or the other way. Please share your knowledge with us !!
    Regards,
    Mareike

    Hallo Mareike,
    Maybe I should abandon managed beans, create my own
    "unmanaged" ones inside of an action listener and put
    them somewhere my pages can find them.
    Its a pity, because I like the concept of managed
    beans.sure setter injection of JSF is fine!
    well workaround could be using <h:dataTable rendered="#bean.dbAccessible" ...>
    In your constructor you catch the exception and set
    dbAccessible = false;
    or you use error pages of webcontainer,
    but the pages couldn't contain JSF components, IMHO
    only plain JSP files.
    BTW perhaps somebody on MyFaces' list knows the solution:
    http://incubator.apache.org/myfaces/community/mailinglists.html
    Regards,
    Mareike-Matthias

  • Catching exception of a super constructor

    Is it possible to catch the exception thrown by a super class
    constructor in a sub clas constructor?
    public class A
         public A() throws Exception
              throw new Exception("Exception from A");
    class B extends A
         public B()
              try
                   super();
              catch(Exception e)
    }I get an error saying,
    A.java:16: call to super must be first statement in constructor
    super();
    ^
    Any thoughts?

    More on this here,
    http://archive.devx.com/free/tips/tipview.asp?content_i
    =2384&Java=ONThanks for that link. I completely agree to what it says.
    In other words, not being able to successfully construct our super class implies that we cannot create our derived class.
    But I feel this must be mentioned clearly somewhere in JLS. And the error message that we get must be "You cannot catch exceptions thrown by a super class constructor".

  • How to catch exception thrown from a function module?

    Hi all,
             When we are calling a function module from JSPDynpage setting some import parameters, If in some case an exception is thrown in the function module.  How can we catch the same exception in the JSPDynpage program?
    Thanks & Regards,
    Ravi

    Hi Ravi
                                    Try this
                                                try
                    Object retMsgs = output.get(bapiretrunmsgobject);
                      if(result != null )
    IrecordSet rmsg = (IrecordSet) result
                   catch(Exception ex)
                        printException(ex, "Error getting function result");
    Lemme know for any further questions.
    Regards
    Praveen

  • Help Me, How to catch exception thrown from ejbStore

    Hi,
    I am working on application running on Iplanet Application Server 4.0. Problem is the application exception thrown from the ejbStore don't reach the calling servlet, calling servlet receive TransactionRollback exception which is system exception. But there is no sign of my application exception thrown from ejbStore. Can anybody tell me how I can get my ApplicationException thrown from ejbStore in my calling servlet.
    I am calling entity beans set method in servlet and in entity bean ejbStore method I am throwing Application exception.
    in entity bean
    public void ejbStore() throws MyException
    if(true) throw new MyException();
    in servlet
    try {
    MyEntityHome home = .......
    MyEntityRemote remote = home.findBy.....
    remote.setMyValue(MyValue value); //Transaction required Container managed
    }catch(MyException e) {
    e.printStackTrace(); // Not cahcing My Exception
    }catch(Exception e) {
    e.printStackTrace(); //catching TransactionRolledBackException
    Thanks
    Shakti

    Hi Ravi
                                    Try this
                                                try
                    Object retMsgs = output.get(bapiretrunmsgobject);
                      if(result != null )
    IrecordSet rmsg = (IrecordSet) result
                   catch(Exception ex)
                        printException(ex, "Error getting function result");
    Lemme know for any further questions.
    Regards
    Praveen

  • Unable to catch raiseerror exception from MS SQL Server Exception in hibernate

    I am using raiseerror in MS SQL Server exception to throw customized error and it is working fine in database.
    But, I am unable to catch MS SQL Server Exception in hibernate. Please find the database & java syntax below.
    SQL Server Syntax:-
        ALTER PROCEDURE [grantiumSQL].[ERROR_MESSAGE]
        @ERRMSG NVARCHAR(4000)
        AS
        BEGIN
        -- Return if there is no error information to retrieve.    
        IF ERROR_NUMBER() IS NULL    
            RETURN;    
        DECLARE     
            @ErrorMessage    NVARCHAR(4000),    
            @ErrorNumber     INT,    
            @ErrorSeverity   INT,    
            @ErrorState      INT,    
            @ErrorLine       INT,    
            @ErrorProcedure  NVARCHAR(200);    
        -- Assign variables to error-handling functions that     
        -- capture information for RAISERROR.    
        SELECT     
            @ErrorNumber = ERROR_NUMBER(),    
            @ErrorSeverity = ERROR_SEVERITY(),    
            @ErrorState = ERROR_STATE(),    
            @ErrorLine = ERROR_LINE(),    
            @ErrorProcedure = ISNULL(ERROR_PROCEDURE(), '-'),   
            @ErrorMessage = @ERRMSG
        RAISERROR     
            @ErrorMessage,    
            @ErrorSeverity,     
            1                           
            )WITH NOWAIT;
        END;
    Java Syntax:-
    public void callDeleteStoreProcedure(int workflowProjectId,String status){
      boolean shouldCommit = HibernateUtil.beginTxn();
      Session session = HibernateUtil.currentSession();
      try
      // query = session.getNamedQuery("deleteWorkflowProject_ora");
      Query callStoredProcedure = session.createSQLQuery("{PROCEDUR_NAME(?,?)}");
      callStoredProcedure.setInteger(0, prj);
      callStoredProcedure.setString(1, status);
      callStoredProcedure.executeUpdate();
         }catch (HibernateException e) {
         e.printStackTrace();
      catch (Exception e) {
          e.printStackTrace();
      HibernateUtil.commitTxn(shouldCommit);
    Thanks in advance

    HI! We have the same problem. Have you manage to resolve it?

  • Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

    I've Main Report + 5 sub report. All of this in a 1 file named _rptBorang.rpt.
    This _rptBorang.rpt consists of
    1. Main Report
    2. _spupimSPMBorang.rpt
    3. _spupimSTPMBorang.rpt
    4. _spupimSijilDiploma.rpt
    5. _spupimKoQ.rpt
    6. _spupimPilihanProg.rpt
    When I preview the report, the Enter values dialog box ask 7 parameters. It's
    1. idx
    2. tbl_MST_Pemohon_idx
    3. tbl_MST_Pemohon_idx(_spupimSPMBorang.rpt)
    4. tbl_MST_Pemohon_idx(_spupimSTPMBorang.rpt)
    5. tbl_MST_Pemohon_idx(_spupimSijilDiploma.rpt)
    6. tbl_MST_Pemohon_idx(_spupimKoQ.rpt)
    7. tbl_MST_Pemohon_idx(_spupimPilihanProg.rpt)
    My ASP.NET code as following,
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="_cetakBorang.aspx.vb" Inherits="_cetakBorang" title="SPUPIM" %>
    <%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1n" runat="server">
        <div align="center">
            <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
            <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
                AutoDataBind="true" />
        </div>
        </form>
    </body>
    </html>
    Imports System.configuration
    Imports System.Data.SqlClient
    Imports System.Web.Security
    Imports CrystalDecisions.Shared
    Imports CrystalDecisions.CrystalReports.Engine
    Partial Class _cetakBorang
        Inherits System.Web.UI.Page
        Private Const PARAMETER_FIELD_NAME1 As String = "idx"
        Private Const PARAMETER_FIELD_NAME2 As String = "tbl_MST_Pemohon_idx"
        Private Const PARAMETER_FIELD_NAME3 As String = "tbl_MST_Pemohon_idx(_spupimSPMBorang.rpt)"
        Private Const PARAMETER_FIELD_NAME4 As String = "tbl_MST_Pemohon_idx(_spupimSTPMBorang.rpt)"
        Private Const PARAMETER_FIELD_NAME5 As String = "tbl_MST_Pemohon_idx(_spupimSijilDiploma.rpt)"
        Private Const PARAMETER_FIELD_NAME6 As String = "tbl_MST_Pemohon_idx(_spupimKoQ.rpt)"
        Private Const PARAMETER_FIELD_NAME7 As String = "tbl_MST_Pemohon_idx(_spupimPilihanProg.rpt)"
        Dim myReport As New ReportDocument
        'rpt connection
        Public rptSvrNme As String = ConfigurationManager.AppSettings("rptSvrNme").ToString()
        Public rptUsr As String = ConfigurationManager.AppSettings("rptUsr").ToString()
        Public rptPwd As String = ConfigurationManager.AppSettings("rptPwd").ToString()
        Public rptDB As String = ConfigurationManager.AppSettings("rptDB").ToString()
        Private Sub SetCurrentValuesForParameterField(ByVal reportDocument As ReportDocument, ByVal arrayList As ArrayList, ByVal paramFieldName As String)
            Dim currentParameterValues As New ParameterValues()
            For Each submittedValue As Object In arrayList
                Dim parameterDiscreteValue As New ParameterDiscreteValue()
                parameterDiscreteValue.Value = submittedValue.ToString()
                currentParameterValues.Add(parameterDiscreteValue)
            Next
            Dim parameterFieldDefinitions As ParameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields
            Dim parameterFieldDefinition As ParameterFieldDefinition = parameterFieldDefinitions(paramFieldName)
            parameterFieldDefinition.ApplyCurrentValues(currentParameterValues)
        End Sub
        Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Not IsPostBack Then
                publishReport(Convert.ToInt32(Session("applicantIdx")), Convert.ToInt32(Session("applicantIdx")))
            End If
        End Sub
        Private Sub publishReport(ByVal idx As Integer, ByVal tbl_MST_Pemohon_idx As Integer)       
            Try
                Dim reportPath As String = String.Empty
                reportPath = Server.MapPath("_rptBorang.rpt")
                myReport.Load(reportPath)
                myReport.SetDatabaseLogon(rptUsr, rptPwd, rptSvrNme, rptDB)
                Dim arrayList1 As New ArrayList()
                arrayList1.Add(idx)
                SetCurrentValuesForParameterField(myReport, arrayList1, PARAMETER_FIELD_NAME1)
                Dim arrayList2 As New ArrayList()
                arrayList2.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList2, PARAMETER_FIELD_NAME2)
                Dim arrayList3 As New ArrayList()
                arrayList3.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList3, PARAMETER_FIELD_NAME3)
                Dim arrayList4 As New ArrayList()
                arrayList4.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList4, PARAMETER_FIELD_NAME4)
                Dim arrayList5 As New ArrayList()
                arrayList5.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList5, PARAMETER_FIELD_NAME5)
                Dim arrayList6 As New ArrayList()
                arrayList6.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList6, PARAMETER_FIELD_NAME6)
                Dim arrayList7 As New ArrayList()
                arrayList7.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList7, PARAMETER_FIELD_NAME7)
                Dim parameterFields As ParameterFields = CrystalReportViewer1.ParameterFieldInfo
                CrystalReportViewer1.ReportSource = myReport
            Catch ex As Exception
                lblMsg.Text = ex.Message
            End Try
        End Sub
        Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
            myReport.Close()
        End Sub
    End Class
    The result was, my ASP.NET return error --- > Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
    I'm stuck
    Really need help
    Edited by: WKM1925 on Feb 22, 2012 11:49 AM

    First off, it would really be nice to have the version of CR you are using. Then
    1) does this report work the CR designer?
    2) What CR SDK are you using?
    3) If .NET, what version?
    4) Web or Win app?
    5) What OS?
    Then, please re-read your post and see if it actually makes any sense. To me, it's just gibberish...
    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]

Maybe you are looking for

  • My macbook pro keeps crashing, especially when I am using adobe creative suit 6, can anyone help me?

    Anonymous UUID:       E5058B14-03DC-CDC1-5390-8E9CC9AF2934 Thu Jan 23 22:27:23 2014 panic(cpu 0 caller 0xffffff7f87143fac): "GPU Panic: [<None>] 5 3 7f 0 0 0 0 3 : NVRM[0/1:0:0]: Read Error 0x00000100: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0xd20

  • Drag and Drop Feature is not working

    I have a mid 2012 MacBook Pro running 10.8.3 and all of a sudden the drag-and-drop feature isn't working. I was dragging photos from my job's website and adding them to a folder, but after about three photos in, it stopped working and no matter what

  • BOM Display in CS11/CS12 with BOM status "3"

    Hi, Just wanted to know if it is possible to display BOM using CS11/CS12 with BOM status "3"- Active with history requirement. Your quick reply is appreciated. Thanks Nitin Edited by: Nitin Pandhare on Jun 16, 2011 10:16 AM

  • Sample Data for OWB 10gR2

    Hi All, Can i find some example for 10gR2 which I can import into the respository? I heard about Global Sample data but could not find it. Does anyone has the link?? Thanks in advance. Regards, Sam.

  • Export to PDF from Web teomlpate (wrong style)

    Hi Gurus, i created a new portal style and used it as default portal style. The colors are shown in my portal "and" in my BI web templates. That means my web template uses the correct style. But if i export to Excel or PDF the style is not used. I ca