Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Preview / Print from a Cursor
Message
From
10/03/1999 05:55:30
 
 
To
10/03/1999 01:12:59
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00195721
Message ID:
00195751
Views:
17
>I generally run reports by creating a cursor, then running it through REPORT FORM PREVIEW and a report file (.FRX).
>
>I have one report that (almost all the time) shows the first page of the report in the PREVIEW, but any attempt to go to the next page, or print it, causes a "Variable not found" error. The "variable name" is always the name of one of the columns in the driving cursor.
>
>The cursor is created by a somewhat involved process of SELECTs on SELECTs. I have tried several things, which don't help:
>
>1. Re-created the report .FRX from scratch
>
>2. Included the NOFILTER clause in all SELECT - SQL statements to force creation of a physical file.
>
>3. Tried putting the cursor creation code in the INIT() method of the report DataEnvironment.
>
>This is a really annoying problem - I can insert a BROWSE immediately before the REPORT FORM PREVIEW, and the driving cursor is there and perfect. But it won't print or preview properly.
>
>The problem also occurs with a straight REPORT FORM TO PRINT rather than PREVIEW.
>
>Any help or ideas greatly appreciated.
>
>Regards. Al




I suggest you to use a Form new property or even a public variable on that
cursor query!

the only thing you do more is:

Thisform.Select_Order_No = thisform.text1.value
* PublicReportVar_Select_Order_No = thisform.text1.value
select 0
select .... where Order_No = ?Thisform.Select_Order_No into cursor prtCursor
...

because you may take a wrong form and lose the property if you are using a
formset, but you can ensure the variable will not have any problem on cursor...

But why I suggest a very long variable name is to remind you:
Not to use this variable unless you really want to print!

Handling Public variable needed a good manner
or you will get a great trouble on maintainenance. >^.^<
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform