Re: Newbie - Date range parameters question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Don (doncal_at_ntlworld.com)
Date: 11/09/04


Date: Tue, 9 Nov 2004 15:57:28 -0000

Hi Ken,

Thanks for replying.
I have tried {Table.DateField} in {?Dates}but I get a Crystal Reports error

Crystal Reports: Database Error
ODBC error:: [Microsoft][ODBC]Syntax error or access violation

My syntax appears fine. Even the where clause below gives that error
message.

WHERE
    RSM_JOB.CLOSEDDATE in {?Dates}

Any ideas?

"Ken Briscoe" <youcant@sendmespam.com> wrote in message
news:uQfwIXmxEHA.2580@TK2MSFTNGP10.phx.gbl...
> In news:%23ETRbgfxEHA.908@TK2MSFTNGP11.phx.gbl,
> Don <doncal@ntlworld.com> rambled:
> >
> > Basically I would like to add a date range to the sql query before it
> > is executed.
> > Im using 8.5.
> >
> > The user enters the start and end date on running the report. How do
> > I pass those parameters on to the SQL query?
>
> Use the Select Expert (which basically is a GUI for modifying the "WHERE"
> clause of the SQL being passed to the database). Add in something like
this
> to what's already there:
>
> //if your date parameter is a range, use next line
> {Table.DateField} in {?DateRange}
>
> //if you have two date parameters that create your range, use next 2 lines
> {Table.DateField} > {?LowerBoundaryParameter} and
> {Table.DateField} < {?UpperBoundaryParameter}
>
> Hope that helps.
>
> --
>
> KB - MCNGP "silent thug" #26
>
> Briscobar AT gmail DOT com
>
>



Relevant Pages

  • Re: Newbie - Date range parameters question
    ... > Thanks for replying. ... > Crystal Reports: Database Error ... >> clause of the SQL being passed to the database). ...
    (microsoft.public.vb.crystal)
  • Sending SQL query to Crystal Reports
    ... I am developing an application that constructs a "Adhoc" sql query and displays a PDF file showing the records. ... I there is there a way I can do all these in the Crystal reports? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Crystal Reports and Oracle Stored Procedure Insert statments
    ... I'm using Oracle 9i, Crystal Reports 10, ODBC connection. ... Look at writing queries with the WITH clause. ... My sub1 returns less rows than sub2, but is a more complicated query. ...
    (comp.databases.oracle.server)
  • vb 6/crystal 8.5 and setdatasource not working.
    ... i have a simple report which in crystal reports is populated by an sql query ... select * from customer inner join loans on ... i've tested the recordset and it only has my ...
    (microsoft.public.vb.crystal)
  • Re: Viewing SQL in *.rpt files?
    ... *practical* documentation, all those Crystal Reports ... gurus on this newsgroup have been highly helpful! ... > onto the appropriate database to get the SQL query to appear in "Display SQL ...
    (microsoft.public.vb.crystal)