Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Custom code not working in page header upon PDF export

Posted on 2008-06-23
1
Medium Priority
?
308 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 500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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

730 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