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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP9 Report Problems with Multi-Columns, Memo Field

Status
Not open for further replies.

CBellucci

Programmer
Apr 20, 2007
38
US
I have not done a lot of multi-column reports that aren't labels, so I could use a bit of help.

Have a report that is 6 columns. Columnar data is printing correctly. On this report I have Group Headers and Footers that go completely across the page. The Header is one line and could possibly be two. Second line is a Memo field in the table being printed. I have the field on a line all by itself, Stretch to Fit and Fixed to the Top of the Band, Print When: !EMPTY(Field) and Remove Line if Blank. I have two problems:

1) The Memo Field is not stretching, only truncating
2) If the Memo Field is EMPTY, a blank link is showing

I have tested and the Memo Field does test as true if there is nothing in the Field. I have tried Fix to the Bottom of the Band, and that ends in the same result. As I said, this report is multiple columns with the Header and Footer stretching across the page. What am I missing?
 
I suspect when you say headers and footers are stretched across the page that means you never have an empty line, really. Hm, what do you actually mean with "across the page" Width being page width or height being (each half?) page height?

In short, a screenshot of the design could help.

A stretch to fit can fail if things down or upward are not set to float. Even when it's just graphical lines. You can step on your own foot with such stretch stopping elements.

If I were you Id copy the report and remove element by element in this copy to see what hinders the stretch. It's easiest to experiment on a copy instead of thinking theoretically.

Bye, Olaf.


Olaf Doschke Software Engineering
 
Screen_vydmzp.jpg


There are 6 columns across the page. The Group Headers and Footers are printed across more than one column. The Memo Field is the DComment in italics, second line in the 2nd Group Header. The DComment line is set to Float and Stretch (it is doing neither).
 
OK, now I see, the report itself is designed to tile the paper into 6 columns. Therefore the basis design area is narrow. Well, just don't design your report controls wider than this column with or you only get truncation.

Or don't design the report to have 6 columns in the first place.

Bye, Olaf.

Olaf Doschke Software Engineering
 
If I don't have columns, how do I present the data across the page? Any suggestions? Each record has one piece of data.
 
Create a cursor on the fly specifically for this report. Each record in the cursor will contain six fields. These correspond to the six records which you want to show across the page. You will need to know in advance how many rows appear on each page of the report. Say that number is 20. Then the first record of the cursor will contain data from record 1, 21, 41, etc. from the original table. And so on.

Then create your report without columns, and with the details band containing all six field from the cursor.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Your second sentence was "Have a report that is 6 columns"

Remove that. In the report properties page layout tab, reduce the column number to 1 to be able to print on the whole page width. Or shrink your controls, if you print on label paper with 6 columns of labels.

Bye, Olaf.



Olaf Doschke Software Engineering
 
Yeah, got my report split up into columns in the output table. Only one line/one column per data line now.

Still having problems with the report leaving space for the Memo field even if it's empty.
 
You're still missunderstanding, you have a page layout with multiple columns, but the layout of your controls is not for a multi-column report.
When you have a multi-column report page layout you only design one column and the report prints 6 bands side by side, it's mostly valid for label sheet paper.
And your reporter control layout shouts out loud, that it's not for 6 columns. Just the DComment memo control goes over the full page width.
The designer still shows you the full page width, and it's also printed on, but by printing just the 1/6 width white part of the design area 6times side by side.

Bye, Olaf.

Olaf Doschke Software Engineering
 
The comment right about yours, Olaf? I said that after I got all the columns split up in the data, but not on the report. (One column for the report.) I've got it, it's all working. One of the shading boxes got hidden in the Report Designer. I had to go looking for it in the FRX.

A future tip: If you've set up a multi-column report and cut it down to one column, make sure your Column Print Order is (re)set to Top to Bottom.

Thanks for your help!
 
CBelluci said:
got my report split up into columns in the output table. Only one line/one column per data line now.
CBelluci said:
I got all the columns split up in the data, but not on the report.

I still don't know what you want to say, but since everything is working now, I don't need to. It's OK.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Here's a screen shot of my report designer:
SCREEN_lf62nk.jpg


The last problem I had was that the detail gray-bar was always printing. Turns out one of my shaded boxes had slipped behind a Group Footer indicator. Lots of lessons learned with this report! (In fact, I have another I need to de-columnize.)

Again, thanks for the help.
 
Ah, I see.

VFP, it's full of quirks, too.

Some things, that are well thought of standalone, but weren't thought of combined.

And that's not exactly what you had, but would be something I would not know how it behaves:
Have a line object going from page header to page footer, then add columns. What happens with the line? I actually would need to try. The header/footer stays at full page width, detail band shrinks down to column width, is the line repeated per column, or not? I think it would be stored belonging to only one band, where the top-left point of it is. It can be useful to have elements spanning multiple bands, but you also have to figure out some consequences. Chop a line into single segments and you can easily have gaps where you'd like a continuous line...

The reporting engine always will be something of my least interest, though I know others surely loved VFP for it and used it extensively. And then there was/is the camp of crystal report users. Or XFRX, of course, but that mainly only added output format capabilities. I was often exporting to Word or Excel by demand of users adding more to documents before printing, or mailing. Currently I mostly print receipts, that has its own rules of OPOS macros.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Mr/Mrs Belucci,
If you could produce a report, even with fancy data, in e.g. MsWord and upload that document we can see how to create a report after that design. And if you can also upload the layout of your table = motor of your report it would facilitate the test.
Also indicate the version of VFP you are using and if you use the FoxyPreviewer.app
Stay healthy,
Koen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top