Reference query values from custom code
How can I reference query values from custom code?
Normally in the expression I can use Fields!QueryValueX.Value
In custom code I can reference textboxes, for example - if ReportItems are passed as the parameter
But this doesnt include the query items
Javier Guillen
http://www.msbicentral.com/Blogs/JavierGuillen.aspx
October 29th, 2010 3:00pm
never mind I figured it out. I had to pass the Fields collection instead of the ReportItems.
One extra question would be.... do i necessarly have to pass the Fields collection? isn't it already available to the Code namespace?
Javier Guillen
http://www.msbicentral.com/Blogs/JavierGuillen.aspx
Free Windows Admin Tool Kit Click here and download it now
October 29th, 2010 3:12pm
Hi Javier,
I am glad to hear you have solved the original issue by yourself.
For your new question, generally, we pass a field's value as parameter for a method. If we want to refer to a field in the code directly, please use the following code(sample):
Public Function IsFieldMissing(field as Field) as Boolean
If (field.IsMissing) Then
Return True
Else
Return False
End If
End Function
Anyway, for a new question, I would suggest you submitting in a new thread. This will benefit other members who met the same issue.
For more informaiton, please see:
http://msdn.microsoft.com/en-us/library/dd283100(SQL.100).aspx
Thanks,
Jin ChenJin Chen - MSFT
November 2nd, 2010 3:36am