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

Need help with numbering in Crystal 2

Status
Not open for further replies.

sql99

Programmer
Nov 12, 2003
83
0
0
US
Hello,

I have a report in Crystal 9 that has a field which pulls question numbers from the database. For example the database would have the following information in the table called xyz.

question # question archived
1 What is your name? Y
2 How old are you? Y
3 What is your address? Y
4 What is your phone number? N
5 When is your birthdate? Y
6 Where do you you work? N
7 What is your work address? N


My report pulls the question # field and the question field. However, the question # is appearing as 4, 6, 7 because these questions are not archived. It's confusing to the user because these numbers don't start out with 1, 2, 3. Is there a function or option in crystal to use so that these question numbers always start at 1 and go sequentially? I was thinking of suppressing the actual question # field and adding something else for numbering but can't find anything in the tool that does that. Does anyone have any suggestions?

Thanks,
sql99

 
If the question number field is a number field you can go to;

Report>Record Sort Expert and select the {table.questionNumber} field to sort on. It also sounds like you are sorting on {table.archived}.

If the question number field is text you can create a formula that looks something like this;
Code:
toNumber({table.questionNumber});

Then using this formula to sort on.
 
If you don't have any groups, add the "Special Field" recordnumber to your report. If you have a group, use the running total expert, and select count of a recurring table.field, evaluate for each record, reset on change of group.

This assumes that you have record selection criteria that are eliminating the archived records. If you are only suppressing the archived records, use the formula in the evaluation section of the running total to add:

{table.archived} = "N"

-LB
 
Thanks for your help, I used the special field "record number" and it worked.

Thanks,
sql99
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top