Embedding image and multiple queries in cfgrid

I have a datagrid that displays a user's work history pulled
from one query. In the original HTML table set up, a status icon
for each work item was displayed as either "New", 'Needs Attention"
or "Archived". This status was determined by using a value from the
first query as a filter in the WHERE clause of the second query:
------------------- Original Query -------------------------
<cfquery datasource="#application.defaultdsn#"
name="qQuestions">
SELECT discussions.dateSubmitted, discussions.discussionID,
discussions.subjectID, discussions.topic, users.firstName + ' ' +
users.lastName AS stName,
subjects.subjectID AS Expr1, subjects.subject
FROM discussions INNER JOIN
users ON discussions.userID = users.userid INNER JOIN
subjects ON discussions.subjectID = subjects.subjectID
WHERE 0=0
<cfif getDiscussionIDs.recordCount GT 0>
AND (
<cfloop query="getDiscussionIDs">
discussions.discussionID = #getDiscussionIDs.discussionID#
<cfif getDiscussionIDs.currentRow NEQ
getDiscussionIDs.recordCount>OR</cfif>
</cfloop>
<cfelse>
AND 0=1
</cfquery>
------------------------ Queries used to determine status
<cfquery datasource="#application.defaultdsn#"
name="LatestMessage">
SELECT Max(discussionPosts.postID) AS NewestMessage
FROM discussionPosts
WHERE discussionPosts.discussionID =
#qQuestions.discussionID#
</cfquery>
<cfset variables.userTypetoView = "tutor">
<!--- <cfif LatestMessage.recordCount --->
<cfquery datasource="#application.defaultdsn#"
name="getLastInfo">
SELECT discussionPosts.userType,
discussionPosts.dateSubmitted, discussionPosts.viewerID
FROM discussionPosts
WHERE discussionPosts.postID = #LatestMessage.NewestMessage#
</cfquery>
My question is how can I emulate this same status icon setup
in a cfgrid? I used the following ActionScript to create a new
column in the grid and return a string. However, this new column
must logically know how to display the correct status IMAGE for
each corresponding row. As you can see, there are no database
tables for storing the status - which would have made this much
easier.
function setStat(){
eQArchive.getColumnAt(1).labelFunction = statIcon;
function statIcon(item
bject, columnName:String): String{
if (item[columnName] != undefined) {
return asIcon;
else {
return "";
I also tried using the toScript() function in CF7 to see if I
can set a variable equal to the appropriate image and then return
it in the above script, but this is where I am at a loss.
<cfif getLastInfo.recordCount GT 0 AND
Trim(getLastInfo.userType) EQ "tutor">
<cfset stat = "/images/docArchive.jpg">
<script language="javascript" type="text/javascript">
<cfoutput>var #toScript(getLastInfo, "asIcon",
True)#;</cfoutput>
</script>
<cfelseif getLastInfo.viewerID EQ session.tutorID>
<cfset stat = "/images/docNew.jpg">
<script language="javascript" type="text/javascript">
<cfoutput>var #toScript(getLastInfo, "asIcon",
True)#;</cfoutput>
</script>
<cfelse>
<cfset stat = "Green">
<script language="javascript" type="text/javascript">
<cfoutput>var #toScript(getLastInfo, "asIcon",
True)#;</cfoutput>
</script>
</cfif>
Any ideas on how to get this working is greatly appreciated.
Thank you in advance.

Hi Mike,
To insert multiple queries in a single woorkbook.
In the Business Explore --> Analyser --> Open the first query and then click on tools button of the BEx add on components and select the option ( Insert Query ).
Reg's,
Pratap Reddy Bodimalla.

Similar Messages

  • Mail problem with embedded images and links

    Since Yosemite Apple Mail seems to have a problem with images that are used as a hyperlink to a website.
    While links are clickable with external loaded images work fine, links with embedded images just do not anything. Clicking on them selects them, a double-click opens the image in Preview.
    This works:
    <a href="https://www.google.de"><img src="https://www.google.de/images/srpr/logo11w.png" alt="Google Logo"></a>
    This does not work:
    <a href="https://www.google.de"><img src="cid:logo_google" alt="Google Logo"></a>
    Can you reproduce this problem?
    We tried it with OS X 10.10.1 and 10.10.2

    After a bit of digging around I think I have found the reason for the EO being called prior to the CO. In the parent page CO, there is a transaction commit (oapagecontext.getApplicationModule(oawebbean).getTransaction().commit();).
    Therefore, I assume that as my custom AM is a child of standard AM where the transaction is being commit, the child AM is sharing the same transaction/session and hence the EO being called.
    I am running into issues with moving the validation to the EO as the validation requires visibility of the VO values to calculate a total value. Therefore is there a way to ensure that my custom AM maintains a separate database session/transaction to the parent/standard AM? Is it possible to break the parent/child relationship?
    This way I assume that the commit issued by the parent page CO will not affect my custom AM/EO.
    Cheers.
    Jon.

  • Send HTML Email with Embedded Images and CSS

    Hi All,
    I have a html page. I want to send that html page(not with attachment) with all images and css. i search and try but I cant find a good solution. can any one help... plz..........
    Thank You.....

    If you want to send the html page and have it
    reference the images and css files on your web
    site, that's pretty easy. Just create a message
    with text/html content that is your html page.
    If you want to include all the images and css files
    in your message along with the html page, you'll
    need to create a multipart/related message and
    you'll need to change all the html to reference the
    images and css files using "cid:" references.

  • Images and multiple lines in JTree

    I have a JTree and would like to display more details about certain nodes than can be seen in a single line, and perhaps images in some cases. What I was hoping I could do was instantiate DefaultMutableTreeNode with a JPanel that looked the way I wanted, but it turns out DefaultMutableTreeNode just uses the toString method of the object as the string it displays. Is there any way to do this? Here's an example of what I want (if images will display here.. if not, here's the link: http://www.enginuity.org/files/jtree_labels_157.gif )

    DefaultMutableTreeNode is only a model class, it does not know or care how the data is displayed (you could use DefaultMutableTreeNode without ever displaying the data in a JTree). What you need is a TreeCellRenderer (although I'm not sure you can set row height with that). This allows you to instruct the JTree to query you for a component to display for each cell of the tree. This component might be a JPanel with whatever you want in it.
    You should check this section of the JAVA Tutorial for more details: http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
    If what you need is to display a multiple columns for each node (a so-called TreeTable) then the matter is more complicated. But I found an article from Sun that describes how to write such a thing (I don't have the link handy).
    Message was edited by:
    A.Cristescu

  • Using DATA_CELL and multiple queries into one table

    Hi WAD experts,
    I have been trying to work out how to combine multiple hidden query result sets in their own tables in the template, into one table displayed as if the data originated from one query.
    I have been looking at using the DATA_CELL method of "modify table" class.
    Has anyone had to do this before - and if so do you have any clues as to how best to do this ?
    Thanks
    Chris

    Here is what I want:
    Say I have a query that tells me about how many items were sold at a hardware store for each week. Then the output would look something like this:
    Week,Item,Num_Sold
    13,Hammer,15
    13,Nail,594
    13,Screw,398
    14,Hammer,16
    14,Nail,382
    14,Screw,331
    But I want my output to look like this:
    <space>,13,14 <-- these would be the week numbers
    Hammer,15,16
    Nail,594,382
    Screw,398,331
    I asked this same question in a SQL-only forum and one person responded that they did not know how to do that. But I figure that this is done often enough that there must be some Open Source program that can transform the output data into a table. As you can see, it's not a pure transform. It's more like I take one column, make that the x-axis, another column, make that the y-axis, and "plot" the data based on the two columns. It's kinda like taking 1D data and making it 2D. There's no existing open source program which does this? I figure that I could just give the program my SQL queries, specify some rule such as "Make the first column of the resultset the row, make the second column the column and create a table with the 3rd row, using the first two rows to map the 3rd row into the table". Note that I think this only works with 3 columns.
    Anyway, if there is no simple program that already does this, I can make a program to do what I just described. I just asked the question here because I figure that there are a lot of people knowledgeable about SQL and Java on this forum and that someone would know of a tool which already does what I want if one exists.

  • Installed FF 33.0, & now embedded images and videos on websites are blank. How fix? How roll-back to 32.0.3?

    I installed FF 33.0, and "OpenH264 Video Codec by Cisco Systems, Inc. 1.1" plug-in installed itself automatically. Did that cause this problem? I set it to "Never Activate," which seems to have disabled it, but the problem persists. Do I need H264 for any reason? If not, can I uninstall it, and if so, how? Also, how do I revert FF to a previous verson? V. 33.0 seems to have caused this problem, whether it's due to H264 codec or something else in this version. There seems to be some incompatiblity somehow that wasn't there before -- what can I do to fix this?

    Are they blank or black? If they are black I would recommend disabling hardware acceleration. [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    This does not cause an issue, it adds to the variety of codec types Firefox can render.

  • Embedding same images across multiple components, best practices?

    Hi Guys,
    Once again a great forum.
    I have a fairly large dashboard application, built from many
    components, from an obvious maintenance point of view this is
    preferred.
    To keep the look and feel the same across each component I
    reuse a lot of the icons, this icons have 3 states, disabled,
    normal and hot(rollover)
    The mouse roll over and roll out are the same for each set of
    icons. At the moment I have each component embed each icon and
    repeat the functions.
    This is not the optimum way to do this so I'm looking on best
    practices. Should I build a separate action script package with all
    the embedded images and roll over/out functions. Then import that
    in to each component. But then I will embedded ALL the images in
    each component. Should I embed all the images in the main container
    app, then when flex sees the same image in a compoent will it not
    embedded again or will it embed the images again..
    In the example below 4 of the components have the same
    refresh icon and roll/over states. So this code is repeated (bad
    practice) in all 4. Moving to separate action-script package will
    make maintenance easier, but as stated above will just one copy get
    embedded for the entire app, or will 4 copies get embedded ?
    [Embed(source="images/refresh_24.png")]
    [Bindable]
    private var refreshIcon:Class;
    [Embed(source="images/refresh_24_hot.png")]
    [Bindable]
    private var refreshIconHot:Class;
    [Embed(source="images/refresh_24_dis.png")]
    [Bindable]
    private var refreshIconDis:Class;
    private function rollOverRefresh(event:Event):void {
    if (event.target.source != refreshIconDis )
    {event.target.source = refreshIconHot;}
    private function rollOutRefresh(event:Event):void {
    If (event.target.source != refreshIconDis )
    {event.target.source = refreshIcon;}
    }

    Flex is able to collate those Embeds so they are only
    included once IIRC.
    While it may seem like bad practice to include it in each
    component, it really isn't, from a code reusability standpoint. But
    you could probably continue on that path and create a custom
    component <mycontrols:RefreshButton> that has the the embeds
    in one place for you.
    You could probably also do something similar with style very
    easily:
    .MyButton {
    overSkin="@Embed(source='../assets/orb_over_skin.gif')"
    upSkin="@Embed(source='../assets/orb_up_skin.gif')"
    downSkin="@Embed(source='../assets/orb_down_skin.gif')"/>
    Then apply that style to your button.
    You could also put the button into a single SWF file in Flash
    and include it that way to reduce the number of embeds. I never
    include PNG, JPG, GIF, etc files directly, always SWF as you get
    better compression that way IMO. Plus I just find it gives me
    greater flexibility...if I want to animate my skins in the future
    (button that gleams for instance), I already have SWF's in my code
    so no need to change anything out but the SWF.

  • Want to send a email with images and text in the body of email in iOS

    In iOS, we have written a code to send an email,  with embedded images and text in the body of the email ( not attachment) using mail composer. It works well with iOS devices like iPhone and iPad, but does not work in window based OS. Can anybody help. The code is

    Thanks James !, do you have an idea how to  find the window resource which I belive will be included in our appllication pack.
    In above  I have missed to copy the code,below is the code. This might help you to help me.
    NSMutableString *imgContent = [[[NSMutableString alloc] initWithString:@"<html><body>"] retain];
    UIImage *imageData = [UIImage imageNamed:@"Midhun.png"];
    NSData *imageDataInBase64 = [NSData dataWithData:UIImagePNGRepresentation(imageData)];
    NSString *base64String = [imageDataInBase64 base64EncodedString];
    [imgContent appendString:[NSString stringWithFormat:@"<p><b><img src='data:image/png;base64,%@'></b></p>",base64String]];
    [imgContent appendString:@"</body></html>"];
    MFMailComposeViewController *emailWin = [[MFMailComposeViewController alloc] init];
    [emailWin setMessageBody:imgContent isHTML:YES];

  • Why can't I double click to open embedded images?

    I want to put this topic in the Features request, but I'm putting it here first to check that I've not made a silly mistake.
    I'm slowly getting the hang of Illustrator. But it often feels like I'm learning how to do things in a non-intuative way.
    Take Embedded images. Illustrator loves them. I guess its because it doesn't have a 'Collect for Output' feature - but don't get me started on that! Anyway, my point is when I receive a file with embedded images and I want to open those embedded images, my INTUITION tells me to simply double click the image and wait for it to open in Photoshop. After all, aren't Adobe always telling us that Illustrator and Photoshop are seamlessly integrated in ways Freehand can only dream of?
    So, I double click and nothing happens. I then double click the thumbnail picture in the Image box. Up comes a Link Information box. Lots of facts and figures except how to open it. Then I click on the blue underlined word saying 'Embedded'. More options here - but none of them any good because I haven't got the original on my system.
    To cut a long story short, I finally discover that by copying the embedded image, then opening Photoshop, then opening a new document, then pasting, then clicking the transform tick box, then flattening - I can get to see the embedded pic.
    No nifty link back though. If I want to update the image in Illustrator I have place it, scale it position it and delete the original. I tried Relink - but it pasted the new pic at 90 degrees to the original!
    So how about it? Double Click Embedded images to open in Photoshop? Change them and they automatically update in Illustrator? Am I asking too much? Am I missing the point?

    Not a feature. In fact, there's no way, using just Illustrator, to extract embedded images. But then, it's only at version THIRTEEN! I save a PDF using no downsampling or compression, then open in Photoshop. When you open a PDF in Photoshop you are given the option to rasterize any pages or extract images embedded in the PDF. Choose Images then select the images you want. Save as TIF or PSD and re-link in Illustrator.
    Yes, it is stupid.

  • Help with images and buttons

    I was wondering if anyone could recommend a tutorial or point me in the right direction. I've been trying to figure out how to use buttons to add images (been using png from photoshop with alphachannel) to a canvas. I don't have any problems skinning the buttons nor putting in a single image, nor text. As far as getting the images to layer when the buttons are clicked then I'm pretty lost. Not sure if an array is best or if adding and removing them as children in another container would be any easier..

    I've been using flash builder beta 2. I was planning on embedding the images. I'm not sure if the help files and examples I am reading are not compatible or if I just have the syntax wrong. I haven't been able to find any examples that use embedded images and toggle visibility. I've used spark components. In design mode it puts the code in for a button when drag-dropped, then recommends using spark component instead. It seems that the only time that the images really do anything is when there's a spark component.
    I've never used flex before would it be easier to use wordpad and try compiling it with something other than flash builder?

  • Making sure attached images and signatures appear in the body of sent email

    The subject line says it all. I would like recipients of my mail to see the attachment/image or signature, within the body of the email where I have placed it.....or not if I so choose. Is this possible to control from the sender's end?....or is this also influenced by the receiver's mail settings and platform?
    I know there are many posts that dance around this issue, but I have not found one that nails it. Any advice would be appreciated. Thanks.
    PowerBook 17" & G4 Quicksilver desktop   Mac OS X (10.3.9)   Mail 1.3.11

    The Mail.app displays all image/photo and single page PDF documents inline or viewed in place within the body of the message by default. Depending on the recipient's email client and available preference settings, such attachments may appear inline or viewed in place within the body of the message by default when the message is opened (as with the Mail.app) or as attached files only for which the sender has no control over.
    If the recipient's email client is not the Mail.app but displays image/photo attachments inline or viewed in place, the attachments may not appear exactly where you placed them.
    The only way to do what you want or get as close as possible is by using HTML formatting with embedded images and/or objects and no Mail.app version includes an HTML composer/editor.
    RTF with Tiger Mail is HTML which allows for forwarding a message received that was composed in HTML keeping all intact. With Tiger, you can use the HTML editor/composer of choice with embedded images/objects, etc. and save the completed document.
    Open the saved HTML document with Safari and at the Safari menu bar, go to File and select Mail Contents of This Page. A new Mail.app message will be launched and the HTML document viewed with Safari will be copied to the message which will be sent in its entirety.
    You cannot do this with Jaguar or Panther Mail.

  • OBIEE v11.1.1.5 - Cannot view embedded images  ( PDF/HTML)

    Hi Everyone,
    I have a OBIEE 11g report with embedded images and I scheduled to run every week using an agent.
    When I specify Delivery content and format as ( PDF or Plain HTML ) the email does not display any images
    Error if format is HTML : The linked image cannot be displayed. The File moved,renamed, or deleted. Verify  that the link points to the correct  file and location.
    I also tried printing to pdf, but images are not displayed.
    Tried using both fmap and html syntax to link images. Has any one encountered this issue in v 11.1.1.5 ?
    Please suggest
    Thanks

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of this test is to determine whether the problem is localized to your user account. Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in OS X 10.7 or later, then you can’t enable the Guest account. The "Guest User" login created by "Find My Mac" is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.

  • Problem with embedding images in a textField

    I am trying to embed images in an html text field.
    I am using the following in the txt file that gets loaded
    into the html text box, but the image does not show up.
    <img src='art_home.jpg'>
    art_home.jpg is the linkage id.
    I have also tried it with a movie clip, but it would not work
    either.
    What am I doing wrong? Where could I start to look? I am
    somewhat lost on this...
    Thanks a lot!

    Hi, thanks a lot.
    What you are describing, is what it seems to be doing, as it
    reports errors loading the images. I thought I was reading that I
    could substitute src path to an image, with a linkage ID in the
    library. Is that not the case?
    "- src Specifies the URL to a JPEG or SWF file, or the
    linkage identifier for a movie clip symbol in the library."
    I read this here:
    http://blog.inventis.be/embedding-images-and-movie-clips-in-flash-text-fields/
    Thanks a lot.

  • How can I get photo attachments to show up on the receivers end as an attachments vs an embedded image?

    When I try to send photos from mac Mail, the recipients receive them as an embedded image, and cant save them. Please note that most of the recipients are PC users and they do not have the option to save the photos, only copy them in a compressed format. Any suggestions would be helpful!

    This may be caused by your hosting provider not having the proper MIME file to display .svg files.
    See link.
    http://css-tricks.com/snippets/htaccess/serve-svg-correct-content-type/

  • Mac Mail has problems to display HTML embedded images

    Well Im new here , but have a real problem.
    I create  HTML pages with embedded images and send them off as MIME/multipart etc. mail through active server pages.
    So far so good. All PC users see the mails with 2 embedded images at correct positions using windows e-mail .
    However all Mac users receiving this mail have a problem,  then MAC mail show embedded images just as a box , the 2 images become attachements of the email.
    If a PC user forwards such a  received HTML e-mail to a MAC user , the MAC Mail sees the 2 images are correctly displayed.
    Thanks for hints and comments .

    Hello BDAqua
    Thanks for the dump hint - I could use it.
    Well I have not been able to track down the exact cause of the problem, but at the end I have succeeded to see the pictures even on the Mac. Initially , because I tested the HTML code against Safari/Foxpro/IE9 with success and the PC's received it as a mail  perfect with the pictures , I ruled out the code.
    After sending it with various different parameters for 7-bit coding , multipart/alternative; multipart/mixed, with and without alternative ascii-text body, etc. and having no change of the problem (in one instance Mac stuck the pictures at the end of the mail instead of having it as attachement - but never displayed inside the page) I thought about the HTMLcode again (the mail small but was consisting of a cluster of multi nested tables, where in the pictures where placed). I started from scratch with one simple table and one picture - and saw it also on the Mac, so repeated reconstruction every table layer and picture with testing each step again - and at the end - it worked all. So my conclusion is that the mentioned browsers and windows mail are made more HTML fault tolerant for little code mistakes than mac mail.  It seems that when forwarding the page from windows-mail to Mac mail , windows even corrects and thats why then it was seen ok on the Mac.
    I think that a number of people had similiar experiences. I contacted one advertising company (all Mac freaks and only Mac's there, they do a lot of Internet/Intranet design and develeopments for large companies) and asked them wether they know of any hints or problems - they simply said forget it it's not possible - which is not true - but seeing the HTML correct in all browsers doesn't mean it might ok for the mac mail.
    Well any way I now know where I am and know where to look if suddenly a picture is not shown anymore...
    Thanks for the help and all the best.
    Rgds
    peter

Maybe you are looking for

  • Bat file for running scheduled jobs

    Hi I am not entirely sure whether this is the correct forum to post this question, so apologies if I have posted this question in the wrong place. Anyhow, I would like to know how to create two automated bat file scripts that will execute a PL/SQL pa

  • How to display alpha channel of layer mask in layers palette ??

    Help me out here folks.... Using CS5--in the past, when I added a layer mask to a layer, it would display in the palette as the alpha channel, which was very handy. Now, when I add a layer mask, it only appears as the mask icon; i.e., gray square wit

  • Binding stopped working.

    I have a binding to a bean that used to work (it updated to the value on the form), but now, it does not change(in the bean, not the form). The value on the screen is not the one in the bean. When I refresh the page, the initial value comes back. <af

  • Loading data with attribute dimension.

    I have a currency attribute dimension asociated to Entities dimension and I like to upload data using the associated attribute dimension. I have a file with a column with the entity name and also a column with the attribute name. Could somebody tell

  • Installing java proxy runtime

    hi, can any one send me doc related to installing JPR in xi system. or steps to install jpr. thanks and regards vijender