We have an App built on FoxPro that allows us to create reports outside of
it and load then in to it with out access to the source code.

I need to add parameters for the report to pull in a given date range. Is
there a way for me to cause a dialog to pop asking for the parameters,
within the report creation tools in VFP9?

Thanks in advance,

David

RE: Report Parameters by EdJames

EdJames
Thu Oct 13 12:21:02 CDT 2005

I've set parameters for views and or tables within the data environment of a
report through the "beforeopentables event code". I believe you could define
a window with entries for parameters there as well. If your working with VFP
9.0, you may have additional capabilities. The "reportlistener class" has a
"loadreport event", which is typically used for setup.

"David De Wald" wrote:

> We have an App built on FoxPro that allows us to create reports outside of
> it and load then in to it with out access to the source code.
>
> I need to add parameters for the report to pull in a given date range. Is
> there a way for me to cause a dialog to pop asking for the parameters,
> within the report creation tools in VFP9?
>
> Thanks in advance,
>
> David
>
>
>

Re: Report Parameters by David

David
Thu Oct 13 12:46:18 CDT 2005

To clarify a little; I do not have access to the source code for the
Appplication. And I don't know anything about coding for FoxPro.

I'm just the lucky guy that was given VFP9 and told to "Create this report".

David

"Ed James" <EdJames@discussions.microsoft.com> wrote in message
news:77D86281-2AEB-4247-97FE-AF8E6A2DA5C0@microsoft.com...
> I've set parameters for views and or tables within the data environment of
> a
> report through the "beforeopentables event code". I believe you could
> define
> a window with entries for parameters there as well. If your working with
> VFP
> 9.0, you may have additional capabilities. The "reportlistener class" has
> a
> "loadreport event", which is typically used for setup.
>
> "David De Wald" wrote:
>
>> We have an App built on FoxPro that allows us to create reports outside
>> of
>> it and load then in to it with out access to the source code.
>>
>> I need to add parameters for the report to pull in a given date range. Is
>> there a way for me to cause a dialog to pop asking for the parameters,
>> within the report creation tools in VFP9?
>>
>> Thanks in advance,
>>
>> David
>>
>>
>>



Re: Report Parameters by Anders

Anders
Thu Oct 13 22:43:28 CDT 2005

Do you know any SQL commands? Like SELECT .. FROM ... WHERE datecolumn
BETWEEN ?dateparam1 AND ?dateparam2 INTO CURSOR reportdatasource
or
CREATE VIEW vReportDataSource AS SELECT .. FROM ...
WHERE datecolumn BETWEEN ?dateparam1 AND ?dateparam2

dateparam1=DATE(yyyy,mm,dd)
dateparam2=DATE(yyyy,mm,dd)
USE vReportDataSource
REPORT FORM ...

-Anders

"David De Wald" <daviddewald@solantic.com> skrev i meddelandet
news:enV8nEB0FHA.3300@TK2MSFTNGP15.phx.gbl...
> We have an App built on FoxPro that allows us to create reports outside of
> it and load then in to it with out access to the source code.
> > I need to add parameters for the report to pull in a given date range.
> > Is
> there a way for me to cause a dialog to pop asking for the parameters,
> within the report creation tools in VFP9?
>
> Thanks in advance,
>
> David
>



Re: Report Parameters by Anders

Anders
Thu Oct 13 22:44:33 CDT 2005

All you need is being able to get to tables.
-Anders

"David De Wald" <daviddewald@solantic.com> skrev i meddelandet
news:e4ebL4B0FHA.3188@TK2MSFTNGP14.phx.gbl...
> To clarify a little; I do not have access to the source code for the
> Appplication. And I don't know anything about coding for FoxPro.
>
> I'm just the lucky guy that was given VFP9 and told to "Create this
> report".
>
> David
>
> "Ed James" <EdJames@discussions.microsoft.com> wrote in message
> news:77D86281-2AEB-4247-97FE-AF8E6A2DA5C0@microsoft.com...
>> I've set parameters for views and or tables within the data environment
>> of a
>> report through the "beforeopentables event code". I believe you could
>> define
>> a window with entries for parameters there as well. If your working with
>> VFP
>> 9.0, you may have additional capabilities. The "reportlistener class" has
>> a
>> "loadreport event", which is typically used for setup.
>>
>> "David De Wald" wrote:
>>
>>> We have an App built on FoxPro that allows us to create reports outside
>>> of
>>> it and load then in to it with out access to the source code.
>>>
>>> I need to add parameters for the report to pull in a given date range.
>>> Is
>>> there a way for me to cause a dialog to pop asking for the parameters,
>>> within the report creation tools in VFP9?
>>>
>>> Thanks in advance,
>>>
>>> David
>>>
>>>
>>>
>
>



Re: Report Parameters by David

