CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Plese, please help Grid and record builder question RESOLVED

Print topic Send  topic

Author Message
rado

Posts: 221
Posted: 11/07/2008, 8:15 AM

I made the grid with record where I use just one table. One of the field in the grid is the "depart_id". What I want to do is display the name (value) of "depart_id" from second table (department). I tried to add additional table (department) in data source of grid, however my initial sql query changed. Is there any way to add separate sql query that will retrieve the value just for specific field in the grid.

Thanks a lot for help
View profile  Send private message
melvyn


Posts: 333
Posted: 11/07/2008, 8:34 AM

Inside the visual query builder you can point the another table to display a second field in the grid.

The hard-coded version is a before show row event using CCDLookUp()

Try to get the first want with the assistant, I recommend.

The second work as follow:
1) place cursor in the row and insert an empty label (which will receive the department name) and let's rename it to department.
2) Go to properties -> events and add custom event to "Before Show Row"
3) In the above event custom code place this (modify with your values):
  
global $dbconnection; // change to set your connection name  
$depart_id = $Component->depart_id->GetValue();  
$department = CCDLookUp("department_name","department_table","id=".$depart_id,$dbconnection);  
$Component->departament->SetValue($department);  
This must work if you change the variable names to match yours.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
rado

Posts: 221
Posted: 11/07/2008, 8:40 AM

Thank you soooooo much. I was thinking about similar, however I was not sure is it correct way.
Let me try.

Rado
View profile  Send private message
rado

Posts: 221
Posted: 11/07/2008, 9:35 AM

Thanks Melvyn, you helped me again.
Somehow I use query builder again and this time worked just fine.

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

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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