?
Solved

SSRS Column Header Number

Posted on 2013-01-17
3
Medium Priority
?
1,331 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 800 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

801 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