Solved

Passing Parameters to Seagate Crystal Reports

Posted on 2003-10-31
7
243 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
  • 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 100

Accepted Solution

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

Expert Comment

by:Anthony Perkins
ID: 9663995
0
 
LVL 100

Expert Comment

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

mlmcc
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2003, my txt file export is running backwards 4 52
Windows 10 start screen issues 9 55
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 49
TT Auto Dashboard 13 92
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

832 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