DRW Results Page

  • Thread starter Thread starter john h
  • Start date Start date
J

john h

Is there any way of displaying database values as a
graphic? I have a form which comprises 60 checkboxes, so
I would like to display results where true=check and
false=cross, rather than displaying the words 'true'
and 'false'.
 
-----Original Message-----
Is there any way of displaying database values as a
graphic? I have a form which comprises 60 checkboxes, so
I would like to display results where true=check and
false=cross, rather than displaying the words 'true'
and 'false'.

This would be difficult. To do this in the Database
Results Wizard, you would need to write a query that
returned the HTML you want for each column, rather than
just a value. For example:

SELECT '<img src="images/' & IiF([box01],'check','cross')
& '.gif">' AS image01, ...

and then report the image01 field, setting the Database
Column Value component in the finished results region to
Column Value Contains HTML.

However, I suspect this wouldn't be workable for sixty
such fields. The SQL statement would get too long for the
DRW to handle. As a result, you would probably need to
write your own custom ASP or ASP.NET code.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Replace the code for the checkbox in the DRW to:

<% If Fp_Field(fp_rs,"column_name") = true then%><img
src=../images/check.gif><%else%><img
src=../images/cross.gif><%end if%>

That way, all values returned as true (or 1) would
display a check, and all false values would return an X

-M

P.S. Make it easy and remove all the grey code in the DRW
page so you can more easily edit in the future (keep a
copy of the page before editing).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top