Report.Show() produces an empty report

Stimulsoft Reports.NET discussion
Post Reply
TheOmniAdam
Posts: 16
Joined: Mon Oct 11, 2010 9:43 am

Report.Show() produces an empty report

Post by TheOmniAdam »

I have a bit of code written that creates several datasets and individually assigns each of them as Datasets in the StiReport. I already have it working where the user chooses to open in design or show mode when there is only one dataset, and both work fantastically. However, when multiple datasets are used, the preview window is empty- Both scrollbars are present (For the page your viewing and to scroll through all pages), but no report or data appears. In fact the area where the report and pages should load just shows the neutral background color and nothing else. It originallylists how many pages it SHOULD have near the bottom of the screen, but if I click on the page number to input a page in navigation it says out of 0 pages.

Any ideas what could bring this error about in such a spcecific circumstance? I use the same code for Multiple datasets or single. Here is a pseudo-code example of the two:


For single dataset

Code: Select all

            Report.ScriptLanguage = Stimulsoft.Report.StiReportLanguageType.VB
            Report.IsModified = False
            Report.RegData("DataSet", grdResults.DataSource)
            Report.Load(strFileName)
            Try
                If btnDesign.Checked = True Then
                    Report.Design()
                ElseIf btnPreview.Checked = True Then
                    Report.Show()
                Else
                    Exit Sub()
                End If
            Catch
            End Try

For multiple datasets

Code: Select all

            Report.ScriptLanguage = Stimulsoft.Report.StiReportLanguageType.VB
            Report.IsModified = False
            dim i as int = 0
            While i < dctDatasets.Count
                Report.RegData("DataSet_" & i.tostring, dctDatasets(i))
               I+=1
            End While
            Report.Load(strFileName)
            Try
                If btnDesign.Checked = True Then
                    Report.Design()
                ElseIf btnPreview.Checked = True Then
                    Report.Show()
                Else
                    Exit Sub()
                End If
            Catch
            End Try

While the real thing is a bit more complicated, the assigning of datasets and calling of the Reports is not. How could the second Report.Show() produce an empty report while the former produces a perfectly working dataset
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Report.Show() produces an empty report

Post by Ivan »

Hello,

Can you please send us a simple test project, which reproduces the issue?

Thank you.
Post Reply