|
-
Jan 4th, 2016, 08:58 AM
#1
Thread Starter
Junior Member
What is the equivalent code of this line in VB.Net?
here is a line i've coded in VB6 to access the width of TextBox control in the report:
Code:
datareport1.sections("details").controls("txtbox.text").width = 100
so, what is the equivalent code in VB.Net?
how can i access the control properties of Report.rdlc by code?
-
Jan 4th, 2016, 10:07 AM
#2
Fanatic Member
Re: What is the equivalent code of this line in VB.Net?
I don't know vb6 so I can't write the line for you. (sorry)
but this is how you set the height and width of a textbox.
Txtbox.Size = New System.Drawing.Size(12, 20)
George
-
Jan 4th, 2016, 10:29 AM
#3
Thread Starter
Junior Member
Re: What is the equivalent code of this line in VB.Net?
thanks George for your reply
but unfortunately this is not a correct code
maybe your code works to set the textbox of a form but not Report Rdlc!
-
Jan 4th, 2016, 11:13 AM
#4
Re: What is the equivalent code of this line in VB.Net?
 Originally Posted by eng.bassel
thanks George for your reply
but unfortunately this is not a correct code
maybe your code works to set the textbox of a form but not Report Rdlc!
I don't have SSRS at my current job (last job I used it quite a bit though) but from Googling this it looks like a lot of people have issues editing any of the report aspects using the .Net ReportViewer, however rdlc files are just xml which means you could open it prior to running, edit the length attribute of the textbox in question and write it all out again, then run the report in the viewer. Might be more work than it's worth, but I'm not seeing anything else via google searches.
Here's something along those lines: Programmatically Set ReportViewer Page Size
-
Jan 4th, 2016, 12:30 PM
#5
Re: What is the equivalent code of this line in VB.Net?
I don't see why it would be any different. The object model for the RDLC hasn't changed... so once you've dropped in the report viewer control, accessing anything in it should still be the same. It's like saying I have a '76 Charger that uses a key to start the engine, what's the 2016 version? The UI may look a bit different, but under the hood (pun intended) there's still an engine that works the same and it still takes a key to turn it over and start it.
-tg
Tags for this Thread
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
|