How to specify to the report generator to use my window of report preview?
Your window of report preview needs to have the constructor which receives at the input an object of the report. After this use the PreviewForm property of the report class. This property has the Type type. In other words your window of report preview will be created first and then displayed.
C#
//Create a new window
public class Form1 : Form
{
public Form1(StiReport report)
{
}
}
//Fill the PreviewForm property
report.PreviewForm = typeof(Form1);
VB
'Create a new window
Public Class Form1
Inherits Form
Public Sub New(ByVal report As StiReport)
InitializeComponent()
End Sub
End Class
'Fill the PreviewForm property
Report1.PreviewForm = CType(GetType(Form1), Type)