gameon
Posts: 10
|
| Posted: 07/12/2005, 12:25 PM |
|
I am trying to use the simple report with groups example for the same feature in my php application, however, I recieve the "call t a member function on a non-obect" issue.
I have tried to replicate the Simple Report with groups by using the intranet db and the grid builder using the employees and department tables. I cut and paste the html as instructed and the php code in the "Before Show Row' event.
HTML
<!-- BEGIN Label department_name -->
<tr>
<td bgcolor="#336699" colspan="3"><font color="White">{department_name}</font></td>
</tr>
<!-- END Label department_name -->
PHP
global $DepName;
global $departments;
if ($DepName == $departments->department_name->GetValue()) {
$departments->department_name->Visible = False;
} else {
$departments->department_name->Visible = True;
$DepName = $departments->department_name->GetValue();
}
THe error refers to the line " if ($DepName == $departments->department_name->GetValue()) {"
I have tried a number of revisions. however, i get the same error.
Can anyone help me understand this?
Thanks!
|
 |
 |
gameon
Posts: 10
|
| Posted: 07/12/2005, 12:55 PM |
|
I should have submited to the forum sooner - after 2 days of messing with this issue, i finally submited a forum topic, and then tried a couple more things and it worked!
I had to place the department_name label using the Form label tool rather than simply via html code. The label then was set up like other labels...
|
 |
 |
DonB
|
| Posted: 07/13/2005, 8:59 PM |
|
I believe you simply typed '{name}' into the HTML? That creates a Template
Variable (TV), in CCS parlance. However, there is other information
maintained in the ccp file that associates the physical presence of that TV
with the logical representation of a Label control. without that, there is
nothing to indicate the TV should be replaced with a data value when the
page loads. When you created it with the Label tool, that other information
was generated and stored in the ccp file. When you Asp, Php or other page
executes, it reads the html file, locates all those TVs and fills in the
appropriate data values, then dumps it all (as HTML) to your browser.
That, in a nutshell, is what the template-driven aspect of CCS is all about.
As an aside, you DO have direct access to the TVs with the SetVar function,
but it requires YOU to code the template replacement logic. For a complete
Label control, that drudgery is taken care of for you automatically.
--
DonB
http://www.gotodon.com/ccbth
"gameon" <gameon@forum.codecharge> wrote in message
news:542d4204055ade@news.codecharge.com...
> I should have submited to the forum sooner - after 2 days of messing with
this
> issue, i finally submited a forum topic, and then tried a couple more
things
> and it worked!
>
> I had to place the department_name label using the Form label tool rather
than
> simply via html code. The label then was set up like other labels...
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|