CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP.NET - InMotion Framework

 Get the value of a hidden control in a Report

Print topic Send  topic

Author Message
rbaldwin

Posts: 172
Posted: 08/13/2014, 10:22 AM

I have a Report, in the detail row i've included a Hidden control named "parentID"

to that control's before show event i added:
Declare Variable:
name=parentID
Type=Integer
Initial Value= 0

Then i added a
Save Control Value
Name=parentID
Type=Integer
Initial Value=0

After i publish the code that is generated

'ReportLabel parentGroupName Event Before Show. Action Declare Variable @55-7D16FD82
Dim groupID As MTInteger = 0
'End ReportLabel parentGroupName Event Before Show. Action Declare Variable

'ReportLabel parentGroupName Event Before Show. Action Save Control Value @54-0701B0EA
groupID = Report1.GetControl(Of InMotion.Web.Controls.MTAction)("parentID").Value


Problem is when i view the report i get a compilation error
Compiler Error Message: BC30002: Type 'InMotion.Web.Controls.MTAction' is not defined
View profile  Send private message
rbaldwin

Posts: 172
Posted: 08/14/2014, 6:14 AM

I believe there is a bug. When i perform the same task i.e. add Action Save Control Value for a Label CCS correctly generates the code using cast of MTLabel. for a hidden it incorrecly tries to cast as MTAction.

It should be casting to MTHidden. when i manually change the generated line of code from

DIm groupID as Integer = Report1.GetControl(Of InMotion.Web.Controls.MTAction)("network_group_id").Value

to

DIm groupID as Integer = Report1.GetControl(Of InMotion.Web.Controls.MTHidden)("network_group_id").Value

my code now works.
View profile  Send private message
eratech


Posts: 513
Posted: 11/01/2014, 11:16 PM

rbaldwin - thanks for the tip. Are you using CCS 5 or CCS 4? (I have old Inmotion projects in 4 and will look out for this when migrating to CCS 5)

Thanks

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
rbaldwin

Posts: 172
Posted: 11/02/2014, 2:28 PM

My 1 very large project is 4.3 asp.net without inmotion
I am attempting to work through a number of coding scenarios in 5.1 asp.net with inmotion that I need before I dive in and rebuild my 4.3 project into 5.1 with inmotion

So far my only road block has been, getting the navigator to work when I've made changes to a grids sql in the before execute sgl event. I describe it in another thread
http://forums.codecharge.com/posts.php?post_id=123446
View profile  Send private message
cvboucher

Posts: 191
Posted: 11/03/2014, 9:23 AM

rbaldwin,

Have you looked at also updating CountCommand.CommandText with the same SQL you put in Command.CommandText? I think the CountCommand object is used to get the number of rows for the navigator. This needs to be done in the BeforeExecuteSelect event.

Craig

View profile  Send private message
juston33

Posts: 1
Posted: 03/21/2015, 5:10 AM

roblem is when i view the report i get a compilation error
Compiler Error Message: BC30002: Type 'InMotion.Web.Controls.MTAction' is not def









___________________________________________________

Cut down your exam stress by using our latest [url=http://www.test-king.com/cert-CCNA-Routing-and-Switching.htm]testking ccna[/url] exam and high quality [url=http://www.test-king.com/learn-language/TOEFL.htm]toefl test[/url] and testkingmcdst demos. We provide updated questions with [url=http://www.principiacollege.edu/]principiacollege[/url] pass guarantee along with [url=http://www.hood.edu/]www.hood.edu[/url] training.

_________________
Cut down your exam stress by using our latest [url=http://www.test-king.com/cert-CCNA-Routing-and-Switching.htm]testking ccna[/url] exam and high quality [url=http://www.test-king.com/learn-language/TOEFL.htm]toefl test[/url] and testkingmcdst demos
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.