Solved

Passing Parameters to Seagate Crystal Reports

Posted on 2003-10-31
7
263 Views
Last Modified: 2010-05-03
I am using a Visual Basic Application as the Front End and Crytsal Reports as the Reporting tool.  I want to generate some reports on the base of the dates provided by the user, for that I have to pass the "from date" and the "to date" to the Crystal Reports as parameters.  But every time I pass the SQL query to the crystal reports alongwith the parameters it always gives me an error and never the correct report with the data is generated.  So can u tell me how can I pass the SQL query alongwith the dates as the parameters to the Crystal Reports.  I am using VB 6.0 and Crystal Reports 8.0
0
Comment
Question by:njvyas007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
7 Comments
 

Expert Comment

by:nirmal_4194
ID: 9662452
do not declare your parameter as date, declare parameter as text and then in your query - WHERE clause you convert the text into date using CDate() function.

i.e.
PARAMETERS mFromDt Text(125), mTODt Text(125);
SELECT * FROM tbl_Master WHERE FromDate >= cdate(mFromDt) AND ToDate <= cdate(mToDt)

pass your parmater as text in vb.

i hope this will solve your problem.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 20 total points
ID: 9662834
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9663995
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 10170888
My link should have solved the problem.

mlmcc
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month4 days, 13 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question