Showing posts with label therefore. Show all posts
Showing posts with label therefore. Show all posts

Friday, March 23, 2012

Non-static data in head of report

Hi everybody,
I'm quite new to reporting services, respectively I were not able zu work
with them for a while, therefore I forget most of the stuff I knew. Here's
my problem:
We have lots of reports made in Microsoft Access, that we now have to
convert for the use in the reporting services (2000). Basically in all
Access reports we use dynamic data in the page header, like a name from an
employee which comes from the database. This seems to be impossible in the
reporting services. We get an error message when compiling the report.
Does anyone know if this possible or a good workaround? I cannot believe
that this isn't possible, it's essential.
Thx in advance
MichaelWe use something like this:
In the hidden text of the body put this
=Code.GetBaseName( First(Fields!BaseState.Value, "DataSet1"))
In the footer/header text use this.
=Code.GetBaseName(Nothing)
Add this to the code pane
' Functions to provide data fields for report header
' Input:
' a data value
' Output:
' data value for report header
' Purpose:
' Provide data values for the report header
' Save data value in a static local variable
' for the last page header, the input variable will be empty
' so return the saved value
' Note:
' The ReportItems passed in must be at the top of the Body of the report
' so they will be accessible on the first page of the report
' The functions are Shared so theStatic variable will work
' The Static variable will retain its value while the report viewer is open,
' even if the parameter values are modified and the report re-run
' so always save the value except when the current value is not available
' All this is necessary because Reporting Services does not allow data
fields in the page header
' and on a Purchase Order with many details, the second page has no detail
fields
' so the hidden data fields cannot not be put in the detail area
public shared function GetBaseName (byval InputValue as string) as string
static SavedValue as string
if InputValue <> "" then
SavedValue = InputValue
return InputValue
else
return SavedValue
end if
end function
Steve MunLeeuw
"Michael Bender" <technik@.salescom.de> wrote in message
news:ecmd6i$c5b$01$1@.news.t-online.com...
> Hi everybody,
> I'm quite new to reporting services, respectively I were not able zu work
> with them for a while, therefore I forget most of the stuff I knew. Here's
> my problem:
> We have lots of reports made in Microsoft Access, that we now have to
> convert for the use in the reporting services (2000). Basically in all
> Access reports we use dynamic data in the page header, like a name from an
> employee which comes from the database. This seems to be impossible in the
> reporting services. We get an error message when compiling the report.
> Does anyone know if this possible or a good workaround? I cannot believe
> that this isn't possible, it's essential.
> Thx in advance
> Michael
>|||Thanks very much, Steve.
"Steve MunLeeuw" <smunson@.clearwire.net> schrieb im Newsbeitrag
news:eDqZMIHyGHA.1936@.TK2MSFTNGP06.phx.gbl...
> We use something like this:
> In the hidden text of the body put this
> =Code.GetBaseName( First(Fields!BaseState.Value, "DataSet1"))
> In the footer/header text use this.
> =Code.GetBaseName(Nothing)
> Add this to the code pane
> ' Functions to provide data fields for report header
> ' Input:
> ' a data value
> ' Output:
> ' data value for report header
> ' Purpose:
> ' Provide data values for the report header
> ' Save data value in a static local variable
> ' for the last page header, the input variable will be empty
> ' so return the saved value
> ' Note:
> ' The ReportItems passed in must be at the top of the Body of the report
> ' so they will be accessible on the first page of the report
> ' The functions are Shared so theStatic variable will work
> ' The Static variable will retain its value while the report viewer is
> open,
> ' even if the parameter values are modified and the report re-run
> ' so always save the value except when the current value is not available
> ' All this is necessary because Reporting Services does not allow data
> fields in the page header
> ' and on a Purchase Order with many details, the second page has no detail
> fields
> ' so the hidden data fields cannot not be put in the detail area
> public shared function GetBaseName (byval InputValue as string) as string
> static SavedValue as string
> if InputValue <> "" then
> SavedValue = InputValue
> return InputValue
> else
> return SavedValue
> end if
> end function
>
> Steve MunLeeuw
> "Michael Bender" <technik@.salescom.de> wrote in message
> news:ecmd6i$c5b$01$1@.news.t-online.com...
>> Hi everybody,
>> I'm quite new to reporting services, respectively I were not able zu work
>> with them for a while, therefore I forget most of the stuff I knew.
>> Here's my problem:
>> We have lots of reports made in Microsoft Access, that we now have to
>> convert for the use in the reporting services (2000). Basically in all
>> Access reports we use dynamic data in the page header, like a name from
>> an employee which comes from the database. This seems to be impossible in
>> the reporting services. We get an error message when compiling the
>> report.
>> Does anyone know if this possible or a good workaround? I cannot believe
>> that this isn't possible, it's essential.
>> Thx in advance
>> Michael
>