I have a report I'm doing and I'm using the report writer in FoxPro 9. My report has several detail bands but no grouping. It's working great except I'm getting a blank line after each detail line. Please let me know what I'm doing wrong.
Could it be that the detail band is simply too high? If there is white space at either the top or bottom of the band, try adjusting it to remove the surplus space.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Thanks for getting back to me so quick Mike. I did check to make sure I wasn't leaving any space for the report to interpret as a blank line. But that made no difference.
You only need 8 detail bands, if you have 8 workareas contributing to the report. You simply take the grey bar captioned "Detail 1", move it down and put all your report control in one detail band, you don't need a band per line of controls.
I just did a report with two bands driven by a single report cursor, not using the target alias property of the detail bands and that works too. I don't get empty lines.
I see that you have several controls which have expressions in quotes. Instead of using a report control with a string value you can and should for better recognition use report labels. Those are just captions.
The other controls, of course, will show whatever data is in the column names their expression is set to. If your empty lines are in Detail bands 2,4,6, and 8 and you only get the captions printed, you simply have empty data.
Otherwise, even if all report controls of the detail bands have "remove line if blank" set, a detail band can be set to have constant height and that might be set, because it also will look awkward if a line of captions os followed by the next line of captions right away. So my guess is the bands are set to constant height to avoid that. Because it'd be hardly doable to also remove the captions on the basis of the values being empty. Every caption would not only be set to a print condition checking its own column, but it also needs to check all columns of the next detail line. I think at least you'd only want to remove a caption line, when the next line also is completely empty. And then of course also the "remove line, if blank" condition. All that is hardly maintainable.
I see that you have too many columns to solve it by using landscape instead of portrait mode, but before we dive too much into layout suggestions, why don't you start off in making this one detail band, and let that one band have no check in the properties->tab "General"->checkbox "Constant band height".
The "remove line if blank" is not meaning remove detail band, if blank. It really is looking for a set of report controls on the same height and if they are all blank removes that much height from the printing. So you don't need more bands for fine control about what lines mean.
Olaf, I knew you and Mike would be the first to respond. I was hoping so anyway. I'm doing exactly what you were talking about. I have a cursor with 4 different but related information. I'm using to triggers for the report. The first: "DGroup" marks the records which are in a common group. The second: "DHeader" marks the first record of each group to determine if the header of each group will be printed. Everything is working perfectly, I'm just getting a blank line after each record of information on each group.
Construct a small cursor with some testdata and upload that together with your .frx/.frt files so we can test and see why you have this unwanted behavior.
Regards,
Koen
If I understand you correctly, then you programmed what report groups should do for you. Instead of controlling whether captions should be printed via DGroup or DHeader fields, use such fields to let the report group data by them.
Just to make it clear: Report Groups are not comparing to SQL "Group By", you stay with the single records, you just have the group header section to once print captions (for example) and the footer section to print a total/summary line (for example).
Besides that, you didn't tell about whether constant band width was checked or not. I agree with Koen, getting hands on this would be good, as it's hard to guide someone. Helping about code you can post always is easier than helping with reports, as so many settings are "hidden" in the property dialogs.
Olaf; thank you so much for your input, you to Mike. You guys are life savers for me so often. As it turns out, Olaf, you were right. I was missing "Don't Print If Blank" on one of my controls. I changed that and it worked great.
OK, fine. That's the point with so many controls, it's harder to maintain. You can at least CTRL+A and for example set all "Remove line if blank" to .T., but the print conditions will vary.
It doesn't even get simpler when using an FRX as a table, as some of the essential things are in Memos and therefore also only show up record by record.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.