-
Jan 18th, 2023, 08:10 AM
#1
Thread Starter
Junior Member
Call a function into Textbox Report Viewer
I have a function named NoToTxt converts numbers to words into Arabic language
I pasted it in the Code place of Report Properties then I tried to call it inside a textbox expression using this code
Code:
Code.NoToTxt (Fields!Number.Value)
but it didn’t work, I don’t know what exactly went wrong
any help please, I'm using Report Viewer VB 2012
-
Jan 19th, 2023, 03:52 PM
#2
Re: Call a function into Textbox Report Viewer
Can you have the function return its results to a string variable and then use that variable for whatever use you may need? Just a thought.
-
Jan 26th, 2023, 02:45 AM
#3
Re: Call a function into Textbox Report Viewer
Hi Talajeen,
If this is what you did then I don't think it will work:
Attachment 186763
What you have to do is to create a Class with your function and then in you textbox expression e.g.
Code:
=MyFunctions.NoToTxt(Fields!Number.value)
where MyFunctions is the name of the class and NoToTxt is the name of the function
-
Jan 26th, 2023, 04:29 PM
#4
Re: Call a function into Textbox Report Viewer
 Originally Posted by Tajaldeen
I have a function named NoToTxt converts numbers to words into Arabic language
I pasted it in the Code place of Report Properties then I tried to call it inside a textbox expression using this code
Code:
Code.NoToTxt (Fields!Number.Value)
but it didn’t work, I don’t know what exactly went wrong
any help please, I'm using Report Viewer VB 2012
What does "it didn't work" mean exactly? Error? Nothing? Garbage? Finger fall off?
-tg
-
Jan 27th, 2023, 01:17 AM
#5
Re: Call a function into Textbox Report Viewer
I realize that it is actually not as straightforward as my example in #3. I'm not sure if the OP will read is - it seems sometimes people post questions and they either don't come back for an answer or "tx" is too much effort.
I'm going to make a tutorial on this and maybe it can help someone in the future. In 6 years I battled hours and days with RDLC reports it feels like I should have 20 years experience 🙂
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|