Error Creating Window Handle

Originally Posted 26 December 2006, 2:50 am EST

  • Originally Posted 26 December 2006, 2:50 am EST

    Hello, I am using ActiveReports 2.0 with .NET 1.1.

    Duing batch processing of active reports where the batch size is > 1000 reports I get the following error:



    System.Exception: IN gaEpr.gaEprRun AT STAGE: Execute method invoked

    ---> System.Exception: IN oaBtc.oaBtcPrc AT STAGE: Mapping parameter out: pvntTemplateParms

    ---> System.ComponentModel.Win32Exception: Error creating window handle.

    at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)

    at System.Windows.Forms.Control.CreateHandle()

    at System.Windows.Forms.TextBoxBase.CreateHandle()

    at System.Windows.Forms.Control.get_Handle()

    at System.Windows.Forms.RichTextBox.ForceHandleCreate()

    at System.Windows.Forms.RichTextBox.set_SelectedText(String value)

    at System.Windows.Forms.TextBoxBase.AppendText(String text)

    at Fast.ogTmp.ogTmpObj.SetLetterData(ggFdaCls pfdaLetterData, ggFdaCls pfdaTableData)

    at Fast.ogTmp.ogTmpObj.GenerateLetter(ggFdaCls pfdaPrintGroup, ggFdaCls pfdaMailItem, ggFdaCls pfdaLetterData, ggFdaCls pfdaTableData, ggFdaCls pfdaPreviousMailItem, Int32& plngEnvelopePageCount, Int32& plngLetterPageCount, Int32& plngLettersInBatch, Boolean& pblnSuspendPrintForLetter, Boolean& pblnNewEnvelope, String pstrPrintControlObject)

    at Fast.oaBtc.oaBtcPrc.Execute(Int32& plngMailBatchKey, String& pstrFileOutputName, Int32& plngVerLastCurrent)

    --- End of inner exception stack trace ---

    at Fast.ggBom.ggBomBas.ExecuteMessage(ggMsgObj& pMsg)

    at Fast.gaEpr.gaEprRun.Execute(Object pvntMsgArcData, Int32 plngQueueKey, Int32 plngVer, Int32 plngVerLast, String pstrKey, String pstrEvent, String pstrSource, String pstrDestination, DateTime pdtmQueued, Int32 plngDeleted, DateTime pdtmIntervention, DateTime pdtmHoldTill, Int16 pintAttempts, Int32 plngCustomerKey, Int32 plngAccountKey, String pstrSourceQ, String pstrSuccessCriteria, String pstrData)

    --- End of inner exception stack trace ---

    at Fast.ggBom.ggBomBas.ExecuteMessage(ggMsgObj& pMsg)

    at Fast.ggBom.ggBomBas.RootExecute(Int32 plngRootKey, ggMsgObj& pMsg, ggLbiMsx& pMsx)

    My batch processing class creates a new empty 'batch' report and loops running reports that are destined for the batch. report pages are appended to the batch report until the batch report is >=200 whereupon the 'batch report' is exported to a temporary pdf and .dispose( ) is called on it. At the end of the loop the temporary pdfs are merged into the final batch pdf. I have pasted the dispose methods called on the batch report below.

    I figure that all the controls on the reports are exceeding the 10k limit of window handles Windows allows to a .NET process, but I was hoping that exporting every 200 pages to a temp pdf and disposing of the batch report would free up the handles allowing me to run large batch sizes. Any ideas?

    Private Sub DisposeActiveReport(ByRef pReport As DataDynamics.ActiveReports.ActiveReport)


    For i As Integer = 0 To pReport.Sections.Count - 1









    pReport = Nothing

    End Sub
  • Reply

    Hello ,

    Pay attention at the CacheToDisk property that allows to optimize 

    the amount of memory used by the document by caching the report to disk:

    <FONT size=2></FONT>

    If it won't help, please send me a run-able sample of application.

    Sergey Romanov.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels