Create crystal report file using JAVA

Can someone tell me how to a Create crystal report file using JAVA Programming
I want a very simple example

Please help me. It's urgent.[http://catb.org/~esr/faqs/smart-questions.html#urgent]
Be back in an hour or two...

Similar Messages

  • Creating crystal report file dynamically.

    Post Author: malcomstewart115
    CA Forum: General
    Hi, everybody.
    I have one problem.
    How to create crystal report file(*.rpt)  in php dynamically.
    I mean, I want to create the "*.rpt" file with php code.
    Please help me. thanks everybody.

    Post Author: PWilkens
    CA Forum: General
    It sounds like you're defeating the power and purpose of Crystal Reports, or replace it with pure PHP (which I suppose could be done... but why?)
    What exactly are you trying to do?
    If you're trying to make certain parts of the report hide or reveal or change depending on variables settings in the PHP file, that's easy enough to accomplish by sending parameters with your PHP values into the report.  But the dynamic actions really need to be done within the report itself, accomplished through ample use of the section and field settings provided within the Report Designer.

  • I need to create  .pst  ext . file using java,whi will import in ms outlook

    {color:#ff0000}*I need to create .PST extension file using java which will be able to import in ms outlook,and that .pst file will contain root folder (like Personal Folders) and inbox,sent mail*{color}
    give me some hint It is essential task .we have to implement code in  java

    I'm using the thin drivers.
    The answer to your question is no, you do not need to create a DSN to connect to Oracle. The Oracle thin driver is all that is required. Your code looks OK to me, I'm assuming that you xxx'd out the IP, and that you are using a real IP in the actual code.
    The message you got back is pretty generic, but can indicate that the Oracle database listener isn't available. Perhaps the database is on a different port, or perhaps the listerner isn't running. Perhaps you have the IP address wrong.
    So, to be very basic:
    1) Can you ping the server you are trying to connect to? This makes sure you are using a valid IP address.
    2) Can you connect to the Oracle server from an Oracle client? This makes sure the listener is running properly, and that you know the correct port number and login information (The port number could be in a local or server based TNS file, or available through an Oracle names server. You might try using the program tnsping if it is available on the client for validation.
    3) If you can do 1 and 2, then be sure you are using the same connection parameters (server, port userid and password) that worked with 2.
    4) Verify that you are using (pointing to) the correct set of Oracle classes for the thin connection. This can be tricky if you have different versions of Oracle on the client then on the server, but is documented on the Oracle website.
    5) If everything checks out, you might want to verify that you are using the most recent versions of the thin drivers, including the Oracle patches.
    Hope it helps - good luck,
    Joel

  • Create Crystal Report Dynamically using XML based design metadata

    Hi,
    I have a CR Report Development environment. Please refer to workflow and requirement description below;
    I have a Java application(Report Customization Tool), which allows users to dynamically select structure and content for a report.
    The process goes as follows:
    1. In Java Application, user first gets option to select Report Header, Page Orientation, Font etc for master report.
    2. User can select a sub-report (pre-developed report frames. Not Sure about tool.) and apply the same format option (mentioned in step 1, except orientation) to it.
    3. User can select individual row/data cell to be displayed on the report through reference to DB tables in sub-reports.
    4. There can be N number of sub-reports each with independant formatting, data and data layout that could be integrated in single report.
    5 Once all selection is done, Java code generates an XML with all this info.
    Now, my requirement is dynamically write CR report based on this XML. I am not using BO enterprise, hence RAS SDK is out of scope. This report will be called thorough stand-alone .NET application in CITRIX environment.
    Can we do it in CR XI/CR 2008?
    Please feel free to comment in case you need more info. But I won't be able to post screenshots. NDA of course!
    Thanks in advance.

    I moved your post to the NET - SAP Crystal Reports forum.
    To start, you have a fair bit of work ahead of you. The Crystal reports SDK will not do the job. You will have to use the InProc RAS SDK which is included in both CR XI and CR 2008. I'd recommend going with CR 2008 as CR XI R1 (11.0) is out of support now and CR XI R2 (11.5) will be out of support come June of 2011. Next, make sure you have applied SP 3 for CR 2008:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    As an FYI, all files can be found on the downloads page:
    http://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm
    Next, you want to read up on RAS. I suggest the following:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a
    http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_dg_12_en.chm
    Samples are here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples
    and here:
    http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/80774579-b086-2b10-db91-ed58c4dda375 [original link is broken]
    I also find this 3rd party link useful:
    http://book.soundonair.ru/sams/
    And as always, search these forums. Lots of info here. E.g.;
    Programaticaly add Table in CR database fields
    InProc RAS Issue
    Adding the columns dynamically in crystal report
    Also, see the search box at the top right of this page. It searches blogs, wikis, Kbases, articles and more - all in one go.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Passing SQL to Crystal Reports Server using JAVA

    Hi all,
      We are in the process of redoing our Java app and we would like to create SQL query and pass this to Crystal Reports Server to have it generate a report.
      I've looked all over but still could not find any info on it.  Does anyone know how this is done or know where I can find some information on this?
      I've looked at some of the examples from BO but did not find anything relating to what I need to have.
    Thanks in advance.
    -S.C.-

    Hey,
    Have a look at https://boc.sdn.sap.com/node/452
    There some other great webinars on the left side also.
    Hope that helps.
    Else if you wanting to run some SQL before loading the report search for something along the lines of:
    (But I warn you this is not the correct coding, I have just quickly cut and paste a
    few bits from one of my reports but you should get the idea, hopefully,
    might have to use your imagination.)
    Connection connection = null;
    CallableStatement cs;
    Class.forName(dbDriverName);
    // Create a connection to the database
    connection = DriverManager.getConnection(dbConnectionURL, dbUsername, dbPassword);
    // Call a procedure with one IN parameter
    cs = connection.prepareCall("{ CALL " + str_ProcStatement + "}");
    cs.setString(1, str_Param1);

  • Problem in Creating a jar file using java.util.jar and deploying in jboss 4

    Dear Techies,
    I am facing this peculiar problem. I am creating a jar file programmatically using java.util.jar api. The jar file is created but Jboss AS is unable to deploy this jar file. I have also tested that my created jar file contains the same files. When I create a jar file from the command using jar -cvf command, Jboss is able to deploy. I am sending the code , please review it and let me know the problem. I badly require your help. I am unable to proceeed in this regard. Please help me.
    package com.rrs.corona.solutionsacceleratorstudio.solutionadapter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.jar.JarEntry;
    import java.util.jar.JarOutputStream;
    import java.util.jar.Manifest;
    import com.rrs.corona.solutionsacceleratorstudio.SASConstants;
    * @author Piku Mishra
    public class JarCreation
         * File object
         File file;
         * JarOutputStream object to create a jar file
         JarOutputStream jarOutput ;
         * File of the generated jar file
         String jarFileName = "rrs.jar";
         *To create a Manifest.mf file
         Manifest manifest = null;
         //Attributes atr = null;
         * Default Constructor to specify the path and
         * name of the jar file
         * @param destnPath of type String denoting the path of the generated jar file
         public JarCreation(String destnPath)
         {//This constructor initializes the destination path and file name of the jar file
              try
                   manifest = new Manifest();
                   jarOutput = new JarOutputStream(new FileOutputStream(destnPath+"/"+jarFileName),manifest);
              catch(Exception e)
                   e.printStackTrace();
         public JarCreation()
         * This method is used to obtain the list of files present in a
         * directory
         * @param path of type String specifying the path of directory containing the files
         * @return the list of files from a particular directory
         public File[] getFiles(String path)
         {//This method is used to obtain the list of files in a directory
              try
                   file = new File(path);
              catch(Exception e)
                   e.printStackTrace();
              return file.listFiles();
         * This method is used to create a jar file from a directory
         * @param path of type String specifying the directory to make jar
         public void createJar(String path)
         {//This method is used to create a jar file from
              // a directory. If the directory contains several nested directory
              //it will work.
              try
                   byte[] buff = new byte[2048];
                   File[] fileList = getFiles(path);
                   for(int i=0;i<fileList.length;i++)
                        if(fileList.isDirectory())
                             createJar(fileList[i].getAbsolutePath());//Recusive method to get the files
                        else
                             FileInputStream fin = new FileInputStream(fileList[i]);
                             String temp = fileList[i].getAbsolutePath();
                             String subTemp = temp.substring(temp.indexOf("bin")+4,temp.length());
    //                         System.out.println( subTemp+":"+fin.getChannel().size());
                             jarOutput.putNextEntry(new JarEntry(subTemp));
                             int len ;
                             while((len=fin.read(buff))>0)
                                  jarOutput.write(buff,0,len);
                             fin.close();
              catch( Exception e )
                   e.printStackTrace();
         * Method used to close the object for JarOutputStream
         public void close()
         {//This method is used to close the
              //JarOutputStream
              try
                   jarOutput.flush();
                   jarOutput.close();
              catch(Exception e)
                   e.printStackTrace();
         public static void main( String[] args )
              JarCreation jarCreate = new JarCreation("destnation path where jar file will be created /");
              jarCreate.createJar("put your source directory");
              jarCreate.close();

    Hi,
    I have gone through your code and the problem is that when you create jar it takes a complete path address (which is called using getAbsolutePath ) (when you extract you see the path; C:\..\...\..\ )
    You need to truncate this complete path and take only the path address where your files are stored and the problem must be solved.

  • Creating an XML file using Java Standalone

    Hi,
    My problem is -
    1) write a java stand alone retrieving data from database and put the data in XML format (i.e; we have to create an XML file).
    How to do this? Could any one of you please suggest me how to code or can i have any links that refer the code snippets.
    Thanks.

    Could someone give me a link with information on how SAX is used to create an XML?
    null

  • Create a .dmp file using java

    Hi to everyone
    I have a problem: I must export and import data from a DB, using java ...is there someone who can help ,e in finding a solution to my problem...
    I'd like to read and write from a .dmp file, the same way we do while performing exp and imp utility.
    Is there a way to do this in a java program?
    Many many thanks in advance
    Melian

    I don't think there is an API for this. If your concern is export import only, you can simply spawn a process from Java that runs exp or imp. (Using the Runtime class: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html)
    Thomas

  • Create BPEL jar file using Bpelc via Java classes

    HI,
    I am trying to create the BPEL files ( xyz.bpel, bpel.xml, xyz.wsdl etc.. ) on the fly using Java code... Once I create all these files, I create a packaged jar (Ex : bpel_xyz_v2006_10_17__37256.jar) file and deploy the same in the Bpel PM.
    Right now, in order to create the jar file, I am running the bpelc.bat file under bpel/bin and then using the IBPELDomainHandle, I am deploying the process.
    But my requirement is to create the jar file using java rather than executing the bpelc.bat file..
    Can you please give me pointers as to how to achieve the same?
    Thanks
    Pramod

    Actually, I had figured out the part of calling the Bpelc class, but initially I was trying to create an object of the class and was not able to do so. That was where I got stuck.
    Eventually, I did something like the code snippet below and it works fine and the jar file is created. Just fyi for anyone looking in the future.
    String[] setupValues;
    setupValues = new String[]{ "-home", "D:\\product\\10.1.3.1\\OracleAS_1\\bpel", "-rev",
    "1.0", };
    Bpelc.main(setupValues);
    Thanks
    Pramod

  • Help required in embedding flash file object into Crystal Report file.

    Hello,
          I use the default version of Crystal Report (i.e.'Crystal Report Basic For Visual Studio 2008 - version 10.5' ) which is the part of 'Visual Studio 2008', to create and display the Report. Further, as a requirement, I have to show 'Event Video' into the Report. But, as this default version of Crystal Report does not support Flash File, I uninstalled it and downloaded and installed the 30 days trial version of the Crystal Report (i.e. Crystal Report 2008 - version 12.0).
          Then, I created a new Crystal Report File using 'Crystal Report 2008 Designer', embedded the video as a Flash File(i.e. SWF file) into it. Now,  when I add this newly created Crystal Report File into my sample application, which is created using VS 2008, it does not shows the embedded video.
          So, can anybody please tell me, how can I embed the Flash File into Crystal Report, so that it will be visible in the sample application?
    I would like to appreciate your help and support.
    Thanks,
    -Yogesh.

    Symptom :
    When embedding a pdf document into a Crystal Report, only the one page shows.
    Reproducing the Issue
    Environment:
    Crystal Reports OLE object
    Cause
    An OLE object only displays the first page.
    Resolution
    Embed multiple objects, one for each page
    Or
    Use a hyperlink to the object instead
    Hope this helps!
    Regards,
    Vinay

  • How to write as XML file using java 1.5

    hi all,
    i am trying to create an XML file using java 1.5. I took a XML creating java file which was working with java 1.4 and ported same file into java 1.5 with changes according to the SAX and DOM implmentation in java 1.5 and tried to compile. But while writing as a file it throws error "cannot find the symbol."
    can any body help me out to solve this issue.......
    thankx in advance
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.NamedNodeMap;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.DocumentHandler;
    import org.xml.sax.InputSource;
    import org.xml.sax.helpers.ParserFactory;
    import java.io.*;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();                   
                   dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();                   
    Document xmlDoc =  db.newDocument();
    // this creates the xml document ref
    // parent node reference
    Element rootnd = (Element) xmlDoc.createElement("ALL_TABLES");
    // root node
    xmlDoc.appendChild(rootnd);
    Element rownd = (Element) xmlDoc.createElement("ROW");
    rootnd.appendChild(rownd);
    Element statusnd = (Element) xmlDoc.createElement("FILE_STATUS");
    rownd.appendChild(statusnd);
    statusnd.appendChild(xmlDoc.createTextNode("Y")
    FileOutputStream outpt = new FileOutputStream(outdir + "//forbranch.xml");
    Writer outf = new OutputStreamWriter(outpt, "UTF-8");
    //error is occuring here Since write method is not available in the Document class
    xmlDoc.write(outf);
    outf.flush();

    Hi,
    when I look in the JDK1.4.2 specification I don't see any write method in the Document interface.
    However, your solution is the Transformer class. There you transform your DOM tree into any output you need. Your code sould look something like this:     TransformerFactory tf = TransformerFactory.newInstance();
         // set all necessary features for your transformer -> see OutputKeys
         Transformer t = tf.newTransformer();
         t.transform(new DOMSource(xmlDoc), new StreamResult(file));Then you have your XML file stored in the file system.
    Hope it helps.

  • Creating a PDF by using Java

    Is it possible to create a PDF file using Java
    Is there any API/class there exists in java
    Can any one help me
    Hope some intelligent peoples are there to help me
    make a reply to me at
    [email protected]

    There's:
    http://www.lowagie.com/iText/
    If you're working with xml, maybe this one:
    http://xml.apache.org/fop/index.html
    regards.

  • Generate Excel File using Java

    Hi,
    could any one tell me how can I create an Excel file using java. I can create the file using PrintWriter and other IO classes. But how do I insert the data in to different cells and rows.
    Any help would be greatly appreciated. Thanks in advance for your help,
    -MS

    Dear All,
    There are three ways for achiving excel operations using java including excel to xml etc.
    1. There is a very effective tool available for this operation is "jexcel". You can find it at http://www.andykhan.com/jexcelapi/index.html
    2. Jakarta site has provided a very good tool by name jakarta poifs. one can find at jakarta site.
    3. One can develop a very effective tool by combining these above tools togather.
    The operations that can be performed are read, write, convert etc for excel. The major attraction of Jexcel is excel to xml conversion.
    Regards,
    Nishant Kulkarni
    Software Engineer
    [email protected]

  • RE: What's database field are used in crystal report file?

    Hi all
    Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail section of report.....)
    We looking forward to hearing from you
    Thanks
    Son

    Hello Son,
    please use this code below to get a list of used database fields in a report :
    //File Name:          CS_Get_report_data_out_inproc.sln
    //Created:            April 11, 2008
    //Author ID:          FLI
    //Purpose:            This C# .NET sample Windows application demonstrates
    //                  how to retrieve report data and put the into a XML file
    //                  using unmanaged RAS.
    // Note this is available without a dedicated RAS with SP2 for XI R2
    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    namespace CS_Get_report_data_out_inproc
        public partial class Form1 : Form
            // CR Declarations
            ReportDocument boReportDocument;
            ISCDReportClientDocument boReportClientDocument;
            public Form1()
                InitializeComponent();
                //Create a new ReportDocument
                boReportDocument = new ReportDocument();
                // load the RPT file
                boReportDocument.Load("..
    ReportData.rpt");
                // show in reportviewer
                crystalReportViewer1.ReportSource = boReportDocument;
            private void button1_Click(object sender, EventArgs e)
                //Access the ReportClientDocument in the ReportDocument (EROM bridge)
                boReportClientDocument = boReportDocument.ReportClientDocument;
                // Retrieve the Rowset Controller
                RowsetController boRowsetController = boReportClientDocument.RowsetController;
                // Retrieve the metadata (column headers) - this allows you to only retrieve the data that is on the report.
                RowsetMetaData boRowsetMetaData = new RowsetMetaData();
                Fields boFields = boReportClientDocument.DataDefinition.ResultFields;
                boRowsetMetaData.DataFields = boFields;
                // Now print out the data in XML file
                //(Note: This will print out the results of formulas too)
                StreamWriter sw = new StreamWriter("C:
    ReportData.xml", false);
                sw.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
                sw.WriteLine("<ReportData>");
                sw.WriteLine("<Reportheader>");
                // Print out the titles
                for (int i = 0; i < boFields.Count; i++)
                    String boFieldName = boFields<i>.Name;
                    sw.WriteLine("<ReportheaderDetail>" + boFieldName + "</ReportheaderDetail>");
                sw.WriteLine("</Reportheader>");
                //Create the cursor which lets us loop through the data
                RowsetCursor boRowsetCursor = boRowsetController.CreateCursor(null, boRowsetMetaData, 1);
                Record boRecord;
                while (boRowsetCursor.IsEOF == false)
                    sw.WriteLine("<Customer>");
                    boRecord = boRowsetCursor.CurrentRecord;
                    for (int j = 0; j < boFields.Count; j++)
                        try
                            sw.WriteLine("<Detail>" + (String)boRecord[j].ToString() + "</Detail>");
                        catch (Exception err)
                            sw.WriteLine("<Error>" + err.Message + "</Error>");
                    sw.WriteLine("</Customer>");
                    boRowsetCursor.MoveNext();
                sw.WriteLine("</ReportData>");
                // CLose the file
                sw.Close();
                MessageBox.Show("XML File 'ReportData.xml' successfully created on C:");

  • Crystal report files created, but why not all?

    I am using several (total 19) Crystal report files (*.rpt) in my project as report or subreport. When I delete these rpt files under my "...\bin\Debug" folder and run the application I see that some (exactly 14) of them are automatically retrieved back into the "...\bin\Debug" folder.
    But there are several other reports (remaining 5 of them) I also want them to be created at the application start. I have debugged the application from tha main entrance and saw that the rpt files are generated even the first line of code is executed. Also checked my "App.config" file (where I hold the paths for these report originals) and added the most recently created report that is not retrieved into the file, but the file is not retrieved.
    I have also checked the contents of "XXXXX.exe" (XML Configuration file), "XXXXX.vshost.exe" (XML Configuration file) under "...\bin\Debug" folder and "XXXXX" (Microsoft Visual Studio Solution), "XXXXX" (Microsoft Visual Studio Project file), "XXXXX.csproj" (Visual Studio Project User Options file), "XXXXX" (XML Configuration file) under the project folder but I still can not figure out how the Visual Studio determines which ones to retrieve and leave others
    Any help would be appreciated.
    Regards.

    This could be related to the Build Action property for the .rpt file.  Compare the settings for this property to see if the files that are not copied have a different setting.
    -MJ

Maybe you are looking for

  • Is it possible to print JTable and custom JPanel on the same page?

    Hello everybody! I have a custom panel extending JPanel and implementing Printable. I am using paint() method to draw some graphics on it's content pane. I would like to print it, but first I would like to add a JTable at the bottom of my panel. Prin

  • What is the best way to aggregate photos from multiple family users into a single iCloud photo library?

    My wife and I currently have a iPhone and iPad each. We share my apple ID account for apps and I also use this as my main icloud account on my devices. My wifes devices have a different main icloud account. We also have a iMac with separate users con

  • Microsoft outlook doesn't open after update--any suggestions?

    Just performed a critical update for MS Office, and now Outlook will not open.  Have reinstalled a fresh version, so now have 2 sets of Office on the mac, and neither opens.  Any help?

  • Error during Usage decision

    Hi, System status is not updating in the transaction QA32.We find that system status is not updating from certain period earlier which is fine. Another thing is We are not able to clear the inspection lots through UD in QA32.If we try to do the UD in

  • DATABASE STARTUP

    Hi all, While bring the instance we are getting this error SQL> startup ORA-01078: Message 1078 not found; No message file for product=RDBMS, facility=O RA LRM-00109: Message 109 not found; No message file for product=ORACORE, facility= LRM SQL> Kind