Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,
I have defined a variable in module. Then I used this variable in public function of the Code area of the report. It says this variable is not defined. How can I use that variable in the code area as that already contains some values and I need to use them.

Thanks
Furqan
Posted
Comments
Simon_Whale 8-Feb-11 10:08am    
how have you declared the modules variable and how do you use it?
Furqan Sehgal 8-Feb-11 11:07am    
I have declared it as
Public vrHeader as string
and in code windows of report, I have put
Public Function ShowValue()
vrHeader="Testing"
return vrHeader
End Function

The in the expression of textbox where I want to display it, I put
=code.vrHeader
It says error in code, vrHeader is not defined

1 solution

Make sure the variable's access level is public.
 
Share this answer
 
Comments
Prerak Patel 8-Feb-11 9:17am    
+5
Public myVote as Integer
Furqan Sehgal 8-Feb-11 9:26am    
Yes it is !
Still not working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900