×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

compression the columns

compression the columns

compression the columns

(OP)
Hi all
I have a two-column report - the first column for boys and the second column for girls
How can any column be pressed to reach the required number of students on the same page?
For example, the number of boys is 25 and the number of girls is 15
What is required is how the column of the boys should be Automatically presses by the fact that all the boys are in the same column and page as the girls? Is this feature available in Fox Pro?

Best Regards
Ahmed

RE: compression the columns

I don't understand what you mean by "Presses". Are you trying to have the font size of each column be different in the report, dynamically? So boys font size is 8 and girls font size is 14 so the columns are the same height when printed side-by-side?

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: compression the columns

I don't understand the question either. Could you try to explain it more clearly.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: compression the columns

From what I get you could either define a two column table with enough records to store the longer list of either boys or girls, foresee all columns twice and fill in line after line with empty values for the shorter list. That's not the usual way to join, as boys and girls are not directly having a matching condition, so you may do a SELECT girls,*, boys.* FROM pupils girls LEFT JOIN pupils boys ON .T. WHERE boys.class='X' AND girls.class='X' AND boys.gender='M' AND girls.gender='F' (or however the gender is stored in your data).

Otherwise, VFP reports support columns, so you could create report groups for boys and girls (tell the report groups are defined by different pupil.gender) and print them in separate report columns, by letting a group start in a new column. Then the report data will be boys followed by girls records instead of joining them and the report group definition will sort them in their column.

Bye, Olaf.


Olaf Doschke Software Engineering
https://www.doschke.name

RE: compression the columns

(OP)
What I mean is whether it is possible to have one group on one page, no matter how many rows of data.

RE: compression the columns

Are you saying you simply want to start a new group on a new page?

If it's as simple as that, just go to Report Properties / Data Grouping. Select the group in question, then select "Group starts on new page."

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: compression the columns

(OP)
Excuse me
I want to have a whole group on one page and not another page.

RE: compression the columns

You want to have each group on one page, right? Tha's what happens if you specify "Group starts on new page".

I don't know what else you want, if you want any group size to remain on a single page this is not what VFP can do, you can't have a list of 200 rows on one page by automatically adapting font size, you can only define groups starting on separate pages and when ensuring the report layout and font size is small enough the largest group you have fits on one page you have any group on one page.

Bye. Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: compression the columns

Ahmed, the solution I suggested will do what you want: "to have a whole group on one page and not another page". But, of course, if the group does not fit on the page (because there are more rows of data than there are physical lines on the page), there's nothing you can do about that.

How you handle that situation is really a business decision, not a programming one. You've got to decide whether you want to allow the group to go over to the next page, or to present the information in some other form, or what.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: compression the columns

(OP)
Yes, all that has been said is true and I know it well
Does this apply to the group if it is one column within several columns in the report?

RE: compression the columns

If you define columns in a report, you automatically have the new option to let a group start in a new column instead aside of new page.

It's still unclear whether you have groups, which are just too large to fit in one column or page or whatever you want as maximum group size, you can't have VFP compress data into a single column or page, you have to look out for the largest group you have or you think is possible and layout your report with sufficiently small fonts. Anything larger will flow to the next column/page and then the next group would cause another switch to the next column or page, that's just normal, isn't it? You don't force fit a list of 500 names onto a single page, that group then has 5 or more pages.

If I assume pupils class lists, there will be a maximum fitting into a classroom, so you have your upper limit, it's not that hard to define report lines small enough to fit say 40 names in one column and so have each class list in separate columns.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: compression the columns

(OP)
and how can i do "automatically adapting font size" in the group ?
I apologize for the inconvenience and lack of clarification required enough

RE: compression the columns

(OP)
I thank you dear Olaf and Mike
I have another question: if you have students in the first grade (boys 40 and 20 for example), i have set the report to 40 students per group
Is it possible to automatically embed the font size if the number is less than 40 students per group so that the font size is bigger and clearer?

RE: compression the columns

Just notice the main thing you have under control at runtime is what data is printed, the expression. Does the report designer allow you to specify a field for the font size? No, so it's not dynamic. Can you size the detail band with an expression? no.

VFPX has introduced some tags similar to HTML to influence looks at runtime, but you'd still have a report control with a certain height, and so you'd end up with either larger but overlapping girls names or gaps between lines in boys names. That HTML styling has no influence on detail band height.

What you want can easily be done in Word, there font and line height also correspond with each other, you forget this is not the case in reports, the line spacing is mainly given by the detail band height. You can always open an FRX as table and change some things like font sizes and band heights before running the report, but that will be the value for the whole report run, even if you could act on the FRX while it runs, the report engine reads in the design at start and works on that.

With Word automation, it's simply setting the font size for a column. You can do anything dynamically this isn't driven by data row by row as a report, you're in full control to create a paragraph followed by a table with 3 columns, a graph, an embedded excel sheet and what else word offers.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: compression the columns

(OP)
Thank you very much Olaf .. The idea arrived.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close