r1 - 10 Feb 2006 - 06:28:59 - TanDunlinYou are here: TWiki >  Main Web  >  ElixirReport > ElixirReportServerCookbook > RepertoireClient

Elixir Repertoire client

It provides both report generation and data generation Client API interface.

Data Store allows the user to trigger a section of actions to process data and finally load the final dataset to specific location i.e. Database table, file etc. The API ,generateData, is used but add parameter key "datastore" and the datastore name is needed to identify which data store to activate.

public void generate_DataStore()
{
    String dstoreFS = "/ElixirSamples/DataSource/CompositeEmployee.ds";
    try
    {
        Properties properties = new Properties();
        //datastore property requirement to identify which data store to push the data to.
        properties.put("datastore", "CSV");
        m_ERSClient.generateData(dstoreFS, outputstream, properties);
    } catch (Exception ex)
    {
    
    }
}   
To retrieve data from datasources

public void generateDataSource()
{
    String dsFS = "/ElixirSamples/DataSource/ChartData.ds";
    File f = new File("ChartData.ds");
    if (f.exists())
        f.delete();
    FileOutputStream fos = null;
    try
    {
        fos = new FileOutputStream(f);
        Properties properties = new Properties();
        //mime-type format needed to return the data
        //xml, csv and excel mime type supported
        properties.put("mime-type", "text/xml");
        m_ERSClient.generateData(dsFS, fos,properties);
        if (fos != null)
            try
            {
                fos.close();
            } catch (IOException e)
            {
            }
        } catch (Exception ex)
        {
            System.err.println("Error: " + ex.toString());
        }
    }   

-- TanDunlin - 10 Feb 2006

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback