Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing a Report Exception (in case table empty)
Message
 
 
To
10/03/2010 08:38:21
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01453531
Message ID:
01453704
Views:
48
>So i spent a while removing allllll tables from my reports and adding cursors.
>so i have this qry
>
>select Books.*,Acc.prin,Acc.status;
>     From;
>         Acc;
>        inner join mainbase!books;
>on acc.ID=books.Id;
>where acc.status=("status");
>into cursor return
>
>
>Status is not a field in the table. is is a variable that gets data from an option group
>
>so acc.status has the values A & B
>
>so my program has
>
>
>public status
>do case
>      Case thisform.status=1
>status="a"
>case thisform.status=2
>status="b"
>
>
>So if i go back to my cursor...if i run it that way. the criteria isnt meet so the query doesnt run
>but! if i use
>
>(status)
>
>the query works! but! it tells me variable status cannot be found when ever i try to view the cursor code

Why did you put "status" in double quotes?

By doing so you used it as a literal "status".

You needed
select Books.*,Acc.prin,Acc.status;
     From;
         Acc;
        inner join mainbase!books ;
on acc.ID=books.Id;
where acc.status= m.status ;
into cursor return nofilter
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform