By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,700 Members | 1,466 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,700 IT Pros & Developers. It's quick & easy.

MessageBox & Crystal Printing

P: n/a
Hey Group,

Hope you all well? Wonder if somebody could possibly help me?

At the Mo I use the following code to Print a Crystal Report:

rptForm.Text = "Excellence.Net - Fax`s" 'Set the form's titlebar
rptForm.CRVReportPrint.ReportSource = New Faxs() 'Tell the viewer which
report to display
rptForm.CRVReportPrint.RefreshReport() 'Refresh the viewer
rptForm.ShowDialog() 'Show the report

What I would Like is to have a it pop up a message box and ask me if I would
Like to Print a FaxUser report or a FaxAdmin Report?

How would I achive this?

Many Thanks
Regards
MCN
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Mon, 17 May 2004 11:10:59 +0100, MadCrazyNewbie wrote:
Hey Group,

Hope you all well? Wonder if somebody could possibly help me?

At the Mo I use the following code to Print a Crystal Report:

rptForm.Text = "Excellence.Net - Fax`s" 'Set the form's titlebar
rptForm.CRVReportPrint.ReportSource = New Faxs() 'Tell the viewer which
report to display
rptForm.CRVReportPrint.RefreshReport() 'Refresh the viewer
rptForm.ShowDialog() 'Show the report

What I would Like is to have a it pop up a message box and ask me if I would
Like to Print a FaxUser report or a FaxAdmin Report?

How would I achive this?

Many Thanks
Regards
MCN


There are many ways to do this. Here's one:

Create a form with two radio buttons for the two different reports. Add a
property to the form class (for example ReportToPrint) that will indicate
which option the user chose. Also have an OK and CANCEL button on the
form. When the user clicks the OK button, set the ReportToPrint property
of the form class to indicate which radio button was selected.

Use code similar to this to call the form:

'(This code is untested)

Dim sReportToPrint As String
Dim frm As New ReportChoiceForm

If frm.DialogResult = DialogResult.OK Then
sReportToPrint = frm.ReportToPrint

'Code to print report here
End If

Again, this is just one way. There are probably many other (and better)
ways to do this.

--
Chris

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.