That is not quite it yet. The problem is this gives me a range of dates for StartDate and EndDate fields. What I can't find is a function that will then give me the min and max of these to ranges. If I try to just use MIN( [StartDate] ) I get error 505 ( which I take it means wrong parameter type )
I suppose I could try to fashion a function that would convert these dates to numbers ( since that is what they are ) and then get the min and max...but, that seems like a lot of work for something that is directly supported in other products. In competitor's products they expose the parameters at the report level: Access I would use something like [DatebaseName]![Report1]![StartDate], this would give me the users response. Crystal Basically the same thing, but we don't need to reference the database, just the report name if we are generating the report in code, and just the parameter name when referencing within the report. In other words they have a concept of runtime parameters at the report itself, I don't find anything like that in Report Designer. On 5/18/07, Andrew Jensen <[EMAIL PROTECTED]> wrote:
Alright - if people don't mind I might doing this type of thing all weekend long and - that is Asking a question and Answering it in another post. One answer to that question can be to use an alias for the two parameters. So, in the report query ( in the SQL command in the report definition ) I would enter this: SELECT *, DateField AS StartDate, DateField AS EndDate FROM TABLE WHERE StartDate >= :StartDate AND EndDate <= :EndDate Then in the report I can reference the fields StartDate and EndDate On 5/18/07, Andrew Jensen < [EMAIL PROTECTED]> wrote: > > To clarify a question I posed earlier. > > What I want to know is how to find the parameters that where used to > generate the report, from within the report. > > I have a report that prints out sales orders. > > It is based on a query that takes two parameters: :StartDate and > :EndDate > > The user runs the report and enters the values 01/01/07 and 01/31/07 > > On the report I want to print in the report header > > SALES REPORT FOR PERIOD 01/01/07 TO 01/31/07 > > The question is how do I get to that information? > > Drew > > >
