Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
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 14th, 2006, 08:07 PM
Authorized User
 
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to pass Query to report at run time

Hi,

I am stuck in passing values to a report at run time to SQLQueryString,

I am using the below code
dim strsql as string ' run time query

Set CrystalReport1 = Application.OpenReport(App.Path & "\Reports\" & "test.rpt")
CrystalReport1.Database.LogOnServer "crdb_oracle.dll", strDsnServer, "", strDsnUser, strDsnPwd
  CrystalReport1.DiscardSavedData
  CrystalReport1.SQLQueryString=strsql
ViewerXI.CrystalActiveXReportViewer1.ReportSource = CrystalReport1
ViewerXI.CrystalActiveXReportViewer1.ViewReport



I could able to run query which is present in the report, but not the user selected values i.e. unable to pass the query at run time.

I am using Crystal XI with VB 6.0


I would appreciate your help in this regard.

Thanks in advance







Similar Threads
Thread Thread Starter Forum Replies Last Post
report generation at run time ??? nabeelkhan Crystal Reports 1 May 21st, 2006 11:21 PM
unable to pass parameters to crystal report ukumawat Crystal Reports 1 May 6th, 2006 09:08 AM
User date and time select and pass to query newbe Access 2 December 16th, 2005 08:59 AM
Can I get Field Value from Report in run-time ? Sini Crystal Reports 0 June 30th, 2004 05:33 PM
Create report at run time navinkaus Crystal Reports 1 May 22nd, 2004 07:16 AM





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