Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
| Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 30th, 2006, 06:22 PM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to view more than 1 report simultaneously conn

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







Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrolling ListViews simultaneously. Saju_K .NET Framework 1.x 0 April 27th, 2007 01:50 AM
Wroking with Report View anukagni Access 2 April 18th, 2006 12:31 AM
Report with view ceema Crystal Reports 1 April 4th, 2006 02:45 AM
permission to view report collie BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 February 12th, 2005 05:13 PM
Login fail Err when view report on Report Server dillig BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 22nd, 2004 05:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.