Runtime Error: Argument out of Range when minimizing report

Stimulsoft Reports.NET discussion
Post Reply
TGoertler
Posts: 24
Joined: Wed Aug 25, 2010 9:16 am
Location: Gundelsheim/Germany

Runtime Error: Argument out of Range when minimizing report

Post by TGoertler »

Hi,

I use Stimulsoft.NET Report (latest build) with VB.NET 2008.

To show a report I use a StiViewerForm. As soon as you try to minimize the window then I get a runtime error:

Code: Select all

System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
   bei Stimulsoft.Controls.Win.DotNetBar.ScrollBar.ScrollBarAdv.set_LargeChange(Int32 value)
   bei Stimulsoft.Report.Viewer.StiViewerControl.BuildThumbsScrollBar()
   bei System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   bei System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   bei System.Windows.Forms.Control.UpdateBounds()
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei Ӡ.೜.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I tried it with different reports (single, multipage) and the error is there all the time.

I use somthing like the following code to show the report:

Code: Select all

Dim stiVewForm As New Stimulsoft.Report.Viewer.StiViewerForm

Stimulsoft.Report.StiSelectGuiHelper.IsRibbonGui = False
        StiOptions.Windows.GuiStyle = StiGuiStyle.Office2007Black
        StiOptions.Viewer.Windows.ViewerWindowState = FormWindowState.Normal
        'StiConfig.LoadLocalization(AppPath + GetLang("report_localisation"))
        StiConfig.LoadLocalization(AppPath + "language\de.xml")

        Dim Services As Stimulsoft.Base.Services.StiServiceContainer = Stimulsoft.Report.StiConfig.Services.GetServices(GetType(StiExportService))
        For Each Service In Services
            If Service.GetType Is GetType(StiBmpExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiCsvExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiDbfExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiDifExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiEmfExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiExcel2007ExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiExcelExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiExcelXmlExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiGifExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiHtmlExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiJpegExportService) Then Service.ServiceEnabled = True
            'If Service.GetType Is GetType(StiExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiMhtExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiOdsExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiOdtExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiPcxExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiPdfExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiPngExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiPpt2007ExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiRtfExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiSvgExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiSvgzExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiSylkExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiTiffExportService) Then Service.ServiceEnabled = False
            If Service.GetType Is GetType(StiTxtExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiWord2007ExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiXmlExportService) Then Service.ServiceEnabled = True
            If Service.GetType Is GetType(StiXpsExportService) Then Service.ServiceEnabled = True
        Next

        StiOptions.Viewer.Windows.ShowOpenButton = False
        StiOptions.Viewer.Windows.ShowSaveDocumentFileButton = False
        StiOptions.Viewer.Windows.ShowEditorTool = False
        StiOptions.Viewer.Windows.ShowSendEMailDocumentFileButton = False
        StiOptions.Viewer.Windows.ShowPageDeleteButton = False
        StiOptions.Viewer.Windows.ShowPageNewButton = False
        StiOptions.Viewer.Windows.ShowPageDesignButton = False
        StiOptions.Viewer.Windows.ShowInTaskbar = True


With report
                .RegData("repDataDetails", repDataDetails)
                .Load(AppPath + "reports\myreport.mrt")

                .Compile()
                AddHandler .CompiledReport.Printed, AddressOf ReportPrinted
                .Render()
            End With

            With stiVewForm
                .Width = frmMain.Width
                .Height = frmMain.Height
            End With

            stiVewForm.Report = report
            stiVewForm.WindowState = FormWindowState.Normal
            stiVewForm.ShowDialog()                       '<--------------------   when minizing the stiVewForm then I get an error here

If you need more information, just let me know.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Runtime Error: Argument out of Range when minimizing report

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please send us a simple test application which reproduces the problem.

Thank you.
TGoertler
Posts: 24
Joined: Wed Aug 25, 2010 9:16 am
Location: Gundelsheim/Germany

Runtime Error: Argument out of Range when minimizing report

Post by TGoertler »

Hello Aleksey,

after creating a demo project I found the problem. It is not a problem of Stimulsoft.NET. I use Skinsoft VisualStyler which produces the bug.

So I'll have a look how to disable it for the reports ... (Now I disabled the Minimizebox of the Form :biggrin: )

Thank you anyway.

Thomas
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Runtime Error: Argument out of Range when minimizing report

Post by Andrew »

This is very good because the issue is solved!

Have a nice day!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Runtime Error: Argument out of Range when minimizing report

Post by Alex K. »

Hello,

Thank you for letting us know about this.
Let us know if you need any additional help.

Thank you.
Post Reply