CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [resolved - Before Build Select June 2011]

Print topic Send  topic

Author Message
CodeChargeMVP

Posts: 473
Posted: 06/28/2011, 1:57 AM

Hi,

I�m working over a normal record grid form,

the grid is showing the next fields:

IdJMP, IdMP, JMPPor, JMPImpGasto, JMPDivCod, JMPImpEuros

Our customer wants to see a description instead of the field IdMP which is a foreign key to

another table where the description is stored,so then on the before build select I try:

global $jg_mp1;
global $JMPProRef;
global $IdJG;

$JMPProRef = $jg_mp1->JMPProRef->Value;
$IdJG = $jg_mp1->IdJG->Value;

if($JMPProRef == "RS"){

$jg_mp->DataSource->SQL = "SELECT IdJMP, IdMP, JMPPor, JMPImpGasto, JMPDivCod, JMPImpEuros, resultados.ResDesc FROM jg_mp INNER JOIN resultados ON jg_mp.IdMP = resultados.IdRes WHERE IdJG ="."'".$IdJG."'"."ORDER BY IdJMP";

}else if($JMPProRef == "AC"){

}else if($JMPProRef == "OE"){

}

As you see,my idea is to create a different datasource depending on a variable value,
I create the new datasource, but obviously, there�s somenthing I miss, cause when
I do the new datasource on the before build select, than I can�t go to design view select
the field IdMP and choose his new ControlSource resultados.ResDesc,

�how do I put the new queryresult resultados.ResDesc on the field grid IdMP?

Thank you very much in advance.



_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 06/28/2011, 4:04 AM

hi,

I know I�ve to do somenthing like:

$jg_mp->IdMP->SetValue();

But the question is �How do catch the new value ResDesc from the datasource?

When I´m trying $jg_mp->DataSource-> I only see avalaible the originals fields from the original visual query builder.
_________________
Best Regards
Entrepeneur | NT Consultant
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.