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 -> ASP

 This use to be easy in CodeCharge- dlookup

Print topic Send  topic

Author Message
JHoffman
Posted: 11/18/2005, 7:59 PM

I am trying to replace a variable in a non-editable grid with a lookup from another table. I have the variable {category} in the grid form "Catalog" and i'm trying to look up the "CatName" in the "Category" table where variable {category} equals "catID".

Here's my before show code for {category} in the grid:

Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =" & Category.Value , DBsqlserver))


I keep getting this error:
Variable is undefined: 'Category'

If i try this code, I get the lookup value i expect:
Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =1", DBsqlserver))


I'm sure i'm overlooking something obvious, but every combination I've tried kicks back one error or another. This used to be so easy in CC!

Thanks.
Edd


Posts: 547
Posted: 11/18/2005, 10:16 PM

Try

Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =" & Catalog.Category.Value , DBsqlserver))


Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
DonB
Posted: 11/19/2005, 8:39 AM

Actually the lookup should not be needed, if you construct the query for the
grid such that it contains the Category table. And it will be considerably
more efficient, too.

--
DonB

http://www.gotodon.com/ccbth


"JHoffman" <JHoffman@forum.codecharge> wrote in message
news:6437ea32d207fa@news.codecharge.com...
> I am trying to replace a variable in a non-editable grid with a lookup
from
> another table. I have the variable {category} in the grid form "Catalog"
and
> i'm trying to look up the "CatName" in the "Category" table where variable
> {category} equals "catID".
>
> Here's my before show code for {category} in the grid:
>
> Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =" &
> Category.Value , DBsqlserver))
>
>
> I keep getting this error:
> Variable is undefined: 'Category'
>
> If i try this code, I get the lookup value i expect:
> Catalog.Category.Value = Cstr(CCDLookup("CatName", "Category", "CatID =1",
> DBsqlserver))
>
>
> I'm sure i'm overlooking something obvious, but every combination I've
tried
> kicks back one error or another. This used to be so easy in CC!
>
> Thanks.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


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.