David
Thu Oct 13 15:33:28 CDT 2005

Yes, I know SQL and I've made a view that cotains the data I need.

Where exactly would I put:
dateparam1=DATE(yyyy,mm,dd)
dateparam2=DATE(yyyy,mm,dd)
USE vReportDataSource
REPORT FORM ...

in the report to have it pop for the parameters?

"Anders" <anders@anders> wrote in message
news:OIU8VfC0FHA.612@TK2MSFTNGP10.phx.gbl...
> Do you know any SQL commands? Like SELECT .. FROM ... WHERE datecolumn
> BETWEEN ?dateparam1 AND ?dateparam2 INTO CURSOR reportdatasource
> or
> CREATE VIEW vReportDataSource AS SELECT .. FROM ...
> WHERE datecolumn BETWEEN ?dateparam1 AND ?dateparam2
>
> dateparam1=DATE(yyyy,mm,dd)
> dateparam2=DATE(yyyy,mm,dd)
> USE vReportDataSource
> REPORT FORM ...
>
> -Anders
>
> "David De Wald" <daviddewald@solantic.com> skrev i meddelandet
> news:enV8nEB0FHA.3300@TK2MSFTNGP15.phx.gbl...
>> We have an App built on FoxPro that allows us to create reports outside
>> of it and load then in to it with out access to the source code.
>> > I need to add parameters for the report to pull in a given date range.
>> > Is
>> there a way for me to cause a dialog to pop asking for the parameters,
>> within the report creation tools in VFP9?
>>
>> Thanks in advance,
>>
>> David
>>
>
>



Re: Report Parameters by Bernhard

Bernhard
Fri Oct 14 03:29:25 CDT 2005

Hi David

> Yes, I know SQL and I've made a view that cotains the data I need.
>
> Where exactly would I put:
> dateparam1=DATE(yyyy,mm,dd)
> dateparam2=DATE(yyyy,mm,dd)
> USE vReportDataSource
> REPORT FORM ...
>
> in the report to have it pop for the parameters?
Don't put them anywhere. If the parameter variables of a view don't exist,
Foxpro opens a dialogbox, one for each variable, to ask for the actual value.
Since this dialogbox is generic, give your variable a name that is easy to
understand. Instead of ?dateparam1, ?dateparam2 you would like to use maybe
?first_invoice_date, ?last_invoice_date.

Regards
Bernhard Sander

Re: Report Parameters by Anders

Anders
Sat Oct 15 03:52:53 CDT 2005

Hi David
You put them immediately before the commands
USE vReportDataSource
or REQUERY('vReportDataSource')
REPORT FORM x TO PRINTER
They can be defines as local variables
LOCAL dateparam1, dateparam2
dateparam1= Thisform.Text2.Value
dateparam2 = Thisform.Text3.Value
REQUERY ('vreportdatasource')
or passed as parameters
FUNCTION xx (dateparam1, dateparam2)
REQUERY('vreportdatasource')
anything as long as they have the same names you used in your view
definition, and are alive when you open or requery the view
-Anders

"David De Wald" <daviddewald@solantic.com> skrev i meddelandet
news:uu72fVD0FHA.3124@TK2MSFTNGP12.phx.gbl...
> Yes, I know SQL and I've made a view that cotains the data I need.
>
> Where exactly would I put:
> dateparam1=DATE(yyyy,mm,dd)
> dateparam2=DATE(yyyy,mm,dd)
> USE vReportDataSource
> REPORT FORM ...
>
> in the report to have it pop for the parameters?
>
> "Anders" <anders@anders> wrote in message
> news:OIU8VfC0FHA.612@TK2MSFTNGP10.phx.gbl...
>> Do you know any SQL commands? Like SELECT .. FROM ... WHERE datecolumn
>> BETWEEN ?dateparam1 AND ?dateparam2 INTO CURSOR reportdatasource
>> or
>> CREATE VIEW vReportDataSource AS SELECT .. FROM ...
>> WHERE datecolumn BETWEEN ?dateparam1 AND ?dateparam2
>>
>> dateparam1=DATE(yyyy,mm,dd)
>> dateparam2=DATE(yyyy,mm,dd)
>> USE vReportDataSource
>> REPORT FORM ...
>>
>> -Anders
>>
>> "David De Wald" <daviddewald@solantic.com> skrev i meddelandet
>> news:enV8nEB0FHA.3300@TK2MSFTNGP15.phx.gbl...
>>> We have an App built on FoxPro that allows us to create reports outside
>>> of it and load then in to it with out access to the source code.
>>> > I need to add parameters for the report to pull in a given date range.
>>> > Is
>>> there a way for me to cause a dialog to pop asking for the parameters,
>>> within the report creation tools in VFP9?
>>>
>>> Thanks in advance,
>>>
>>> David
>>>
>>
>>
>
>