Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report question
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00642033
Message ID:
00646709
Views:
14
Sally,

>I'm following the "Setting View Parameters for Reports" instructions but I'm not getting anywhere. Even if it wasn't returning any records, it should still do something like show a blank report, no?

Not necessarily, by default, if your report has no data, VFP's print preview window opens up quickly and closes down again.

>I'm sure I've got everything screwed up now with this report. I know it has to do with my inexperience with business objects and data environment objects. This way of creating a report is so foreign to me. Do I need a business object on the form that asks for a date range? >

You really only need a business object if you are retrieving data from the back end or updating data.

Here's what I recommend...make sure the business object works properly outside the context of the report. That means, instantiate it from the Command Window and check to make sure it returns data. For example:

DO SetX
x = CREATEOBJECT("MyBusinessObject")
** Set your view parameters here
x.Requery()

If this works fine, have you checked out the sample Project Manager application to see how I'm doing it? If not, open up ProjMgr, go to the Documents tab in the Project, and open the ProjTask.frx report. Right-click on the report, and select "Data Environment" from the shortcut menu. Next, right-click on the form's Data Environment window and select "Code" from the shortcut menu. You'll see I have code in the Data Environment's "BeforeOpenTables", "Init" and "Destroy" methods that you can look at.

I'd like to help you figure this one out...Let me know what you discover!

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform