How to display the row number on the report?

Mohammad Rehman shared this question 1 year ago
Answered

Hello Experts,


Please point me to the existing function or explained earlier, if already exist.

I want to display the row number/S. No on the report.

i.e

Here is my report:

Name

Joe

Alllen

Mary

Peter


I want to display like this.

S.No Name

1 Joe

2 Alllen

3 Mary

4 Peter


Note: we are using 7.1 version which has lots of limitation and features/functions disabled by Vendor BMC.

TIA

Mohammad

Comments (8)

photo
2

Hi Mohammad,


Unfortunately, I am unsure of what the exact limitations of BMC's system are, are you able to create freehand-SQL reports?


If you are okay with these appearing in separate columns, you can create an additional column with the "ascending rank" advanced function based on the field you are sorting the report by.


Is your goal to have these concatenated as part of the same string, or simply to have a row number column?


Regards,

Nathan

photo
1

Thanks Nathan, Objective is to just display the row number separate column.

photo
1

Nathan, you are the best! I had doubt but your suggested solution looks like works in initial testing using ascending rank option.

Regards

Mohammad

photo
2

Ho Mohammad,


Glad I could help! Let me know if you run into problems.


Regards,

Nathan

photo
1

Only one issue though, if i use string column like name or date column then i have no access to this function. only works when i add numeric column. Is it possible to apply the same function on date and time column or text column?

photo
2

Hi Mohammad,


Unfortunately anything past this will need to be done by creating a Freehand SQL report, is this an option for you?


Regards,

Nathan

photo
1

Free SQL does not work due to BMC. Thanks for your time and help as always.

Regards

Mohammad

photo
1

Hi Mohammad,


My colleague recently made me aware of another trick you can do here:


  1. create a calculated field that simply returns the value: 1
  2. apply an accumulative total advanced function to this field!


Regards,

Nathan

photo