Multiple reports 
Author Message
 Multiple reports

Hi,
I created a form with 3 buttons, each to open a different
report. When click a report viewer form will open.  
Currentlt all buttons pointed to same report. Please help
to striaght out my code.

Private Sub Form_Load()
    'Declare an application object
    Dim crxApplication As New CRAXDRT.Application

    'Declare report object
    Dim Dept_Summary As CRAXDRT.Report
    Dim Account_Detail As CRAXDRT.Report
    Dim Dept_Detail As CRAXDRT.Report

    Screen.MousePointer = vbHourglass

    'Use the .OpenReport method of the Application object
to set your Report object to a RPT file

    Set Dept_Summary = crxApplication.OpenReport(App.Path
& "\Bucs_Dep_Summary.rpt")
    CRViewer1.ReportSource = Dept_Summary
    Dept_Summary.DiscardSavedData

    Set Account_Detail = crxApplication.OpenReport
(App.Path & "\Bucs_Account_Detail.rpt")
    CRViewer1.ReportSource = Account_Detail
    Account_Detail.DiscardSavedData

    Set Dept_Detail = crxApplication.OpenReport(App.Path
& "\Bucs_Dep_Detail.rpt")
    CRViewer1.ReportSource = Dept_Detail
    Dept_Detail.DiscardSavedData

    CRViewer1.ViewReport
    ReportViewerFrm.WindowState = vbMaximized

    'Zoom the preview window to 100%
    CRViewer1.Zoom 100
    Screen.MousePointer = vbDefault

Thanks



Thu, 06 May 2004 23:49:38 GMT  
 Multiple reports
Hi.

I posted a question a few days ago but, looking back on it, it wasn't very
clear. Sorry about that. I'm going to try to explain myself better this
time.

I have a CR report that, when run, uses a parameter query to ask the user to
select which type of report they want. They can choose either an invoice or
a packing slip. For this client the invoice and the packing slip are
significantly different and so it would be a pain to use formulas to
accommodate all the differences.

How can I make CR open up one of two different reports depending on the
selection the user makes from the parameter query at the beginning?

Thanks.

James



Sun, 09 May 2004 01:01:29 GMT  
 Multiple reports
Hello James,

Why are you using a parameter to ask the user that question? You can easily
make your own interface, for example 2 buttons labelled 'Invoice' and
'Packing Slip' and run the right report based on that...

Regards,

Bas


Quote:
> Hi.

> I posted a question a few days ago but, looking back on it, it wasn't very
> clear. Sorry about that. I'm going to try to explain myself better this
> time.

> I have a CR report that, when run, uses a parameter query to ask the user
to
> select which type of report they want. They can choose either an invoice
or
> a packing slip. For this client the invoice and the packing slip are
> significantly different and so it would be a pain to use formulas to
> accommodate all the differences.

> How can I make CR open up one of two different reports depending on the
> selection the user makes from the parameter query at the beginning?

> Thanks.

> James



Sun, 09 May 2004 17:40:25 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. 20520 Multiple CR Controls for multiple reports

2. Merging Multiple Reports at Runtime - Crystal Reports.NET

3. Multiple report reports

4. VB.net and crystal reports.net Multiple reports

5. Printing multiple reports as one report

6. How to compile multiple reports into one executable under Crystal Report 6.0

7. Print Multiple reports from a recordset?

8. Sending Multiple Reports in One e-mail

9. Multiple report instances

10. Consecutive page numbers on multiple reports

11. Continuous pages for multiple reports

12. print multiple reports with filtered data...

 

 
Powered by phpBB® Forum Software