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 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