load stimulsoft form inside a microsoft form
load stimulsoft form inside a microsoft form
I am trying to create a windows form that contains several reports, each report is first written directly in stimulsoft with the options form include with the report. Here is a sample report of what i mean by a report and form in stimulsoft:
EngineV2
None;Black;2;Solid;False;4;Black
Transparent
Transparent
0,0.1,7.3,0.2
Arial,8
0,0,0,0
Text1
this report is a demo of my questions.
Black
Expression
c19b1d4fd9f940fb99d8252937adce4b
0.39,0.39,0.39,0.39
Page1
11
8.5
Letter
Arial,100
[50:0:0:0]
Control
96,72,80,40
OK
Microsoft Sans Serif,8
Black
96, 72
cmdShow
80, 40
Button
Microsoft Sans Serif,8
6cb9e104922c4d0f9b37ebedd7502245
0, 0
Form1
304, 232
Form1
System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll
Report
8/4/2011 1:33:28 PM
8/4/2011 1:09:55 PM
c3be4767b12f4e45be1371342016ec45
Report
Inches
2010.2.800
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
namespace Reports
{
public class Report : Stimulsoft.Report.StiReport
{
public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp
END OF REPORT
END OF REPORT
My program that calls this needs to load first the form inside my programs form, on a new tab. I am trying to do this using VB .Net 2010. The code that shows how i am attempting to do this looks like this:
'When you click to show the report it goes to this:
Private Sub cmdShowReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdShowReport.Click, lstReports.DoubleClick
If lstReports.SelectedIndex -1 Then
'MessageBox.Show(lstReports.SelectedItem.ToString())
AddReportTab(lstReports.SelectedItem.ToString(), Application.StartupPath, "Demo.mrt")
End If
End Sub
'Which calls this form which i was hoping would load the stimulsoft form inside of the new tab:
Private Sub AddReportTab(ByVal rsReportName As String, ByVal rsReportLocation As String, ByVal rsReportFileName As String)
Dim loReportFormViewer As New Stimulsoft.Report.StiViewMode
Dim loViewer As New Stimulsoft.Report.Viewer.StiViewerControl
Dim loReport As New Stimulsoft.Report.StiReport
'create the tab for the report
Dim tpReportTab As New TabPage
tabsHistoricalReports.TabPages.Add(tpReportTab)
tabsHistoricalReports.SelectedTab = tpReportTab
tpReportTab.Text = rsReportName
loViewer.Dock = DockStyle.Fill
tpReportTab.Controls.Add(loViewer)
loReport.Load(rsReportLocation & "\" & rsReportFileName)
loViewer.Report = loReport
loReport.Show(True)
End Sub
can you tell me what I need to do to make this work right?
Thanks, Chris
EngineV2
None;Black;2;Solid;False;4;Black
Transparent
Transparent
0,0.1,7.3,0.2
Arial,8
0,0,0,0
Text1
this report is a demo of my questions.
Black
Expression
c19b1d4fd9f940fb99d8252937adce4b
0.39,0.39,0.39,0.39
Page1
11
8.5
Letter
Arial,100
[50:0:0:0]
Control
96,72,80,40
OK
Microsoft Sans Serif,8
Black
96, 72
cmdShow
80, 40
Button
Microsoft Sans Serif,8
6cb9e104922c4d0f9b37ebedd7502245
0, 0
Form1
304, 232
Form1
System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll
Report
8/4/2011 1:33:28 PM
8/4/2011 1:09:55 PM
c3be4767b12f4e45be1371342016ec45
Report
Inches
2010.2.800
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
namespace Reports
{
public class Report : Stimulsoft.Report.StiReport
{
public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp
END OF REPORT
END OF REPORT
My program that calls this needs to load first the form inside my programs form, on a new tab. I am trying to do this using VB .Net 2010. The code that shows how i am attempting to do this looks like this:
'When you click to show the report it goes to this:
Private Sub cmdShowReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdShowReport.Click, lstReports.DoubleClick
If lstReports.SelectedIndex -1 Then
'MessageBox.Show(lstReports.SelectedItem.ToString())
AddReportTab(lstReports.SelectedItem.ToString(), Application.StartupPath, "Demo.mrt")
End If
End Sub
'Which calls this form which i was hoping would load the stimulsoft form inside of the new tab:
Private Sub AddReportTab(ByVal rsReportName As String, ByVal rsReportLocation As String, ByVal rsReportFileName As String)
Dim loReportFormViewer As New Stimulsoft.Report.StiViewMode
Dim loViewer As New Stimulsoft.Report.Viewer.StiViewerControl
Dim loReport As New Stimulsoft.Report.StiReport
'create the tab for the report
Dim tpReportTab As New TabPage
tabsHistoricalReports.TabPages.Add(tpReportTab)
tabsHistoricalReports.SelectedTab = tpReportTab
tpReportTab.Text = rsReportName
loViewer.Dock = DockStyle.Fill
tpReportTab.Controls.Add(loViewer)
loReport.Load(rsReportLocation & "\" & rsReportFileName)
loViewer.Report = loReport
loReport.Show(True)
End Sub
can you tell me what I need to do to make this work right?
Thanks, Chris
- Attachments
-
- 1229.HistoricalReports.zip
- (119.96 KiB) Downloaded 180 times
load stimulsoft form inside a microsoft form
Hello,
Can you please send us your project or sample project for analysis.
Thank you.
Can you please send us your project or sample project for analysis.
Thank you.
load stimulsoft form inside a microsoft form
I attached the visual studio program and the demo.mrt as a zip file to the original post.
Thanks, Chris
Thanks, Chris
load stimulsoft form inside a microsoft form
Hello,
Please check the project you sent. When opening it, errors occur.
Thank you.
Please check the project you sent. When opening it, errors occur.
Thank you.
load stimulsoft form inside a microsoft form
I had one file in a different folder, i recreated it in this upload. What i'd like it to do is open the form and the resulting report in the new tab that is created.
Thanks, Chris
Thanks, Chris
- Attachments
-
- 1233.TabbedReportDemo.zip
- (80.21 KiB) Downloaded 206 times
load stimulsoft form inside a microsoft form
Hello,
Please check the modified project in attachment.
Thank you.
Please check the modified project in attachment.
Thank you.
- Attachments
-
- 1236.TabbedReportDemo.zip
- (20.59 KiB) Downloaded 210 times
load stimulsoft form inside a microsoft form
Thanks for that, don't render the report and it shows up only in the report viewer already created. The other part was, is it possible to show the form with the button in the tab then the report in the same tab?
Thanks.
Thanks.
load stimulsoft form inside a microsoft form
Hello,
Unfortunately, but we hardly think it can be done. Alternatively, instead of the report you can create a form with a button on the tab in your application. In this case, you will display a tab with a form and then, clicking the button, you run a report.
Thank you.
Unfortunately, but we hardly think it can be done. Alternatively, instead of the report you can create a form with a button on the tab in your application. In this case, you will display a tab with a form and then, clicking the button, you run a report.
Thank you.