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!

8 .5 x 14 page printing

Status
Not open for further replies.

antmoe3

Programmer
Feb 24, 2006
32
US
I have a report that currently prints on an 8.5 x 14 size paper. This report has a total of 300 rows (100 rows per page or 3 pages). The report currently has 15 columns per page.


This report need to be modified to add 15 more columns totaling 30 columns. However, the final output still needs to be printed on 8.5 x 14. With the proposed report being 30 columns, here is want I need:

Columns 1-15 to print on page 1 with rows 1-100.
Columns 16-30 to print on page 2 with rows 1-100.

Columns 1-15 to print on page 3 with rows 101-200.
Columns 16-30 to print on page 4 with rows 101-200.

Columns 1-15 to print on page 5 with rows 201-300.
Columns 16-30 to print on page 6 with rows 201-300.


Does anyone know how to do this in Crystal Reports version 9 or 10?
 
A simple cheat would be to print 2 copies, and use suppression to limit which rows are printed.

Of course you'd need to adjust the page numbers as well.

A parameter might simplify this, such as a boolean called 1stcolumns.

Then tight click the details and select format section and in the X2 next to suppress place:

if 1stcolumns then
remainder(recordnumber,2) =0
else
remainder(recordnumber,2) <>0

The create a formula for the page numbers such as:

Report Header formula:

whileprintingrecords;
numbervar pg;
if 1stcolumns then
pg:= -1
else
pg:= 0

Then for display in the page footer use:
whileprintingrecords;
numbervar pg:=pg+2;
Pg

Another solution might be to use subreports, or to modify the data to be in the right order, but I won't touch on those until you post basic technical information:

Crystal version
Database/connectivity used

-k
 
How does this differ from your thread767-1236213? Please do not start new threads on the same topic, and please do respond to questions that are asked of you--they are being asked in order to better help you. If you don't respond, everyone's time is wasted. I'm mentioning this because I've noticed several times people have helped you or asked questions in an attempt to help with no response from you.

-LB
 
Sorry lbass. And thanks.
Ok--
The page header basic needs to continue from page 1 to page 2 on and 8.5 x 14. There is no formulas in the detail. Only the group header and group footer.

1) How would I handle this?

2) Is there a way to customize the page size or cut the report up into vertical sections like in MsExcel?

3)Is there for me to send you a sample of the report?

 
Here are my questions from your previous post:

When you refer to column, do you just mean fields? Or have you formatted one or more fields to display in multiple columns? Or are you using a crosstab? Please also provide a sample of your data.

I also don't think you responded to SV's suggestion or request.

-LB
 
Thanks for wasting my time, antmoe3.

Stick with one thread, and post meaningful technical information up front, obviously you don't care that you waste people's time with incomplete information, or abandon threads, ignoring questions in them, but I do.

-k
 
Page 2 needs to be a continuation of page 1.
Then page 4 needs to be a continuation of page 3.
Then page 6 needs to be a continuation of page 5.

SV - Relating to the group footer, where would I place the formula?

LBass - When I say column, I mean a 30 formulas created. I'm not using cross tabs.

Below is an example using 10 columns total.

Sample report (page 1) - page size 8.5 x 14:

Name Sales Dept YTD STD PTD
===== ===== ==== === === ===
Larry 45 1 55 66 77
Joe 34 2 56 44 44
Ed 34 3 43 23 11
Mike 44 4 22 21 47


Sample report (page 2) - page size 8.5 x 14 (Con't from page 1):

Name TY LY 2YA 3YA 5YA
===== ===== ==== === === ====
Larry 75 11 59 76 57
Joe 34 12 59 54 54
Ed 37 43 49 33 71
Mike 49 46 29 31 47


NOTE: The first column (NAME) is the same on page 1 and 2. The data (or forumulas which sums the value from the database) in 2-10 column will change from page 1 to 2. Then the data in the first column (NAME) will be the same on page 3 and 4. The data in 2-10 column will change from page 3 to 4.

The data in columns 2-10 change on each page. Does this help explain? If not, maybe I can email a current and proposed layout. Let me know.
 
It should have been that you have 2 sets of details, one for the firwst set of columns, the second containing the second set, then use suppression, the theory is sound, but now you'd do so using groups, which is a tad more complicated, but doable.

LB certainly grasps the theory, fairly simple cheat, but grouping will complicate it a tad, but you can use groupnumbers to accomplish it as well.

-k
 
synapsevampire & lbass

I did mean to make you feel I was wasting your time. I just did know how to explain the change I need in words. Very sorry. You and all the others who reply to post provide a GREAT service to the IT community. Thanks so much. I'll do better next time.
 
SV you stated "LB certainly grasps the theory, fairly simple cheat, but grouping will complicate it a tad, but you can use groupnumbers".

I'm not familar with groupnumbers.
Can you walk me through this?
Is there a way I can send a sample of the print out in the forum?
 
What determines the clusters of names? Is it just the number that will fit per page?

-LB
 
The report column NAME is all the data from the field first_name in a table called address.

The main problem is getting the additional new columns to con't on page 2 for the same values in column NAME and have both on 8.5 x 14 paper.
 
You didn't really answer my question. I think you need to use a subreport for the second page of each set of names. I was asking whether the names that appear on page 1 and 2 are different in some way from those that appear on page 3 and 4 so that you could group by that condition, or whether the names only belong together because they fit on one page. Let's assume it is because the fit on one page.

Then create a formula:
//{@grp}:
whilereadingrecords;
numbervar cnt := cnt + 1;
numbervar i := 1;
numbervar grp;

for i := 1 to 1000 do(
if cnt in 1 to 45 then
grp := 1 else
if cnt in i to i+45 then
grp := int(cnt/45)+1);
grp

In the formula, replace 1000 with maximum number of records you expect. Replace 45 with the number of names that fit on one page.

Sort your records the way you would like and then insert a group on {@grp}. Then go to the section expert and suppress the group header and with the group footer highlighted, check "new page before" and for "new page after" add a condition in the x+2 formula area:

not onlastrecord

Place your first set of fields in the detail section of the main report. Then insert a subreport and add the remaining fields to the detail section there, suppressing all other sections. Be sure to add the same sort field as you used in the main report.

Also create the same formula {@grp} in the subreport (copy it from the main report). Place the subreport in the group footer for {@grp} and then link the subreport to the main report on {@grp}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top