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

How to display more then one state in a resume

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
Any one pl. help me on this.

how to display the list of states for each emp.?

Creating resume in report. In detail section I designed a one page resume format, which contains name, mobility, school,photo...etc.

parameter : EmpId

tables :
1. EmpInfo (which contains all the info about emp)
2. Mobility (which contains Empid and State)

In Mobility table - datas like,
111 - NY
111 - OH
222 - IL
333 - IO
444 - IL
444 - OH
444 - MI
444 - IL
555 - IL
555 - OH
If the end user enter empid as 555, then the states IL, OH have to print on that page.

report output:
name : xxx
empid : 555
mobility : IL, OH
...
Pl. help me on writing a formula for the mobilty column.
I'm useing - CR 8.5, CE 8.5, DB2, Sqlserver and win'xp

If you need more detial pl. let me know.

Thanks,
MK










 
1.) Link the two tables on the common EmpID field.

2.) Group the records on the EmpID field

3.) Insert this formula in the GROUP HEADER.

Name : {@ResetStateList}
Formula : WhilePrintingRecords;
Global stringVar StateList := "";

4.) Insert this formula in the DETAIL.
Name : {@AddStateList}
Formula : WhilePrintingRecords;
Global stringVar StateList := StateList + {Mobility.STATE} + ", ";

5.) Insert this formula in the GROUP FOOTER.

Name : {@DisplayStateList}
Formula : WhilePrintingRecords;
Global stringVar StateList := Left (StateList,(Length (StateList)-2))

6.) Display the "resume" data in the footer as shown below.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

GROUP HEADER (444)

EmpID NAME STATE StateList
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETAIL 444 June Wills IL IL,
DETAIL 444 June Wills MI IL, MI,
DETAIL 444 June Wills OH IL, MI, OH,
DETAIL 444 June Wills IL IL, MI, OH, IL,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GROUP FOOTER (444)
NAME : June Wills
ID : 444
MOBILITY : IL, MI, OH, IL

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

GROUP HEADER (555)

EmpID NAME STATE StateList
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETAIL 555 Dave Rogers OH OH,
DETAIL 555 Dave Rogers IL OH, IL,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GROUP FOOTER (555)
NAME : Dave Rogers
ID : 555
MOBILITY : OH, IL

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

7.) Suppress the DETAIL and GROUP HEADER sections as required.

Hopw it helps...
 
Thanks for your replay MJRBIM.
I got an error in {@DisplayStateList} says, "string length is less than 0 or not an integer".
pl. let me know if you have solution.
Thanks
MK
 
You must have employees that do not have any mobility records associated with them, so the state list is not populating (and therefore has no "length").

For testing purposes add a select command on a certain employee who you know has mobility data.
 
I tested these table in saparate report. it wroks good.Thanks
but the last state display with one char.
(ie) IL,NY,W (because of -2 in the group footer formula?)
any way I'll try this in my main report and let you know.
Thanks
MK
 
i'm sorry for the previous post. its working good. no prob. with display.
i'll let you know if i get into any truble.
Thanks.
MK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top