Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Setting a BLOB in a SELECT
Sun, Jun 29 2014 10:32 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

In FastReport I want to have a graphical indictaor (glyph) for rows that are above or below cut off points. There will be three images - high, low and in range with in range being null. I'm not storing these but calculating on the fly.

In a DBGrid I can set the index to an imagelist and draw (or not) the appropriate glyph. The easiest way, I thought, would be to create the SQL to do this eg

select
_Timestamp,
_TestPoint,
_mmolPL,
IF(_mmolPL > 7.5, X'494C010102000400....lots and lots...',NULL) AS Glyph
FROM Results

I get an 1011 error.

Anyone done anything like this, if so how?

Roy Lambert

Mon, Jun 30 2014 3:54 AMPermanent Link

Adam Brett

Orixa Systems

Roy

I have no experience of doing this at all Roy, but I would suggest trying CAST(<some chars> as BLOB) or perhaps just storing the images in a little look-up table so you can reference them as fields?
Mon, Jun 30 2014 4:02 AMPermanent Link

Matthew Jones

Roy Lambert wrote:

> In FastReport I want to have a graphical indictaor (glyph) for rows
> that are above or below cut off points. There will be three images -
> high, low and in range with in range being null. I'm not storing
> these but calculating on the fly.
> Anyone done anything like this, if so how?

Hmm, the DevExpress grid provided most of my answer, in that it has an
image combo field that can pick up from an integer field. Thus the
database part is easy. Not sure if that helps - depends on your grid.


--

Matthew Jones
Mon, Jun 30 2014 4:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam


With a bit more research I think its EDBManager objecting to the fact that the binary is spread over several rows in the SQL editor window. AT least it worked when I got rid of enough data to allow me to put it all on a single row.

I have found an alternative answer by turning on/off the visibility of a picture object in FastReport using their built in scripting.

Roy Lambert
Mon, Jun 30 2014 4:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Matthew

>> In FastReport I want to have a graphical indictaor (glyph) for rows
>> that are above or below cut off points. There will be three images -
>> high, low and in range with in range being null. I'm not storing
>> these but calculating on the fly.
>> Anyone done anything like this, if so how?
>
>Hmm, the DevExpress grid provided most of my answer, in that it has an
>image combo field that can pick up from an integer field. Thus the
>database part is easy. Not sure if that helps - depends on your grid.

I have no problem with showing a glyph in MY nlhDBGrid its FastReport that was giving me the problem.

As I posted to Adam

I have found an alternative answer by turning on/off the visibility of a picture object in FastReport using their built in scripting.

Roy Lambert
Image