Jasper report  for pdf and html

Hi friends I am Gopi
I am doing project in servlet and jasperreport in tomcat.
I save my path jasperreport for Html and Pdf reports.
when i click the jsp button Export to pdf and Export to Html,
I need to open this files in new pdf application and new browser window .
if(pdf1.equals("html"))
JasperExportManager.exportReportToHtmlFile(jasperPrint, path +"\\" + reportName + ".html");
     exporter = new JRHtmlExporter();
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
          exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
          exporter.exportReport();
     if(pdf1.equals("pdf"))
          System.out.println("PDF");
          response.setContentType("application/pdf");
          JasperExportManager.exportReportToPdfFile(jasperPrint,path +"\\" + reportName + ".pdf");
          exporter = new JRPdfExporter();
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
          exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
          exporter.exportReport();          
pls help me...

gopikannang wrote:
when i click the jsp button Export to pdf and Export to Html,
I need to open this files in new pdf application and new browser window . Use the target attribute of the <form> or the <a> element which opens the PDF file. Set its value to "_blank".
Learn HTML. There is a nice tutorial at w3schools.com and a good specification at w3.org.

Similar Messages

  • Information broadcasting in 2004s for pdf and HTML format throws error

    hi experts,
    I am broadcasting via e-mail, when i use output format as MHTML or XML it works fine, when i change the output format to pdf or html (as zip file) i get the following errors
    <b>For PDF</b>
    --><b><i>Settings ZTEST1 were started from the BEx Broadcaster  </i></b>
            --><b><i>Processing for user BSHKSC, language EN  </i></b>
                    --><b><i>Processing setting ZTEST1</i></b>  
                              Error: com.sap.ip.bi.base.exception.BIBaseRuntimeException 
                              Error occurred during processing of framework class
                              CL_RSRD_PRODUCER_PRECALC, type PROD  
    <i><b>FOR HTML</b></i>
    --><i><b>Settings ZTEST1 were started from the BEx Broadcaster</b></i>  
           --><i><b>Processing for user BSHKSC, language EN </b></i> 
                 --><i><b>Processing setting ZTEST1</b></i>  
                     Web template 0BROADCAST_INDEX_PAGE could not be intstantiated
                      Error occurred during processing of framework class 
                      CL_RSRD_PRODUCER_PRECALC, type PROD
    Anyhelp will be really appreciated

    Hi Guus,
    We are not using the new authorizations we are still  on 3.5 authorization and we tried for an user with SAP_ALL, SAP_NEW authorization , so i am not sure if this is an authorization problem.
    We have a new issue on hand, initially i was able to broadcast thru xml,mhtml, xml formats, yesterday our portal was down, when the portal was brought up, i found that even the ones that were working were  now throwing an error.
    I spoke with the basis person, and he told me user mappings were lost, but even after restoring the user mapping were restored we still have the problem.
    If this error is caused by lack of new authorization, atleast we know what we are dealing with, but for now iam not sure if this error is due to authorization or some settings on the web server side.
    Message was edited by:
            shiva k

  • How to read text from PDF and HTML

    I have got solution to read text form .txt file but did'nt get code for PDF and HTML.
    I dont want to convert PDF to txt.
    Please help me ...

    reading from a file is always the same. using the same strategy used for a .txt will allow you to read a .pdf file.
    Offcourse in itself it will be useless becuase pdf files have a special internal structure.
    html files are identical to txt files.
    What are you trying to accomplisch with the files you are reading ?

  • How to read data from PDF and HTML  file

    I have got solution to read text form .txt file but did'nt get code for PDF and HTML.
    I dont want to convert PDF to txt.
    Please help me ...

    ah crap i could have guessed there would be a crosspost only the forum in where the crosspost is made is abit funny
    To OP: DO NOT CROSSPOST
    http://forum.java.sun.com/thread.jspa?threadID=5267875&tstart=0

  • I am in the process of expanding a database of chemistry journal articles.  These materials are ideally acquired in two formats when both are available-- PDF and HTML.  To oversimplify, PDFs are for the user to read, and derivatives of the HTML versions a

    I am in the process of expanding a database of chemistry journal articles.  These materials are ideally acquired in two formats when both are available-- PDF and HTML.  To oversimplify, PDFs are for the user to read, and derivatives of the HTML versions are for the computer to read.  Both formats are, of course, readily recognized and indexed by Spotlight.  Journal articles have two essential components with regards to a database:  the topical content of the article itself, and the cited references to other scientific literature.  While a PDF merely lists these references, the HTML version has, in addition, links to the cited items.  Each link URL contains the digital object identifier (doi) for the item it points to. A doi is a unique string that points to one and only one object, and can be quite useful if rendered in a manner that enables indexing by Spotlight.  Embedded URL's are, of course, ignored by Spotlight.  As a result, HTML-formatted articles must be processed so that URL's are openly displayed as readable text before Spotlight will recognize them.  Conversion to DOC format using MS Word, followed by conversion to RTF using Text Edit accomplishes this, but is quite labor intensive.
      In the last few months, I have added about 3,500 articles to this collection, which means that any procedure for rendering URL's must be automated and able to process large batches of documents with minimal user oversight.  This procedure needs to generate a separate file for each HTML document processed. Trials using Automator's "Get Specified Finder Items" and "Get Selected Finder Items", as well as "Ask For Finder Items"  (along with "Get URLs From Web Pages") give unsatisfactory results.  When provided with multiple input documents, these three commands generate output in which the URLs from multiple input items are merged into a single block, which yields a single file using "Create New Word Document" as the subsequent step.  A one-to-one, input file to output file result can be obtained by processing one file at a time, but this requires manual selection of each item and one-at-a-time processing. What I need is a command that accepts multiple input documents, but processes them one at a time, generating a separate output for each file processed.  Is there a way for Automator to do this?

    Hi,
    With the project all done, i'm preparing for the presentation. Managed to get my hands on a HD beamer for the night (Epason TW2000) and planning to do the presentation in HD.
    That of course managed to bring up some problems. I posted a thread which i'll repost here . Sorry for the repost, i normally do not intend to do this, but since this thread is actually about the same thing, i'd like to ask the same question to you. The end version is in AfterEffects, but that actually doesn't alter the question. It's about export:
    "I want to export my AE project of approx 30 min containing several HD files to a Blu Ray disc. The end goal is to project the video in HD quality using the Epson  EMP-TW2000 projector. This projector is HD compatible.
    To project the video I need to connect the beamer to a computer capable of playing a heavy HD file (1), OR burn the project to a BRD (2) and play it using a BRplayer.
    I prefer option 2, so my question is: which would be the preferred export preset?
    Project specs:
                        - 1920x1080 sq pix  (16:9)
                        - 25 fps
                        - my imported video files (Prem.Pro sequences) are also 25 fps and are Progressive (!)
    To export to a BRD compatible format, do i not encounter a big problem: my projectfiles are 25 fps and progressive, and I believe that the only Bluray preset dispaying 1920x1080 with 25 fps requests an INTERLACED video  (I viewed the presets found on this forum, this thread)... There is also a Progr. format, BUT then you need 30 fps (29,...).
    So, is there one dimension that can be changed without changing the content of the video, and if yes which one (either the interlacing or the fps).
    I'm not very familiar with the whole Blu-ray thing, I hope that someone can help me out."
    Please give it a look.
    Thanks,
    Jef

  • Report Type for pdf and Excel

    I have following code to generate the report for pdf format.
    I would like to let users to choose report type 'pdf' or 'excel'
    I need pass the user select from user interface to <cfreport format= "PDF" or "Excel".
    Can you please advise how I can pass the user select Report Type from lsReportType to my cfReport?
    Your help and information is great appreciated,
    Regards,
    Iccsi
    <cfstoredproc procedure="spGetReportType">
       <cfprocresult name="rsReportType" resultset="1">
    </cfstoredproc>
    <cfreport format = "PDF" template= "MyReport.cfr" query="#myQuery#">
       </cfreport>
    <td><select width="50" name="lstReportType" id="lstReportType">
          <cfoutput query="rsReportType">
             <option value="#rsReportType.ReportTypeID#" <cfif (isDefined("form.ReportTypeID") AND form.ReportTypeID EQ rsReportType.ReportTypeID)>selected="selected"</cfif>>#rsReportType.ReportType#</option>
           </cfoutput>
         </select></td>

    Change format="PDF" to format="#VariableName#" where VariableName contains the text "PDF" or "Excel".

  • How to generate jasper report in pdf format using swing

    hi all,
    im new to swing and jasper.. can anybody provide me some example on how to generate the jasper report in pdf format? i will call the reportManager from sessionBean.. below is my code:
    1)delegate:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    GenerateReportDto generateReportDto = getAuditTrailServiceRemote().generateIntoPdfReport(fileName, outputFileName, parameters);
    return generateReportDto;
    2)sessionBean:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    //Map parameters = new HashMap();
    ReportManager reportManager = new ReportManager();
    3)ReportManager()
    public void generateIntoPdfReport(String fileName, String outputFileName, Map parameters) {
              Connection conn = null;
              try {
                   conn = dataSource.getConnection();
                   //Generate the report to bytes
                   File reportFile = new File(fileName);               
                   byte[] bytes =
                        JasperRunManager.runReportToPdf(
                             reportFile.getPath(),
                             parameters,
                             conn
              //conn.close();
              //Write the bytes to a file
              ByteBuffer buf = ByteBuffer.wrap(bytes);
              File file = new File(outputFileName);
              // (if the file exists)
              boolean append = false;
              // Create a writable file channel
              FileChannel wChannel = new FileOutputStream(file, append).getChannel();
              // Write the ByteBuffer contents; the bytes between the ByteBuffer's
              // position and the limit is written to the file
              wChannel.write(buf);
              // Close the file
              wChannel.close();
              } finally {
                   if (conn != null) {
    conn.close();
    Any help would be highly appreciated. Thanks in advance

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

  • Generate pdf and html(urgent)

    can anybody tell how to generate pdf and html from a single report,
    thanks in adv

    From a single report, you can generate outputs to html, htmlcss, pdf, rtf, XML and text formats.
    If you use rwclient, rwrun or rwservlet methods, specify desformat=pdf/html and the destination file name in desname command line parameters.
    If you use Reports Builder, open a report, select File->Generate to file and select html/pdf. Then give the file name.
    For more details, Refer to Reports Tutorial / Publishing Reports document from this site.
    http://otn.oracle.com/docs/products/reports/content.html
    Thanks,
    The Oracle Reports team

  • Converting report to PDF and mailing

    Hi every one,
    I've gone through various threads and i'm aware of the Functional module's used to
    convert the report to pdf and mail it back.Like CONVERT_OTFSPOOLJOB_2_PDF, CONVERT_OTF_2_PDF and for mailing we have SEND_NEW_DOCUMENT_ATT_SEND_API1.
    I've worked with this but my problem is i'm not able to convet the report output to pdf.When i'm doing this i'm getting the output of my functional module converted to pdf like the number of header and item records available for the given data in the selection screen.
    Since all the threads i've gone through is converting the single internal table which has the output to pdf.
    But i've got the REUSE_ALV_HIERSQL_LIST_DISPLAY, hierarchial report which as known has got two internal tables.How to the same to this kind of report....More over is it possible to convert report to pdf in online without transfering it to spool and getting the spool id to convert it to pdf.........
    Any help or suggestions will surely be rewarded......
    Thanks in Advance.....

    Here is the complete code for you;
    It Converts spool request into PDF document and emails it.
    <b>http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm</b>
    Regards,
    Vishal

  • A working method to load local PDF and HTML files on iOS

    I had a lot of trouble getting this to work, and I'm hoping this post saves someone time. Some of the information that's been posted in other locations is either wrong, incomplete, or might only work on Android. By the time you read this message the information here may no longer be accurate, so here's the testing environment:
    Window 7
    Flash CS 5.5.0
    AIR 2.7.0.19530, which was compiled on June 28, 2011
    iPad 1, version 4.3.5 of iOS
    Let's get started.
    On iOS, you load external PDF and HTML files using the StageWebView class.
    On Windows, StageWebView works but the HTMLLoader class is a better choice if you're creating a desktop app.
    You can also load HTML files by reading in the file's text. The information in this post is only for loading external HTML files.
    StageWebView will not load a file that's in File.applicationDirectory. All files bundled in your app are placed in File.applicationDirectory, which means you'll have to copy any external file you wish to load with StageWebView to another directory.
    So where can you copy your file? File.applicationStorageDirectory won't work. File.documentsDirectory does work.
    Several people have recommended copying to a temporary file using File.createTempFile(). This works, but there's a catch: it seems that, like Windows, StageWebView relies on a file's extension when determining how to load it. When you create a temporary file on iOS using File.createTempFile(), the file will have no extension (and on Windows, File.createTempFile() creates a file with the extension .tmp, which is equally problematic).
    The solution to the file extension problem is to rename the temporary file by appending the original file's extension. AIR currently does not have a <file>.rename() function, so you'll have to do it using <tempFile>.moveTo().
    Here's some code I've successfully tested several times on both iOS and Windows. The file is copied to the temp directory. The file's extension is restored by just slapping the original file name to the end of the temp file.
            private function loadExternalFile():void
                var webView = new StageWebView();
                webView.stage = this.stage;
                webView.viewPort = new Rectangle( 0, 0, 1024, 555 );
                // Works with either html or pdf files.
                // These are stored in the root of the application directory.
                var fileName:String = "euei.pdf";
                //var fileName:String = "euei.htm";
                var sourceFile = File.applicationDirectory.resolvePath( fileName );
                var workingFile = File.createTempFile();
                try
                    sourceFile.copyTo( workingFile, true );
                    // You have to rename the temp file
                    var renamedTempFile:File = workingFile.resolvePath(workingFile.nativePath + fileName);
                    workingFile.moveTo(renamedTempFile, true);
                    webView.loadURL( renamedTempFile.url );
                catch (err:Error) { }

    I tried this with Flash CS5.5 and AIR 4.0 SDK. Any pdf loaded simply fills the viewPort with black. Also tested with a png version of the pdf and that displayed just fine.
    What's the purpose of copying to a temp work file? I found that webView.loadURL( sourceFile.url ); gave me the exact same results.
    Any ideas?
    Thanks!

  • Photosmart C6180 prints too many copies of PDFs and HTML-documents

    Hi,
    My Photosmart C6180 prints multiple copies of documents even if I haven't asked for it. This seems to only apply to PDFs and HTML-documents, I haven't seen it happen with Word/Excel. It's not consistent, it happens most of the time but now always for these documents. When I look at the console, when it has started printing I see shortly the status "Printing - Restarting". That's probably when it starts the 2nd copy. Sometimes it stops by itself, other times it seems to be looping and I have to turn the printer off and delete the document from the queue.
    HP solution center SW is updated, I run Vista with latest service packs on a Thinkpad T400s.
    Any ideas?
    Thanks!

    My C6180 printed multiple copies of any document from my Vista OS laptop ( wireless connection ), but not from my
    XP OS desktop ( USB connection), even though I selected 1 copy on the print menu. Unchecking "Enable bidirectional support" in the Properties / Ports dialog box solved the problem. Hope this helps someone too.

  • Simulair report for FBL5N and FBL1N for new general ledger on segment level

    We are working with segments in new G/L ledger. We want to run a open item report where we can combine customers and vendors by segment. The vendors and customers are linked in the master data. In the "old"  reports FBL5N and FBL1N you can do this but not by segment.I found the following report on segment level:
    - S_PCO_36000218 - Receivables: Segment
    - S_PCO_36000219 - Payables: Segment
    What I'm missing is to run 1 report for Customers and vendors. What I'm missing to is that there are only some fields available on line item level. (I like to have invoice number, documentype,.......)
    Is there a standard report for this in new genaral leger?
    Is it possible to ad additional field to th list viewer.

    What is this user license type?  All financial transactions need professional license.
    Thanks,
    Gordon

  • Custom Report for slow and fast moving items

    Dear Xperts,
    My client wants to develop a new report for slow and fast moving items, I checked the std report MC46 however as per std SAP design this report does not consider the special stock like project stock (Q)...could you please help me to know how can develop this new report with following input and output fields?
    Input fields:
    Plant
    Material
    Material Group
    MRP Area
    Special Stock Indicator
    Special Stock (Type)
    Output Fields:
    Material
    Material type
    Material group
    MRP Controller
    MRP Area
    ABC indicator
    Material price
    Category field – Slow, Fast, Non-moving
    Current Stock
    Last Issue Date
    Thanks in Advance
    Regards
    Rahul

    Dear Rahul,
    If you required  project stock and consignment stock with valuated stock report in same place you need to generate new info structure as given below link. Or you can go with customized report with abaper.
    Info structure validation
    Regards
    Sanjeet Kumar

  • Document or report for assessment and reversed assessment?

    Hi guyz,
    Is there any document or report for assessment and reversed assessment?
    I need to find documentation as a proof for any execution and reversal of assessment, such as journal entry or report line items that is showing debit or credit for the expenses..
    Currently, I can only see actual cost document which shows execution of assessment and an assessment cost element debit and credit in the Cost Center Actual/Plan/Variance report.
    However, when I do reversal at KSU5, in the Cost Center A/P/V report is showing that assessment cost element is still exist (no more debit and credit showing as the result of the reversal), only that the value is now zero.
    Need your answer asap...Thanking you..

    Dear Meila,
    Use tcode KSB1 Cost Center Actual Line Itens, execute then report and change the Layout, insert the field Business Transaction in the report.
    Regards

  • Is there standard report for planned and actual devlivery date?

    Hi Guru,
    Could you help me to find standard report to compare planned delivery date in PO and actual delivery date (GR Posting date)?
    I wonder, Is there standard report for planned and actual delivery date?
    or I have to create a customizing report.
    Thank you very much.

    hi
    i dont think it is possible to see both in one pan so try to create some Z report
    u try ME80fn here u have to change the views ,in del shedule view u can see the delivery dtae and in PO histry view u can see the posting date
    regards
    kunal

Maybe you are looking for

  • Recent Workflow Version not active in Production server

    Hi Gurus, Recently, I made a  minor change to an existing workflow. After the changes, it was transported to QA and Production. In QA, the changes are reflected and when I click on the version overview tab of the workflow, I can see that my last chan

  • Using Bridge to Camera Raw to Open Image button also drop shadow problems

    I remember when I was working with RAW in PSE 8. I would be in Bridge looking at a pic and double click on it. PSE 8 would open in Camera RAW and I could play with the pic a bit, make some adjustments, then click on OPEN IMAGE. When I did that it wou

  • This phone is new to me.  How do I download my pictures - Gallery - to my pc?

    This Galaxy III is new to me.  How to I transfer pictures - Gallery - to my PC.  I have over 500 now and can't get them over. 

  • Internal Order vs Project System

    Hello expert, as you all know the function of WBS Element, Internal Order and Cost Center are similar. My question is what kind of environment that made us decide to us WBS element rather than internal order or cost center? Thanks

  • Simple Bar Chart

    Post Author: millerka CA Forum: Charts and Graphs I hope someone can help i am trying to create a simple bar chart (well at least it is simple in excel) I have generated averages using formulas for a series of data and these formulas are in my GF1 i