Report SharpShooter Express

OMRebel

Active member
Joined
Sep 27, 2006
Messages
44
Programming Experience
Beginner
Hopefully this is the correct forum.

I am trying to use Perpetuumsoft's ShartShooter Express with VB.NET Express to create reports. However, I'm running into a problem.

Their website's walk through has me create a Preview button on a form. It says to set the click even to:
if (inlineReportSlot1 != null)
try
{
inlineReportSlot1.Prepare();
}
catch(Exception exc)
{
MessageBox.Show(exc.Message, "Report Sharp-Shooter", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

However, that is in C#. What would I need to do with VB.NET?
 
Also, it has me set the RenderCompleted even for the inlineReportSlot1 with the following C# code:
using (perpetuumSoft.Reporting.View.PreviewForm previewForm = new
PerpetuumSoft.Reporting.View.PreviewForm(inlineReportSlot1))
{
previewForm.WindowState = FormWindowState.Maximized;
previewForm.ShowDialog(this);
}

What is that in VB?
 
Hopefully this is the correct forum.

I am trying to use Perpetuumsoft's ShartShooter Express with VB.NET Express to create reports. However, I'm running into a problem.

Their website's walk through has me create a Preview button on a form. It says to set the click even to:
if (inlineReportSlot1 != null)
try
{
inlineReportSlot1.Prepare();
}
catch(Exception exc)
{
MessageBox.Show(exc.Message, "Report Sharp-Shooter", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

However, that is in C#. What would I need to do with VB.NET?

C# is pretty similar to Vb.net, in that if you can read vb.net, you can certainly read c# and convert it accordingly (also helps if you have a bit of background java knowledge).

VB.NET:
If Not (inLineReportSlot Is Nothing)
 
Try
        inLineReportSlot.Prepare()
Catch Ex as Exception
        messagebox.show(ex.tostring, "Report  Sharp-Shooter",
MessageBoxButtons.OK, MessageBoxIcon.Error)
 
End Try
 
End If

give that a whirl. i have no idea what inLineReportSlot is.. (control, form?) but thats the equivalent in vb.net

good luck
adam
 
Also, it has me set the RenderCompleted even for the inlineReportSlot1 with the following C# code:
using (perpetuumSoft.Reporting.View.PreviewForm previewForm = new
PerpetuumSoft.Reporting.View.PreviewForm(inlineReportSlot1))
{
previewForm.WindowState = FormWindowState.Maximized;
previewForm.ShowDialog(this);
}

What is that in VB?

hm, ok not as sure about this one, i have had limited experience with the using statement.

VB.NET:
Using (perpetuumSoft.Reporting.View.PreviewForm prievewForm = new PerpetuumSoft.Reporting.View.PreviewForm(inlineReportSlot1))
 
previewForm.WindowState = FormWindowState.Maximized
previewForm.ShowDialog() 'this could also be previewForm.Show()
 
End Using

good luck
 
Last edited:
Thanks for the replies. I'll give those a shot and see how it works. Again, thanks for your time on this.
 
Back
Top