Jasper report on HTML when one image loaded from database and for the other

How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
My code
ByteArrayOutputStream baos = new ByteArrayOutputStream();
          exporter = new JRHtmlExporter();
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
          exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
     exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
     exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
     exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
     exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
          exporter.exportReport();
          byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
Can any one help pls
Message was edited by:
ameet.au

hey sorry for posting it in this forum.
but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
byte image[] =(byte[]) outData.get("image");
                    ByteArrayInputStream img = new ByteArrayInputStream(image);
                    hmimg.put("P_PARAMV3", img);
print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
bdata= JasperExportManager.exportReportToPdf(print);

Similar Messages

  • When importing files into fcpx from go pro hero2, some are importing as .mov and some as .mp4. when making a multi cam clip it will only add one type, if you try and add the other it says camera clip cannot be processed.

    when importing files into fcpx from go pro hero2, some are importing as .mov and some as .mp4. when making a multi cam clip it will only add one type, if you try and add the other it says camera clip cannot be processed. need to figure out why it randomly imports differently, or how to add different file tyoes to multi cam.

    here is one that is imported and stays .mp4. the specs are same as original file before import.
    here is one that has changed somehow during import. specs on original file are same as above, but once it is imported it changes to this in event folder, and others randomly keep the above specs.

  • When I get messages from Barnes and Noble, the text is blank. If I hit reply or forward, I can then see the content. This only happens with Barnes and Noble. Any suggestions on how to view the content?

    When I get messages from Barnes and Noble, the text is blank. If I hit reply or forward, I can then see the content. This only happens with Barnes and Noble. Any suggestions on how to view the content?

    I'm sorry, but your sister, unless she had already turned on the "Find my iPhone" feature and the person who took the phone has not disabled it, is out of luck. She should report the theft to local police authorities, including the serial number of her iPhone. While her experience is unfortunate, there are good reasons why Apple cannot do anything else about it.
    I hope she gets her phone back.
    Best of luck.

  • I recently bought a new i phone 4 as my other one had seen beter days and for the last sevral days have been trying to transfer my photos ect from my old phone to my new one after I've plugged my old iPhone into iTunes to back it up i then plug in my    i

    I recently bought a new i phone 4 as my other one had seen beter days and for the last sevral days have been trying to transfer my photos ect from my old phone to my new one after I've plugged my old iPhone into iTunes to back it up i then plug in my one to transfer it over I've had no luck I've tryed restoring my new phone to the last time i backed up my old files the phone restores but always to its own backup point wen i first connected it to iTunes can anyone help me please?

    Since this is the second computer you've had this problem with, I recommend you look for answers on the iPhone forum. My thinking is it is an iPhone issue rather than a computer issue (unless it is some software incompatibility).

  • I need a multiple message voice mail app for Iphone 4S that also provides an auto-attendant, e.g the caller can dial 1 for one of business's or 2 for the other. Each of these options will need to have a different voice mail greeting. Help please?

    I need a multiple message voice mail app for Iphone 4S that also provides an auto-attendant, e.g the caller can dial 1 for one of business's or 2 for the other. Each of these options will need to have a different voice mail greeting. Help please?

    There are no alternative voicemail apps - the core functionality of the phone can not be replaced.
    You'll have to look for an external service, that can then forward calls for each caller onto the correct phone.
    At our business we use Voipfone.co.uk which allows multiple phone lines to come into one VOIP account.

  • 2 users 1 computer one can connect to Store and Acct. the other can't

    usin windows XP Service Pak2, not using windows firewall. Using Norton 360. We have downloaded and installed iTunes 9.1 we each have separate computer user profiles, separate iTunes libraries and separate itunes/Apple ID's and accounts
    suggestions from Apple included checking for dowloads and entering Apple ID and Password and or doing MISCONFIG and checking configuration to allow iTunes/Apple through Firewall or other software. This isn't relevant to the situation. Please see my reply to Sandra at Apple Support. And I greatly appreciate any feedback or guidance:
    This has nothing to do with downloading. from my son's computer user profile (windows XP, Norton 360) when he tries to log into the store he gets a connection error, when he clicks on store and enters his apple ID and password he gets a connection error. when he enters his apple ID and click forgot password he gets a connection error. I understand about firewalls but my question is we share the same computer and everything works fine for me. it is one computer, with one firewall (Norton 360) why does iTunes work fine for me on my computer user profile but not for my son on the same computer?
    How could the firewall be an issue for one user but not another on the same computer? Since I can access iTunes store and my Apple account from the same computer stands to reason it is not a firewall/software problem. My account is on the same computer (but under my own profile) as my son's. everything works fine for me--- nothing on your server or attempting to connect to your server works for him. the fact that I can get to the Store, and to my apple account, and I can buy and download from my user profile on the same computer tells me it is not a firewall or other software issue
    do you have any other thoughts?
    thanks. R See my original support request below:Web Order # :
    Support Subject : Connecting to iTunes Store
    Sub Issue : Connecting with a computer
    See additional info below
    OS version: Windows XPSP2+
    Country: US
    iTunes version: iTunes 9.1
    iTunes account name:
    Specific request: I receive an error message when I try to connect to the iTunes Store
    Error message user experienced: Cannot connect to iTunes Store
    Details:
    I have checked my cables and connections, I have surfed to other site and Internet is working. I have 3 users with individual desktops and profiles. I am administrator. my son on his profile can access his library but cannot get to iTunes store to shop. we have shopped from this compter before.
    He gets an error saying cannot connect to store, connection timed out check your connection. so I downloaded and installed iTunes 9.1. On my profile I can access Internet, iTunes and itunes store. I ran iTunes diagnostic on my profile and though I am in the iTunes store and can shop on my profile the diagnostic on my profile indicates:
    Firewall Information
    Connection attempt to Apple web site was successful.
    Connection attempt to iTunes Store was successful.
    Secure connection attempt to iTunes Store was unsuccessful.
    The network connection timed out.
    Secure connection attempt to iPhone activation server was successful.
    Last successful store access was 2010-05-30 01:13:37.
    and
    ** External Plug-ins Information **
    No external plug-ins installed.
    iPodService 9.1.1.12 is currently running.
    iTunesHelper is currently not running.
    Apple Mobile Device service 3.0.1.0 is currently running.
    My son clicks the store on his profile and the store never opens he just gets the error indicated above.
    We do not use Windows Firewall. We use Norton 360

    A user account specific issue like this has me wondering if there's an issue with the iTunes preference files in your son's Windows user account, renee. (There's a different set of those in each different account. So a preference file issue can cause trouble in one user account but not another.)
    Even if you're not getting a -50, perhaps try the following document:
    [iTunes 9: "One Moment Please" or "Error (-50)" message when accessing iTunes Store|http://support.apple.com/kb/TS3288]
    (Adjusting the Parental control preferences should be done inside your son's Windows user account. The command line technique can be done from within either account.)

  • Executing sqlldr (sql loader) from java and returning the error code

    I'm wandering do sqlldr return any error code whenever it hit error while running in java.
    For example, if i run in command prompt using the command below,
    C:\ >sqlldr uid/pwd data=abc.dat control=abc.txt
    It might give me some indicator that error occurs such as
    SQL*Loader-601: For INSERT option, table must be empty. Error on table CURRENCY
    or
    SQL*Loader-500: Unable to open file (abc.txt)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    But when i run in java using the code below,
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("sqlldr uid/pwd data=abc.dat control=abc.txt");
    int exitVal = proc.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    it will only give me the same exitValue of 1(i presume its error) / 0 (i presume no error) instead of the details of the error.
    How can i get the exact error code/message if i were to execute it using java?
    Any solution?

    mg,
    I don't think user576271 wants the exit code, I think [s]he wants the error message.
    But wouldn't error messages from SQL*Loader be sent to the stderr stream, and not the stdout stream?
    In which case user576271 would need method "getErrorStream()" of class java.lang.Process, no?
    Good Luck,
    Avi.

  • Operating Windows 7 Home Premium, 2 user accounts. Running Firefox one user can stream audio and video, the other cannot. Can anyone help?

    Two accounts set up. One can stream audio and video using Firefox, the other account cannot. The account with cannot stream a/v is able to steam a/v using (gasp) MS Internet Explorer. Is there some setting I have screwed up?

    There are some compatibility issues between the latest Flash player and some Firefox add-ons or settings. Could you see whether anything in this article helps: [[Flash 11.3 doesn't load video in Firefox]].

  • Saving images on my database and calling the open file dialog

    i want to be able to save image in my database or alternatively save them on a file system. meanwhile i want to allow them choose the name of the image in the folder by using the win_api_dialog.open_file. My platform is win2000. do i need to add any other thing to this like a particular library or just anything. please i need this help urgently.database os is unix ware.

    Hello,
    You can do this without using library. Suppose you have a table with BLOB data type column and one form which has image box to display and store image boxes.
    Now by using READ_IMAGE_FILE read picture file. To write picture to file use WRITE_IMAGE_FILE. and
    if you want to give users open file dialogue box then use GET_FILE_NAME builtin.
    All the best.
    Adinath Kamode

  • Error while Image loading from database

    I'am using generic handler for loading Image from data bases. Its work fine when when I hardcode the ImageID in QureyString when call Handler. But it's giving errors of different type when I dynamically pass value to qurey string(from datatable).
    "There is already an open DataReader associated with this Command which must be closed first." 
    OR
    "There is already an open DataReader associated with this Command which must be closed first."
    here is a code of Handler
    public void ProcessRequest(HttpContext context)
    Int64 id = Convert.ToInt64(HttpContext.Current.Request.QueryString["adid"]);
    // dt = obj_dalayer.GetRecpDetailsByID(id);
    dt=GetRecpDetailsByID(id);
    if (dt.Rows.Count > 0)
    //context.Response.ContentType = "image/jpeg";
    context.Response.BinaryWrite((byte[])dt.Rows[0][2]);
    public DataTable GetRecpDetailsByID(Int64 reid)
    try
    obj_DB.Open();
    obj_sqlcmd = new SqlCommand("GetRecpDetailsByID", obj_DB.GetDBConnection());
    obj_sqlcmd.CommandType = CommandType.StoredProcedure;
    obj_sqlcmd.Parameters.Add(new SqlParameter("@rid", reid));
    obj_sqlda = new SqlDataAdapter();
    obj_dt = new DataTable();
    obj_sqlda.SelectCommand = obj_sqlcmd;
    obj_sqlda.Fill(obj_dt);
    return obj_dt;
    finally
    obj_DB.Close();
    And here is a HTML and ServerSide code on ASPX page of call handler.
    <img id="img2" alt="Image" runat="server" src='<%#"~/ImageReqHandler.ashx?adid="+Eval("ReID")%>' width="179" height="148" /
    I'm using Eval("ReID") to get ID of Image from datatable.

    Ayez,
    This is the VB forum, try it in the C# form.
    http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral
    However, there they will probably tell you that although your problem is C#, it is ASP.Net some programmers become scared if it is Web you know.
    Success
    Cor

  • When one window containing 1 tab is closed, the other window with several tabs closes also

    I have a set of web pages that reproducibly causes Firefox to act incorrectly. When Firefox is first started I click the "Restore previous desktop" button. Then I have 2 Firefox windows. The first to open has 6 tabs; the second has 1 tab. When I close the 2nd window (with 1 tab), it also closes Firefox completely with no error message. When I run Firefox again, "Restore" creates both windows exactly as they were before.
    I don't know yet if the actual URLs make a difference, but here they are anyway:
    '''''Window 1:'''''
    https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F%3Fshva%3D1%26ui%3Dhtml%26zy%3Dl&bsv=llya694le36z&ss=1&scc=1&authuser=0&ltmpl=default&ltmplcache=2&from=login#inbox
    http://branamsmile.com/gum/?gclid=CLepiIaAhqkCFVJ25QodSyk1nw
    http://www.google.com/search?hl=&q=root+viewsonic+g+tablet&sourceid=navclient-ff&rlz=1B3GGLL_enUS412US412&ie=UTF-8&aq=0&oq=root+viewsoni
    ***** NOTE THIS TAB IS PROBLEMATIC *****
    When I press Alt+D, Ctrl+C, and Ctrl+V it into this comment box, I get
    '''woot'''
    When I look at the actual contents of the web page being displayed, it is the verizon wireless rebate page:
    '''www.verizonwireless.com/rebates'''
    The page has definitely finished being rendered (the refresh icon is displayed after the url "woot"), but the URL does not match the page. The URL displayed is not even in its proper form (i.e., www.woot.com).
    Remember that this page was RESTORED by Firefox from a previous session. It is as if I was on that tab at verizon, tried to go to woot.com by typing "woot" (which would of course bring up a search rather than the web page), DIDN'T PRESS ENTER, and Firefox is duplicating that entire sequence.
    ********* END PROBLEMATIC *************
    chrome://foxtab/content/newTabMessage.html
    https://www.bankofamerica.com/Control.do?page_msg=signoff&body=signoff
    '''''Window 2:'''''
    http://www.freewaregenius.com/2011/06/01/the-best-freeware-file-manager-a-comparative-analysis/
    With this exact set of windows and tabs, as restored by Firefox in a brand new instance of it, double-clicking the red Firefox in the top left corner of the 2nd window causes both windows to close.
    I wish I could save this configuration so I could always reproduce the error, but I need my computer :)

    You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox Profile Folder that store session data.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox Profile Folder.
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    *http://kb.mozillazine.org/Multiple_profile_files_created

  • Image Loaded From Database not Visible in JLabel

    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    public class consqlimage
         public consqlimage()
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection con = DriverManager.getConnection("jdbc:odbc:dsn","sa","manshu");
                   Statement stat = con.createStatement();
                   ResultSet rs = stat.executeQuery("Select pic from t_image");
                   byte b[];
                   b = new byte[1000];
                   while(rs.next())
                        b= rs.getBytes("pic");
                   for(int a=0;a!=b.length;a++)
                        System.out.println(b[a]);
                   JFrame f = new JFrame();
                   ImageIcon i1 = new ImageIcon(b+"jpeg");
                   JLabel l1=new JLabel("january",i1,SwingConstants.LEFT);
                   f.getContentPane().add(l1);
                   f.getContentPane().setLayout(new FlowLayout(FlowLayout.LEFT));
                   f.setSize(500,500);
                   f.setVisible(true);
                   con.close();
              catch(Exception e)
                   System.out.println(e);
         public static void main(String args[])
              new consqlimage();
    }

    Any reason why you are adding the "jpeg" to the end of the byte array?
    You should only have to pass the byte array to the ImageIcon constructor.

  • How do I get the screensavers to stop loading from iphoto and remove the ones now in screensaver?

    How do I remove photos from screensaver and get them to stop importing from wherever in my computer they are importing from?

    Apple Menu / System Preferences / Desktop & Screen Saver. Select Screen Saver and click on what you want. There probably is a "slide show" selected.
    You can turn it off by setting Start After: Never.

  • When I get directions from Mapquest and click the "print" button, a new window opens but it is blank. How do I fix this? Thanks

    When I click the "print" button a simplified set of directions should pop up for me to print.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • I'm having two problems: a) the browser won't load unless I go through profile manager and at time it won't even load from there and b) the search bar won't search it does nothing as does some links like your link to live chat

    This has only started happening after my last firefox update. I tried a reinstall as well with no luck

    Wow that was really quick, thank you so much.  Im not sure at all which version it was because i said it was around 4 years ago he bought it.  I know it isn't under his username, since he's a PC person (ugh) so i know its probably registered to one of our actual names.  isn't there some way to look it up since we did register it, because I'm not even sure where the disks are from when we bought it (we've moved a lot and also have two storage lockers, i know i would have kept it with other disks) but my cd rom drive is actually broken on my computer as well ( i think it got stepped on and is now squished and won't eject or run disks.)
    So is there anyway they can look up that its registered to one of our names since we did register it when we bought and installed it, or do i really have to find the disk with some sort of proof of purchase (i know there would be no receipt after all this time)
    either way, ill do what you suggested to the best of my abilities and thank you so much for answering my questions, i can't even open the program as its incompatible and find out the info from that) so I'm in a bit of a pickle and your response was so thorough and it didn't seem to be posted long enough to even write a well researched response, thanks, all the best,
    sarucia

Maybe you are looking for

  • Error while executing store procedure

    we are using JSQLConnect jdbc driver 3.0 verson. When we trued to excute store procedures its giving error like com.jnetdirect.jsql.w: Stored procedures called with static parameters cannot return output parameter values, please use CallableStatement

  • Replicat Abendend on mapping tables

    Hello all, I´m having oracle goldengate 11.2.1.0.1 with uni-directional replication, running on RHEL 5.3 64bits and Oracle Database 11.2.0.3.0 on both nodes. Worked properly for a few weeks and today, the replication process abended with this error m

  • Yosemite: No Time Machine restore from Mavericks?

    Trying to restore some deleted events from the calendar. Those events were added and backuped with Mavericks. Now today I opened Time Machine in Yosemite but it won't let me select the older backups. I can only scroll back to backups made unter Yosem

  • Change log in Sandbox / Golden client

    Hi all, I want how to activate the change log (to view any configuration changes) in my development client (sandbox / golden client) ?? currently it is inactive in our system. I am not sure whether it is to be done by basis people. please help. regar

  • How to keep mails synchronized between two systems?

    Hello, I have a home iMac and will soon need to have a portable for occasions when I'm away from home. I suppose it would be easy to ensure identical environments by booting the portable system on a clone of the system disk of the home iMac. However,