See my code that no me error after complied but not give me pdf result and

hi master
sir i use this code for create the pdf
ExternalContext econtext = getExternalContext();
InputStream stream = econtext.getResourceAsStream(PREFIX);
try {
JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet());
JasperPrint jasperPrint = null;
jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
JRExporter exporter = null;
HttpServletResponse response = (HttpServletResponse)econtext.getResponse();
FacesContext fcontext = FacesContext.getCurrentInstance();
exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,
response.getOutputStream());
exporter.exportReport();
fcontext.responseComplete();
} catch (Exception ex) {
log(" Error Description" , ex);
error("Error counting rows: " + ex.getMessage() );
error("Error counting rows: " + ex ); }
sir this code not give any error but also not create /display the pdf
i try to find the where problem occurred i get textfiled and send some value after one by one line
like is this
first time try
JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet());
textField2.setValue(PREFIX);
is given me right result and show /WEB-INF/reports/mfa.jasper in textfield2
second time
jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
          textField2.setValue(PREFIX);
when i press button second time this time page not give me result in textfield2 and show blank it means
only this line have error but what i could not foud out jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
use see my code and give me idea or solution of my problem
thank�s
aamir

I found and easier way to do it and wrote it up here: http://developers.sun.com/jscreator/learning/tutorials/2/reports.html

