Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with report in preview mode
Message
 
 
To
18/10/2004 10:47:01
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00950371
Message ID:
00952504
Views:
17
This message has been marked as the solution to the initial question of the thread.
Canh,

---
1. All fields come from variables, not from a table and I want them printing one time. If I these fields location in detail band, they will repeat print with "reccount()" times.
2. I don’t want use “scope” clause in report command to print the fields with one time.
---

You could just create a cursor with one record and SELECT that cursor before your report form command. It doesn't matter what's in the cursor, this will do:

CREATE CURSOR ONE (onefield l)
APPEND BLANK

You can alias all your report expressions to point to the real table, if you do use any table values, although if all your expressions are variables rather than table values, you shouldn't even have to do that.

But if you don't want to add the cursor or change work areas, you could also put the entire report in a Title band. The Title band would be better behaved, although it may not span pages properly. (A Page Header does have to be in *ONE* Page, the Title is a little different.)

But your best option is probably a Summary band (don't use the option to start a new page for the Summary, just add a summary band and move all your objects to that band. Make the Page Header band small again). The Summary band should flow to multiple pages properly, in case you need that.

You should be aware of a couple of other things:

1) You need to tell the other layout elements, below the stretching data, to float. You have them fixed relative to top of band, which means that any stretching text will overlay them rather than pushing them down. If you really do have stretching strings, you probably want to make room for them, not overlay them.

2) You have @! on some of your long text fields. This is not a good idea, you're going to run into "string is too long to fit" if the text strings get long. You will see this if you change the value of the report variable test_times in my example report to a high number. You can use UPPER() in your report expression instead, you don't need the format expression.

3) No matter what you choose to do, I think it is a bad idea to say "I put all my report information in the page header to get it to print once and I don't want to use a scope of NEXT 1". What do you expect to happen if there is *no* table selected in the current work area or if the current table is at EOF()? REPORT FORM is a scoped command and always works on a scope for the current work area. That is why I think you should create the cursor, as above. You need to have control over the report, and you can do this through scope.

4) You said you would try out my report. I'm not sure why. I only changed the report to show you that I do not need data or an application to work on a report. I just need the FRX, because I will change whatever you send me the way I changed that one <s>. I sent to to you to show you what it would look like when I tested, not because it solves your problem in any way. Please remember that I only need the FRX/FRT if you have problems in the future.

HTH,

>L<
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform