CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How to Display Values from Other Tables Instead of Foreign Key

Print topic Send  topic

Author Message
JimmyCrackedCorn

Posts: 583
Posted: 05/02/2007, 2:40 AM

I let the application builder create 3 pages for me,

- search/grid
- edit/add
- view (just edit/add without the ability to update)

For the edit/add page CCS inserted listboxes that are linked to the appropriate tables to get the values from those tables. For example, my main customers table has a field for credit card type but instead of using a text value I use an integer which serves as a foreign key into the credit card type table. The credit card type table only has two columns, ID and Name.

CCS correctly uses the ID to link this table and the Name to display in my listbox. So far...so good!

But, in my view page, where nothing is editable, CCS uses Labels for everything. And instead of linking up to my other tables it simply inserts the ID instead of the Name column.

If I look at a customer record in the adit/add page, their credit card type shows as "Visa" but if I look at the record in the view page their credit card type shows as "1" (which is the ID).

Is there a simple way to fix this? I know I probably need to put some custom code in an event to convert the table ID to a value but before I spend hours chasing this I wanted to be sure I'm not missing something really simple!!

Thanks in advance for any assistance.
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
JimmyCrackedCorn

Posts: 583
Posted: 05/02/2007, 4:03 AM

OK. I got this part figured out! :-)

I went into the Visual Query Builder, added the other tables, set up aliases for the text fields I wanted and then set these to each label. Works like a charm!

BUT, now I have another problem!

In my edit/add page several fields have listboxes as described before. But in the view page if any of these fields do not have a value, then the entire column collapses and no values are shown for any of the other fields either!

Any ideas on this one?
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
JimmyCrackedCorn

Posts: 583
Posted: 05/02/2007, 4:22 AM

a little more on this.

it seems that this is related to whether multiple tables are included in the Visual Query Builder. If I go in and delete the additional tables, then the value column displays just fine. But as soon as I have even one additional table in the Visual Query Builder AND one of my listbox fields is missing its data, the value column in my table is blank.
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
Wkempees
Posted: 05/02/2007, 4:29 AM

use the & nbsp ;
It is a Non Breaking Space or Non Blanking Space
and it will keep your table cells organized.
I think there is a setting in the Builder wizzards, but
if you add one manually after each {field} it will do what you intend.
Another option depending on the database you use is to test for content
in the retrieved fields and if-empty supply a space as value.
Use of the first options is normal practice.

Walter
Wkempees
Posted: 05/02/2007, 4:33 AM

ignore my response post, I apparently misread your post.

On fisrt thought I think you might need to delve into
Custom Insert/Edit

W

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.