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

Print Multiple Detail Lines Horizontally

Status
Not open for further replies.

htgl

Programmer
Aug 26, 2003
4
US
I need to print as many multiple detail lines in one line as possible horizontally
instead of vertically. For example, I would like to break the line when an
employee has more than 8 codes and amounts. An employee can have
one code and one amount or up to 20 codes and 20 amounts. My report
will look like as follows for a detail line:

Dept# Emp#1 EmpName1
Code1 Amt$1 Code2 Amt$2 Code3 Amt$3 ...... Code8 Amt$8
Code9 Amt$9 Code10 Amt$10

Dept# Emp#2 EmpName2
Code1 Amt$1 Code2 Amt$2 Code3 Amt$3 ...... Code8 Amt$8
Code9 Amt$9 Code10 Amt$10 ...... Code16 Amt$16
Code17 Amt$17
I am new at using Crystal Reports, how do I create the report using the arrarys and have the report aligned perfectly? Thanks a lot! -htgl
 
How about creating a detail line for each set of fields, and then conditionally suppressing them if the amounts are zero? In design mode, right click on the detail section (grey area to the left) and select 'insert section below' - this will split your Detail section into Detail a and Detail b. Repeat this for as many amounts as you need, then apply conditional suppression to each detail section.
 
Sorry, I did not explain it very clearly. Each code and amount is on one record, and an employee can have various records of code and amount. I need to print multiple detail records in one line and break it into new line when it has more than 8 codes and amounts. Thanks! -htgl

 
Hi,

You can achieve this by formatting the detail section with multiple columns.

Right click on Detail section and choose 'Format Section'
Tick checkbox 'Format with Multiple columns'. You will get a new tab 'layout'

Select the column width(5/10 cms) and space between columns, depending on how many sets of data you want on each line and choose Printing Direction as 'Across and then Down'.

Please note to group by Dept and then by Emp before doing this. You may not need to check the box 'Format group with multiple columns, since it seems that you want to format only the detail section

This should give the desired results. Let me know if there are any problems.

Alamelu
 
My report actually will have 3 groups, it is grouped by dept, org, and emp#. I will have Detail A section with employee personal information and Detail B section with deduction code and amount repeated when they are existed. I had already tried the "Format Section" before, and it wrapped around emp#, Detail A section(repeated) and deduction code and amount. The "Format Section" will apply to all the details sections, I only need the multiple colums on Detail B section and not affecting the grouping of employee and its personal information. Can someone kindly show me how to use the arrays to print my report? Thanks! -htgl
 
After I moved the Detail A section to the Employee Group section and changed the "Format Section" on Detail line not to free form placement. The report appears to be working the way I would like to see. Thanks to all who replied to this question. -htgl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top