Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRViewer control and using multiple tabs on it

Status
Not open for further replies.

suzreid

Technical User
Sep 26, 2000
59
GB
I have a VB (ver 6) application that uses the CRViewer (ver 8.5) in one of the forms.

Is there anyway of creating new tabs on the control to hold a new report on each of them?

The user wants to be able to choose either an individual option as a parameter for the report or all the options from the table. If he chooses all the options, there should be a single report for each option and he should be able to either loop through them one at a time or to see each report on a separate tab on the viewer.

At the moment, the application previews one report in the viewer, the user then clicks a message box to preview the next report. The problem here is that the user cannot access any of the functions on the Viewer control when the message is on screen as it is modal.

Creating one long report is a last resort.

Can anyone help? I seem to be going round in circles.

Suz
 
Instead of having the CRViewer taking up the whole form, resize it leaving a gap at the top for some buttons of some sort.
Write code for the buttons to change which report is being shown.
There's other ways of doing it, but this is pretty straightforward. Andrew Baines
Chase International
 
i've done it trhu select screen ...
place a button on your form and write in the cklick method :
OpenFileDialog dlg = new OpenFileDialog();
dlg.Title = "Select Crystal Reports file";
dlg.Filter = "Crystal Reports (*.rpt)|*.rpt|All Files (*.*)|*.*";
dlg.InitialDirectory = "C:\\C# Try\\ReportApplication";
if (dlg.ShowDialog() == DialogResult.OK)
{
this.Cursor = Cursors.WaitCursor;
crystalReportViewer1.ReportSource = dlg.FileName;
this.Cursor = Cursors.Default;
}

Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top