Click to See Complete Forum and Search --> : How to view more than 1 report simultaneously connecting to MSaccess database using V


lipi
November 30th, 2006, 05:12 PM
Hi,

How to view more than 1 report connecting to MSaccess database.

We have a requirement to connect each report to each table in MSaccess database.

There are (3) reports connecting to MSACCESS tables using VB 6.0.
We need to display (3) reports simultaneously.

For my understanding, shall I am using (3) forms containg 3 report viewer controls to view reports

Is there any better way of doing it.


Dim CrDatabase As CRAXDRT.Database
Set CrDatabase = Report.Database

Set Report = crystal.OpenReport("c:\test.rpt1", 1)
Report.DiscardSavedData
rs.Open strSqlQuery1, conn, adOpenStatic, adLockReadOnly
CrDatabase.SetDataSource rs, 3, 1
form1.CrystalActiveXReportViewer1.ReportSource = Report
form1.CrystalActiveXReportViewer1.ViewReport
Sleep 1000

Set rs = Nothing
Set crystal = Nothing
Set Report = Nothing

' for 2 nd Report


Set Report = crystal.OpenReport("c:\test.rpt1", 1)
rs.Open strSqlQuery2, conn, adOpenStatic, adLockReadOnly
CrDatabase.SetDataSource rs, 3, 1
form2.CrystalActiveXReportViewer2.ReportSource = Report
form2.CrystalActiveXReportViewer2.ViewReport
Sleep 1000

Set rs = Nothing
Set crystal = Nothing
Set Report = Nothing


Thanks in advance

jhersy2108
December 2nd, 2006, 02:22 AM
so what exactly do you want to do??? preview the 3 reports in only one viewer???? or in only one form???? i can't seem to understand clearly the your problem

lipi
December 4th, 2006, 10:16 AM
Hi,

I want to preview the 3 reports simultaneously in only one form.