Similar Messages

  • Why i can't see any image on flickr. That happens most of the times but not always? Both Safari and Firefox

    Why i can't see any image on flickr.
    That happens most of the times but not always?
    Both, on Safari and Firefox i experience the same problem!
    I reseted Safari but seems to be useless

    You can use these steps to check if images are blocked:
    *Open the web page that has the images missing in a browser tab.
    *Click the website favicon ([[Site Identity Button]]) on the left end of the location bar.
    *Click the "More Information" button to open the "Page Info" window with the Security tab selected (also accessible via "Tools > Page Info").
    *Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    *Select the first image link and scroll down through the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • See my code that i use for user login but my code not give me result

    sir i use oracle with vwp in netbeans 6.1
    i want creat a user login form
    i drop three textfield and one button
    in button i use this code for finding the user in database but this code not me result that go to catch (Exception e) all field in database is string
    public String button1_action() {
    try {
    RowKey userRowKey = luserDataProvider.findFirst
    (new String[] { "luser.username", "luser.pwd" },
    new Object[] { textField1.getText(), textField2.getText() });
    if (userRowKey == null) {
    textField3.setText("fahim");
    error("Invalid user id or password");
    return "case1";
    } else {
    textField3.setText("aamir");
    return "cust";
    catch (Exception e) {
    log("Cannot perform login for userid " + textField3.getText(), e);
    error("Cannot perform login for userid " + textField3.getText() + ": " + e);
    textField3.setText("NOOOO");
    return null;
    please give me idea how i find record from database
    thank you
    aamir

    These are user-to-user forums, you are not talking to Apple here - so I've asked the hosts to remove your email address from your post.
    The security code is the 3 or 4 digit code on your credit card, it's quite often on the back of the card on the signature strip, though on some cards it's on the front : credit card security code.

  • I have a java code that expires user sessions after 30 min.But the session does not expire in Firefox version 4 where as it expires in all previous versions

    I have a java code that expires user sessions after 30 min.But the session does not expire in Firefox version 4 where as it expires in all previous versions

    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • When tried to upgrade iphone 4S from 8.1.2 to 8.1.3 it crushed at the middle, after it it not let it tern on and cannot make recovery and crush in the middle of the process with "could not be restored. An unknown error occurred (3014)"

    When tried to upgrade iphone 4S from 8.1.2 to 8.1.3 it crushed at the middle.
    After it it not let it tern on and cannot make recovery and crush in the middle of the process with "could not be restored. An unknown error occurred (3014)"

    Hi bahaluly,
    Thanks for using Apple Support Communities. Based on what you stated, it sounds like you are not able to update the iPhone. I would recommend that you read this article, it may be able to help the issue.
    Get help with iOS update and restore errors - Apple Support
    Solve network errors
    Related errors: 17, 1638, 3014, 3194, 3000, 3002, 3004, 3013, 3014, 3015, 3194, 3200, or "There was a problem downloading the software," or "The device isn't eligible for the requested build." These alerts mean that your computer is either having difficulty contacting the Apple update server or communicating with your device. 
    Check your computer for software or settings that might cause communication issues between your computer and Apple or between your computer and your device.
    Cheers,
    Mario

  • When i connect my ipod shuffle orange light blinks 4 times.. but after that it wont response.. it is not recognized by my computer and by i tunes as well.. after hours of charging it doesnt charge.. help me please????

    helpwhen i connect my ipod shuffle orange light blinks 4 times.. but after that it wont response.. it is not recognized by my computer and by i tunes as well.. after hours of charging it doesnt charge.. help me please????

    Even i have a same problem...

  • When i connect my ipod shuffle orange light blinks 4 times.. but after that it wont response.. it is not recognized by my computer and by i tunes as well.. after hours of charging it doesnt charge.. help me please???? iPod shuffle

    helpwhen i connect my ipod shuffle orange light blinks 4 times.. but after that it wont response.. it is not recognized by my computer and by i tunes as well.. after hours of charging it doesnt charge.. help me please????
    iPod shuffle

    Even i have a same problem...

  • In trying to edit a track - I want to "Delete and Move" the track to automatically fill the area that I deleted - However, after selecting a section to delete - the "Delete and Move" option is grayed out. How do I fix this?

    In trying to edit a track - I want to "Delete and Move" the track to automatically fill the area that I deleted - However, after selecting a section to delete - the "Delete and Move" option is grayed out. How do I fix this?

    Thank you for your attempt to help me. I appreciate that.
    I think I figured out how to fix it-
    I found that if I only delete a small amount at the beginning and at the end of the section that I want to remove - and then highlight that section - Then (and only then) does the "Delete and Move" function work to remove the unwanted section and automatically close the gap between the surrounding sections. I was trying to select a whole section and could only delete it - and then manually move it.
    Problem solved.

  • Hello, I encounter a difficulty for activated my lightroom software. I bought the software online in a few months ago and have changed computers, so I reinstall again mias the activation code that I received during my acaht of not working. (attached). Can

    hello,I encounter a difficulty for activated my lightroom software.I bought the software online in a few months ago and have changed computers, so Ireinstall again mias the activation code that I received during my acaht of not working.(attached).Can you help me please

    Call Apple Customer Relations - 1-800-275-2273.  Ask politely & firmly that you want to be transferred to Customer Relations.  Tell them exactly what you stated in your post.
    GOOD LUCK!
    These are user-to-user forums where everyday folk (volunteers) post questions and offer answers (technical support) to each other.  

  • HT1657 I have rented a movie on Itunes, it says i must download it, so i click to download it and all it does is say 'accessing Itunes store' and thats it, it says after downloading, check your purchased movies, i check, and nothing is there, please help?

    I have rented a movie on Itunes, it says i must download it, so i click to download it and all it does is say 'accessing Itunes store' and thats it, it says after downloading, check your purchased movies, i check, and nothing is there, please help?

    Did you make sure that your security software is not blocking the contact to Apple servers? iTunes for Windows: Troubleshooting security software issues

  • Printer just started feeding a blank page after some, but not all printed documents

    Printer just started feeding a blank page after some, but not all printed documents

    Hi @cam21 ,
    I understand that you are having issues printing, after some documents you are getting blank pages. I would be happy to help you.
    I would do a hard reset to see if that will resolve the issue.
    Leave the printer on and unplug the power cable from the printer and wall outlet for 60 seconds.
    Then reconnect the power cable to the printer and wall outlet rather than a surge protector.
    This ensures the printer is receiving full power and may help this situation.
    What application are you printing from?
    It may be a setting in the application.
    Does this happen from all applications?
    Download and run the Print and Scan Doctor. It will diagnose the issue and might automatically resolve it. http://www.hp.com/go/tools>Using HP Diagnostic Tools for HP Printers in Windows.
    How is the printer connected? (USB/Ethernet/Wireless)
    What were the results when you ran the Print and Scan Doctor? (did it print or scan, any error messages)
    If there is anything else I can help you with, just let me know.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Error : Excise modvat accounts not defined for GRPO transaction and U1 exci

    I have Created Impot PO, After Planned Delivery cost MIRO I am trying to Perform GR then its giving Error "Excise modvat accounts not defined for GRPO transaction and U1 excise group
    Message no. 8I402"
          I have already maintained GL account in "Specify G/L Accounts per Excise Transaction" for Excise group U1
          This problem is coming when Additional Duty on custom condition type JADC is maintained in "Maintain Excise Defaults" node in the column "ADC Cond" . If I remove JADC condition type from this place the this error is not coming but AED column is not fetching any value while doing GR.
    Please help me in this issue , still No answer
    Edited by: shiwanshu singh on Jan 28, 2009 10:26 AM

    Dear sir
    For GRPO have you maintained sub transaction Type IP for your excise group U1. If you not maintained pl maintain . and assign G/L account to modvat clearing account , the G/l account should be same as company code CVD account.
    Regards
    jrp

  • Error in Solaris but not in Windows

    I have an application that is reading from a database, cleaning the results of all html tags, and writing to a new database. It all works fine on a Windows machine with jdk1.3. However, it throws the error I have attached to the message on the Solaris box. It has to do with the html cleaning. When I take it out, it works on both machines. Why though. Here is the code for the html cleaning and the error: 5 Dukes to whoever can help.
    Code:
          * Removes the html formatting for a string and stores it in a file
          * @return java.lang.String
          * @param htmlText java.lang.String
          * @param outputText java.lang.String
         public static String removeHtml(String htmlText) throws IOException     
              String returnValue = "";
              EditorKit kit = new HTMLEditorKit();          
              Document doc = kit.createDefaultDocument();          
              // The Document class does not yet handle charset's properly.          
              doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);          
              try          
                   // Create a reader on the HTML content.     
                   Reader rd = new StringReader(htmlText);
                   // Parse the HTML.               
                   kit.read(rd, doc, 0);               
                   //Write the cleaned text to file
                   //writeOutputFile(doc, outputFile);     
                   //Set returnValue to cleaned text
                   returnValue = doc.getText(0, doc.getLength()).toString();
              catch (Exception e)          
                   e.printStackTrace();          
              return returnValue;
         }Error:
    java.lang.NoClassDefFoundError: sun/awt/motif/MToolkit
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:142)
    at java.awt.Toolkit$2.run(Toolkit.java:533)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:524)
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1179)
    at java.awt.EventQueue.isDispatchThread(EventQueue.java:534)
    at javax.swing.text.StyleContext.reclaim(StyleContext.java(Compiled Code))
    at javax.swing.text.StyleContext.reclaim(StyleContext.java(Compiled Code))
    at javax.swing.text.AbstractDocument$AbstractElement.finalize(AbstractDocument.java(Compiled Code))
    at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
    at java.lang.ref.Finalizer.runFinalizer(Finalizer.java(Compiled Code))
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java(Compiled C

    Here is the code where I am calling the html cleaner method. This works fine in a Windows env but fails in Solaris. If I comment out the call to removeHtml(value).trim it will work. It will even work if I make a different call removeHtml("string to strip") from the main method. Why would it work in one place but not the other in Solaris, and why would it always work in Windows? Does anybody have any ideas?
               while (rs.next ()) {
                    for (int i = 1; i <= columnCount; ++i) {
                        String value = rs.getString (i);
                        if (rs.wasNull ()){
                            value = "<null>";
                        String columnName = rsmd.getColumnName(i).trim();
                        if(clean&&(columnName.equalsIgnoreCase("DESC")
                                  ||columnName.equalsIgnoreCase("HEADER")
                                  ||columnName.equalsIgnoreCase("TEXT")))
                             //Clean the text
                             //value = removeHtml(value).trim(); //remove html markup
                             value = value.replace('\n', ','); //remove new lines
                             value = value.replace('\r', ','); //remove carriage returns
                             value = replaceString(value, "&mdash", "-"); //remove dash markup
                           outputBuffer.append (value.trim());                      
                        outputBuffer.append ("||");
                    outputBuffer.append ("{{NEWLINE}}");
                }

  • On my iPad I can see in mail only the headlines of the mails but not the text - why?

    On my iPad I can see in mail only the headlines of the mails but not the text - why?

    Try closing the Mail app completely and see if the text shows when you re-open the Mail app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot

  • HT204053 when I attempt to log in to my i Cloud account I get a message that my Apple ID is valid but not an iCloud account.How do I log in?

    When I try to log in to iCloud I get a message that my Apple ID is valid but not an iCloud account.How do I log in?

    Hi reswaikiki,
    Usually if it says your Apple ID is not an iCloud account, that means you have not yet enabled your Apple ID as an iCloud account.  So you did set it up correctly on your iPod touch?
    If not yet, please see Set up iCloud on all your devices.
    ivan

Maybe you are looking for

  • K8N Neo2 and X2 4800+ HT frequency?

    Recently upgraded to the X2 4800+ processor, everyhting works fine. However, I saw somewhere that the HT bus on this guy is 2000 MHz, but the bios only has a 5X multiplier for the HT bus (ie 1000 MHz). Is this a limitation of the nforce 3 chipset or

  • GR/IR Month end Accrual calculation

    Hi All, I have an open PO for which i need to find accrual amount for the current period.In the current period i have the list of GR and IR for which i need to find/calculate what amount yet to be invoiced for items for which already GR done.How can

  • Upgrades in Full Infrastructure Mode

    Hi there I've been considering the Upgrade scenario for an application. To my knowledge this was handled better in App-V 4.6 but I would be very happy to be corrected. My question comes in 2 scenarios.  Scenario A: We have an application (EG: Chrome

  • Can we implement SAP with SD, MM, PP WITHOUT FI?

    Hi All, Can we implement SAP MM, SD & PP without SAP FI? If so, how? Please help me Thanks Edited by: sk mukka on Feb 9, 2011 1:54 PM Edited by: sk mukka on Feb 9, 2011 2:19 PM

  • Can we do Internal order budget at period level

    Hi Can we do Internal Order Budget at Period level ? if yes, please let me know how can we do budget at period level. Appreciate your help. Regards, Kishore Moderator: Please, search SDN