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

Multiple Columns (Probably not exactly what you're expecting :-)

Status
Not open for further replies.

jv6886

Programmer
Dec 31, 2002
46
US
I know the subject of multiple columns has been discussed many times in this forum. However, my question is somewhat different than those I have found in searching through the discussions.

I succeeded in formatting my data into 2 columns in my subreport, but it takes up the entire page. If I don't have enough data to fill the entire side, then it won't spill over into the next column.

I don't want to use an entire page for the section, but just a small section (spacing not fixed) out of the middle of the page for the subreport. No matter how much data is in the section, the items should be divided equally between the two sides (unless, of course, there is an odd number).


Top of Page
------------------------------------
Code:
Details a
. 
.
.


Details b SubReport

Data item 1         Data item 6
Data item 2         Data item 7
Data item 3         Data item 8
Data item 4         Data item 9
Data item 5


Details c
.
.
.
-------------------------------------
Bottom of page

Any ideas?

Thanks,
wcprog
 
It sounds like you're aware that you can turn off can grow in the subreport and size it to the height you want.

Do you want a subreport which can grow, but only to a certain height?

I think that the only way you might get close to this is to prefire a shrunken version of the same subreport in a previous section, and then pass a shared variable along which you might use to suppress subsequent sections each containing a subreport, which allow for different formatting objectives.

It's not clear how you intend to handle blank subreports, or those that might reach several pages in length, but this theory should allow for multiple formatting conerns.

-k
 
Thank you for your suggestions.

This is a closer version of what I am trying to do... a questionaire of sorts. The number of questions can reasonably range from 3 to 50. The actual question field "can grow" to fit the contents of the question.

So far, I have been able to do this in a single column, or with multiple columns a page long or a fixed height (like you suggested). For reasons of flexibility, a fixed height (be it a page or a pre-set height) is not practical. It will most likely always fit on one page, but most often, only a portion of the page.

I guess, in my case, the number of items is not so important with regard to equal spacing on both side as is the heights of the questions. In my entry portion of this (done in VB6), I handle this by filling the labels, calculating the total height, and dividing by two (roughly) to find the "middle" question. I'm not sure if anything similar is possible in Crystal Reports.

Blank subreports will be suppressed.


Top of Page
------------------------------------
Code:
Details a
. 
.
.


Details b SubReport

                                | Y | N |                                | Y | N |
----------------------------------------------------------------------------------
 1. Do you like chocolate?      |   |   | 4. Do you drink high-caffeine  |   |   |
-----------------------------------------    drinks like Mt. Dew?        |   |   |
 2. Do you like broccoli (though|   |   |-----------------------------------------
    why anybody would like that |   |   | 5. Do you like Doritos?        |   |   |
    is beyond me :-)?           |   |   |-----------------------------------------
----------------------------------------- 6. Do you want to be a         |   |   |
 3. Do you like to eat things   |   |   |    millionaire?                |   |   |
    like carmel apples?         |   |   |-----------------------------------------
-----------------------------------------



Details c
.
.
.
-------------------------------------


Thanks for your help!
wcprog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top