Solved

SSRS Column Header Number

Posted on 2013-01-17
3
1,188 Views
Last Modified: 2013-01-28
I have a report from ssrs and now I want to place the number on top of the column name.Is it possible w/o doing hardcoding as I have 200 columns.

Lets say--I have a report that displays name,lastname,class and age.So on top of the field name I want to autogenerate this number without typing in like 1 ,2, 3, 4.Thanks in advaance

 1                2                       3                         4    
name     lastname            class                 age
0
Comment
Question by:Josh2442
3 Comments
 
LVL 12

Expert Comment

by:Saurabh Bhadauria
ID: 38792380
0
 

Author Comment

by:Josh2442
ID: 38793611
@Saurv I already checked that link,before posting this forum.But That only implies to the rows not the columns.

Thanks
0
 
LVL 6

Accepted Solution

by:
liija earned 200 total points
ID: 38800213
Hi,

Add a small custom code on the report:

Public columnNumber As Integer = 0
Public Function ColNumber(ByVal colNo) AS Integer
Dim retColNo As Integer
columnNumber =columnNumber + colNo
retColNo = columnNumber
return retColNo
End Function

Then call the code from every column header like
=Code.ColNumber(1)

It simply just adds 1 to the variable in the code on each column.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL replication over high latency link 10 60
SSIS On fail action 5 38
TSQL XML Namespaces 7 24
SQL USE DATABASE VARIABLE 5 30
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question