Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Still having problem..
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00116687
Message ID:
00116713
Views:
19
Hwa,

First, _TALLY is a system controlled variable that holds a count based on the most recent command processed (that will have an affect on it). Some of these include:

count ...
calculate ...
copy to ... for
select ... from

Now, the bigger problem. Check in the report designer to see if it is based on a private data session or not. Under the "Report" system menu, there is an option for "Private Data Session". Make sure there is NO check mark beside it.

If the view you created "printnow" is being used, the report should see it and run with no problem. To play it safe, you might want to make sure this alias is the current area, then call the report.
select printnow
report form ... to print/preview ...
You are also talking about a second level form? I assume this to be for order details. One view is for the order header information (sold to who, address, order total, etc) and line item information (based on order number, what items and quantities were ordered).

If this is the case, you should probably have your views defined with parameters to only show records pertaining to ONE order. Don't try to do this with filters. Then you would have two views.

Example:
*/ Header view
create view OrderHeader as;
  select * from orders;
    where ordernum = ?CurOrder

*/ Detail view
create view OrderDetails as;
  select * from details;
    where ordernum = ?CurOrder

*/ Then you can use like normal tables...
CurOrder = 27  && or whatever the order # is
use OrderHeader
select 0
use OrderDetails
This is to assume that both tables have a key field called ordernum and there is a variable available called "CurOrder" of the same data type for the order you wish to be viewing. In the above example, you can now run the report starting with the details file and using the alias prefix for fields desired from the header file in the report.

Hope this helps you in the direction you were hoping...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform