Solved

Custom code not working in page header upon PDF export

Posted on 2008-06-23
1
304 Views
Last Modified: 2012-08-13
Due to the lack of data binding support in page headers on SQL Server Reports I found this code online that allows you to grab info from fields in the details section of the report and display them in the header.  The code is as follows:

Function GetItemValue(ByVal Items As ReportItems, ByVal item As String) As String
    return Items(item).Value
End Function

This works great when viewing in HTML but when I export this report to any format the code gets ignored and the fields in my page header are blank.  Is there any way around this?
0
Comment
Question by:SYNERGYTECH
[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
1 Comment
 
LVL 9

Accepted Solution

by:
Tone' Shelby earned 125 total points
ID: 21851824
Yes if you try to add a field from a data set or custom code to the page header, SSRS rejects the action or just doesn't show for the later.

Workaround: Place the field value in an item in the body of the report & then you can hide it with the visibility property but you are only placing it there for reference, then refer to that report item in the header (for example, =ReportItem!txtFie ldValue.Value).


hope it helps ...
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

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

Suggested Solutions

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.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

751 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