Thursday, March 8, 2012
Code Problem - Updating parameter
has been printed so that I can suppress it later. the code below generates
an error " Reference to a non-shared member requires an object reference" .
How do I pass in /reference my parameter so that I can set the value? Any
help greatly appreciated
Public Function PrintCensus() As Integer
if Parameters!PrintCensus.Value = 0 Then
Parameters!PrintCensus.Value = 1
Return 0
end if
return 1
End FunctionWhat you have to do is:
1. Define your function as:
> Public Function PrintCensus(PrintCensusValue as integer) As Integer
>
> if PrintCensusValue= 0 Then
> Return 1
> else
Return 0
> end if
> End Function
2. Call your function from expresion field as:
=Code.PrintCensus(Parameters!PrintCensus.Value)
Hope this helps,
Mónica
"Peter Feakins" <PeterFeakins@.discussions.microsoft.com> escribió en el
mensaje news:71D8DF3A-A67F-41CB-8B8B-CE71E0FF63E4@.microsoft.com...
>I want to update a parameter in order to know whether a certain type of row
> has been printed so that I can suppress it later. the code below
> generates
> an error " Reference to a non-shared member requires an object reference"
> .
> How do I pass in /reference my parameter so that I can set the value? Any
> help greatly appreciated
> Public Function PrintCensus() As Integer
> if Parameters!PrintCensus.Value = 0 Then
> Parameters!PrintCensus.Value = 1
> Return 0
> end if
> return 1
> End Function|||apparently you cannot change the value of a parameter after it is set prior
to report execution.
"Peter Feakins" wrote:
> I want to update a parameter in order to know whether a certain type of row
> has been printed so that I can suppress it later. the code below generates
> an error " Reference to a non-shared member requires an object reference" .
> How do I pass in /reference my parameter so that I can set the value? Any
> help greatly appreciated
> Public Function PrintCensus() As Integer
> if Parameters!PrintCensus.Value = 0 Then
> Parameters!PrintCensus.Value = 1
> Return 0
> end if
> return 1
> End Function
Wednesday, March 7, 2012
code a hyperlink
Hi
I have developed a report using microsoft reporting services with certain fields
In my report the user enters name (which is a parameter) and the report is displayed
Inside my report. I have a field studentID which should be a link which when clicked should take me to a new report which is a report in extranet.
Currently I dont have access to that rdl and for certain reasons, I am asked to link to that report by
coding a hyperlink in development
I know that in the text box under action properties I need to give the url , but its not working
Should i specify the student id anywhere .
What and where should I code?
Thanks
If I were going about this, I would use the "Jump to URL" radio button.
However, the problem that you are going to have is passing and retrieving the parameter (as you already see).
Usually, the way you pass a parameter in a URL is as follows:
http://forums.microsoft.com/MSDN/AddPost.aspx?PostID=2009786&SiteID=1
The parameters in the above URL are PostID with value 2009786 and SiteID with value 1.
Now, how you go about retrieving those values in the report from the URL is beyond my experience.
Possibly someone else knows how.