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 -> General/Other

 Problem with "retrieve value for control"

Print topic Send  topic

Author Message
pkno

Posts: 10
Posted: 04/28/2004, 10:45 PM

Hi everybody,

I'm new to CCS but familiar with php and application programming. In fact we're still in the evaluation phase of CCS and right from the beginning we ran into a problem. :-/
Task: Pass values entered in a form to a display page.
I was strictly following the user guide and inserted a named label into the display page, added an action "before show" -> "retrieve value for control" with a data source "form" and the parameter which was handed over by the form.
Result: Nothing is displayed.:-D
By changing the code in a way which just displays the handed over parameter, I can confirm that the parameter was correctly passed to the page. It just does not show up in the defined label.
This happens in PHP as well as in ASP.
Can anybody help?
_________________
Regards,

Peter
View profile  Send private message
peterr


Posts: 5971
Posted: 04/28/2004, 11:38 PM

What is the URL after you submit your form?
(I'd like to check what parameters are in the URL, if any)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
pkno

Posts: 10
Posted: 04/29/2004, 12:27 AM

Hmm...
As I'm submitting the form by a "POST", there are no values within the URL. But to answer your question I switched to "GET" and the URL is as follows: ...formtest2.php?Name1=Hallo&Name2=Welt&Submit1=Submit
Looks allright, doesn't it?
As I said, I can confirm that the parameters are correctly passed to the receiving page and I can make them visible by a "print" statement in some custom code.
In the meantime I also made an additional test by changing the server. The first try was on a Windows2000 Server with IIS and PHP4 for Windows, the second was an Apache on a Linux system with PHP4. Same result!
_________________
Regards,

Peter
View profile  Send private message
peterr


Posts: 5971
Posted: 04/29/2004, 12:41 AM

I asked previous question because if you are using certain forms in CCS (for example Record/Search) then CCS may convert the POST parameters to GET. I could explain why if this is what happens in your case. However, looks like if you're able to print the values you need via custom code then the problem may be somewhere else.

Anyway, what are the values in all 3 properties of your action: Control Name, Source Type, Source Name?

I also recommend couple additional tests:
1. Change the "Source Type" property of your action to "Expression" and into its "Source Name" property enter "abc" (including quotes).
Then check if abc will be displayed on the page, even after you POST something to this page.

2. Change the "Source Type" property of your action to "URL", even if you are POST'ing data. Just to see if maybe for some reason these values can be obtained in such way (later we can check why).
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
pkno

Posts: 10
Posted: 04/29/2004, 1:14 AM

:-) I thought so. The point is, in my test I'm not using any of the CCS generated forms. So, I think we can exclude that CCS converts something from "GET" to "POST".
In the meantime I changed my test to be a little bit more generic, so don't be confused when the labels are different from my first posting.

Regarding the "SourceName": In the sending form the text input fields are by default named with "{LABEL_Name}". I know that this is the standard template behaviour. But, in order to exclude the template, I changed the name directly to a constant with the same name like the label has. In fact this doesn't make a difference.

The three values within the receiving labels are:
ControlName: DisplayValue1 (Name of the used label)
SourceType: Form
SourceName: Value1 (Name of the form's text entry field)

The respective code looks like this:
//Retrieve Value for Control @7-02EFE02F
global $DisplayValue1;
$DisplayValue1->SetValue(CCGetFromPost("Value1", ""));
//End Retrieve Value for Control

Results of the additional tests:
1.)
ControlName: DisplayValue1 (Name of the used label)
SourceType: Expression
SourceName: "TestValue1"

The respective code looks like this:
//Retrieve Value for Control @7-189EE7FD
global $DisplayValue1;
$DisplayValue1->SetValue("TestValue1");
//End Retrieve Value for Control

=> NO change, nothing is displayed in the respective labels

2.)
ControlName: DisplayValue1 (Name of the used label)
SourceType: URL
SourceName: Value1
The respective code looks like:
//Retrieve Value for Control @7-CF85E5D9
global $DisplayValue1;
$DisplayValue1->SetValue(CCGetFromGet("Value1", ""));
//End Retrieve Value for Control

=> NO change! Nothing is displayed in the respective label.

BTW: Thanks for your fast responses!:-)
_________________
Regards,

Peter
View profile  Send private message
peterr


Posts: 5971
Posted: 04/29/2004, 1:52 AM

OK. Since #1 didn't work then it means that the problem is not related to POST or retrieving POST values, but the Label just doesn't display anything.
Not sure what's wrong but something might be misconfigured in the HTML. Where is your Label placed? Within a form or directly on the page outside of forms?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
pkno

Posts: 10
Posted: 04/29/2004, 2:29 AM

Well, as the receiving page in this case is a simple displaying page, it does not contain any forms at all. The labels are only placed within a table in order to position them within the page.
Now, I've created a simple form on the receiving page and put the labels into that form, just to make sure it's nothing to do with the handling of forms by CCS. -> No change!

To me, it seems that the action which is assigned to the label, is not even executed. Why...?
I assigned a piece of custom code to the "Before Show" event on the level of the page and was able to display the transmitted values. Then I placed some part of this custom code into the "retrieve value for control" action of the label. Whereas the custom code on the page level was executed and produced an output, the custom code on the label level did NOT produce any output.
_________________
Regards,

Peter
View profile  Send private message
peterr


Posts: 5971
Posted: 04/29/2004, 12:16 PM

I submitted this issue to our engineering, they tested it and didn't find any problems. The Label displays values as it should.
You can contact our support and attach a sample project that doesn't work for you. They can also email you a small project that we used for testing.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
pkno

Posts: 10
Posted: 04/29/2004, 10:46 PM

Thanks!
I'd really like to get this small testing project.:-)

Maybe that it's not really a problem of CCS but rather an issue of understanding how CCS really works (You remember? I'm a newbie to CCS :-)).

Nevertheless, I've been continueing my tests and, although I'm not really sure about it, I figured out, that the values of "text input" fields which have been inserted from the "Forms"-Toolbox are not displayed in the following display form, but the values of "text input" fields coming from the "HTML"-Toolbox are properly shown.
It seems that CCS handles "GRID" originated "text input" fields differently than "HTML" originated "text input" fields.

So, the question to me is: Is that the way it was designed?

If so, I can accept that, allthough I'm not really sure whether I consider that as to be good or not :-)

However, if you could arrange that the test project of your engineering is sent to me, I'd be glad to give you feedback about it.

Again, thank you very much for your support !!!

BTW: Seems that we're going to purchase CCS. I know it's a little bit off topic, but is there another way of buying the product than by credit card?
I'm asking because it's not a private purchase but my department has to pay for it. The point is, the department does not have an own credit card for such things (that still is not usual in Germany :-P) and you probably know that things normally work a bit different if a company buys something...:-)
_________________
Regards,

Peter
View profile  Send private message
peterr


Posts: 5971
Posted: 04/30/2004, 1:01 AM

Peter,
OK, please still go via our support ( http://support.codecharge.com ), even if you haven't purchased CCS yet. Please point them to this forum thread and I'll ask them to email you that project.
We accept payments via wire transfer and they can also provide you with details about this.
And since you mention that you're in Germany, you can purchase CCS from our German reseller at http://www.devdata.de
Thanks
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
pkno

Posts: 10
Posted: 04/30/2004, 1:45 AM

OK! Did so.

Thanks a lot for your patience and your hints.8-)

Will have a look to the German reseller. Perhaps we can arrange something with him.

Have a nice weekend!


_________________
Regards,

Peter
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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