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

Adding columns to a report 1

Status
Not open for further replies.

spuppett

Programmer
Jan 25, 2003
48
0
0
US
This is probably a rediculas question, but how can I modify an existing report to contain an additional column? I'm using VFP 6.0. My solution was to scrap my report and make a new one with the wizard, but there has got to be a way to do later.

Thanks.
 
You asked: This is probably a rediculas question, but how can I modify an existing report to contain an additional column?

use the wizzard again and add the column or enter the command MODIFY REPORT yourreportname. You can add new fields and labels. Fields go in detail band.

Regards,

Rob
 

Spuppett,

Once you've finished creating a report with the wizard, you can't go back into the wizard for the same report. To avoid having to scrap the report and start again, you should open it in the report designer. To do so, go to the command window and type:

MODIFY REPORT MyReport

where MyReport is the name of the report file.

Once you are in the report designer, go to the Report menu, choose Insert Control, then Field. In the resulting dialogue, type the name of the field in the Expression box.

After clicking OK, you will see the new field in the report, but not necessarily where you want it to be. Just drag it with the mouse, and drop it in the Details section (above the grey bar saying "Detail"), and to the right of the other fields there. You might have to move the other fields to the left to make room for it.

The above is only a quick guide. It will be worth your while spending some time getting to know the report designer, because you can do much more with it than you can with the wizard.

Note also that the above instructions refer to the more recent versions of VFP. In 6.0, the menu names might be different, but the same principles apply.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I'm looking to add a column, not a field. What I glean from the comments above is that I would have to duplicate the layout.

Here is what I'm looking for:

-------- --------
-------- --------
-------- --------

 
OK, but to add a column on a report you typically add the field you want in that column to the detail band.

Regards,
Jim
 
Right, but in the wizard if you set your report up as a 2 column report, the details section is only 1/2 the width of the design window. What I would like to do is the same thing, without the wizard.
 

spuppett,

Back up your report, open it with MODIFY REPORT YourReportName, and you will see that you have only one column in it, the size of 1/2 of the design window, if that's what you designed with the wizard.

Now you can play around with it.

Use menu File->Page Setup to adjust the number of columns, the size of them and the interval between them.

Move your fields around with the mouse or Arrow keys. Change their size with the mouse or Shift-Arrow keys.

Call View->Report Controls toolbar, View->Layout toolbar, and View->Color Palette toolbar from the menu, and see, what you can do with them.

Very soon, you won't want to use the wizard, because you would be able to do much better things without.


 

Or, if you designed only one column with the wizard, still open the report with MODIFY REPORT and use menu File->Page Setup to add columns and format them.
Then, play with the design as was described above.
 
Stella, that is exactly what I was looking for. Thank you so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top