Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report gets cut off when data does not fit on 1 page. 1

Status
Not open for further replies.

iyarosh

Programmer
Apr 14, 2003
49
US
Hello,

I have a report that works fine when all the data is fit onto one page, but when it's too much for one page and I'd expect the second page of the report to be created, that does not happen. I've tried all the options available on the report menu with no luck. I've redesigned it couple of times but nothing seem to work. The report is fairly simple, some of the information is getting displayed from the tables directly, some from arrays and some from variables. I have similar reports that work no matter how many pages there are. This one is being dragging me for a while, but can not figure out what is wrong there. If anyone has any suggestions I'd highly appreciate any help offered. I work with FoxProW 2.6 on NT2000 profeccional.

Thanks!
Igor.
 
Igor,
Are you printing it on the same printer that was the default when the report was last changed? Reports keep this information in the .FRX file, and some printers (drivers) have different printable margins.

Rick
 
If you might suspect that you are experiencing the problem that Rick describes above, you might want to use the following FAQ to check it out and/or to eliminate it.
faq184-581

Good Luck,



JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Rick and Jrbbldr,
Thank you for your replies. I've tried to print it on default printer and tried to switch it to non-default printer, always the same result; preview gets cut off as well. Also, I cleaned tag and tag2 fields with no impact as well. I have not mentioned that, but thought that it could be important; the report has header and detail. Although, the detail part is simple it has many conditional fields that get printed if the needed info is available. If all the fields are available the detail section itself would not fit on one page and lately more and more reports have all the data available that was not the case in the past. I'm thinking maybe I should redesign the report so if it has more data that one page can accomodate it has to somehow jump to another page, but I though FoxPro would handle that automatically. Would you be able to suggest anything here?

Thank you!
Igor.
 

Do your detail fields have "Stretch with overflow" checked in their properties?
 
Stella,

Yes, I've played with that a lot.

Thank you,
Igor.
 

Does a preview mode show you more than 1 page of data (I would guess that probably not)?

What happens if you send it to file instead of the printer?

Did you check whether your "Print when" sections have any condition that hinders spilling on the next page?
 
The preview mode shows only one page.
It creates unreadable file???
I have "Print When" conditions on almost all of the lines in detail section.

Thank you!
 

It creates unreadable file???
It should create regular text file.
Did you use REPORT FORM...TO FILE FileName2 ASCII ?


I have "Print When" conditions on almost all of the lines in detail section.
Yes, but don't you have something with page number in the expression in "Print When" conditions?
 
Rule No. 1 - update your printer driver

Also add a Page Eject at end of report
 
Stella,
ASCII option did not work; I found that it needs to be substituted with 'Generic/Text only' printer driver, but could find how to set the printer to generic. I also do not have page number in my "Print When" conditions. How would I use it?
Cricket,
I will try to add a "Page Eject" option to the report tomorrow; I got caught up with something else I need to work on.
I reilize I ask many silly questions, but the reports is my weak part.
Thank you, I highly appreciate your help!
Igor.
 

ASCII option did not work
Well, it probably did not exist in your version yet. Sorry, my mistake. I don't remember when it first appeared. But REPORT FORM...TO FILE FileName should have created a text file that can be open through any text editor or through FoxPro command MODIFY FILE FileName.

I also do not have page number in my "Print When" conditions.
Well then, this one is out.

How would I use it?
That's another question. You can use _pageno variable for different purposes. Say, I use it sometimes in "Print when" conditions to print a header on the first page somewhat differently from all other pages, or odd pages differently from even. So, technically, you may set something to print on the first page only.

Still, are you sure you tried everything described in FAQ184-581 (JRB-Bldr's link)?
 
Stella, Cricket,

Thank you for you suggestions! I've tried to try them, but must have used them improperly. Is there a way you could give me more details on how to use Page Eject; looks like that will help me but I do not know how to use it, online help does not really help. I've attempted to create the same report in VFP 8 and have exactly the same issue, the data band is to big to fit on one page and no matter what I try it either truncate the report or gives me errors like "the data band is too long". I would think that if FP 2.6 does not create a subsequent page if one page is not sufficient to hold all the data then VFP 8 would have something to automatically manage the pages, but I guess I'm wrong. Maybe I should use system variable that counts the lines on the report, but do not know how to use it; the more time I spend trying to figure out how to use those variable the less I understand :(. If page eject is not exactly what would help could you suggest something else.
I've tried FAQ184-581 post with no change.

THank you!
Igor.
 

Oh!
That's what I wanted to ask you almost from the beginning, and don't know why I didn't. I wanted to ask wheter it is still one round/record of detail band that gets truncated or it happens after a few of detail records already printed.

So, apparently, FP2.6 prints something, then cuts it; and VFP8 just gives you the error "band too long". OK, so does my VFP6.

So the similar reports you mentioned in your original post are not really that similar, right? They put several rounds of detail on one page, not split one detail bands on several pages, right?

I tried a completely empty report with all blank bands, and made a detail band longer than 1 page - got the same message. Not sure if VFP9 does something about it; it has many improvements in the report designer, but not sure about this one.

Well, that's what you can try to do. If you know the absolut maximum length of you detail band, try to fit it on one page, by reducing the font and pushing all the items closer together.

Otherwise, I would think of a way to redesign this report so to split the detail band - either to create grouping and put some of the info in the group band, or to create more than one report, etc.
 
That is correct, the data band has 10 different groups (if I can call them like that). The entire group will appear if the condition relative to that group is true. The data displayed is not the same data for all the records. Sorry I was not clear, my fault.
Now, it all makes sense to me because what you are saying is exactly what I see when run those reports. I never created a single report in FP. Unfortunately, I will not be able to reduce the fonts because I was asked to increase them. Creating multiple reports would not help either because the details are not static and depend on the condition so if the "group" from second page will be the only one to display then the first page would remain empty. Grouping looks like a good idea; I'll try to think about it tomorrow, cause my brain is exhausted by this report :).
I appreciate your help and effort, thanks a bunch!
Igor.
 
Because the "groups" of the data I have in my report depended on the conditions, grouping did not work either; the solution was much simpler. I put the rest of the data that did not fit in the detail band into the summary band and it worked just fine.

THank you all for your suggestions and time.
 

Well, one way ore another, you did split the data into 2 bands. Glad it works now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top