Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Creating Multiple Tab in single Report
Creating Multiple Tab in single Report [message #1805253] Wed, 10 April 2019 12:27
venkatesh veera is currently offline venkatesh veeraFriend
Messages: 5
Registered: November 2018
Junior Member
I am creating a Report using Birt (Engine Api) with some Java code . now, I don't know how to create multiple tabs in a single Report. so,each tab represent one single Table in it . Can anyone please me . The following code i used

 IReportEngine config = new EngineConfig();
 config.setLogConfig("birtLogs", Level.WARNING);
 IRegistryProvider ireg =  RegistryProviderFactory.getDefault();
 org.eclipse.birt.core.framework.Platform.shutdown();             
 RegistryProviderFactory.releaseDefault();
 try {
    org.eclipse.birt.core.framework.Platform.startup(config);
 } catch (BirtException e1) {
        e1.printStackTrace();
 }
 IReportEngineFactory factory = (IReportEngineFactory)org.eclipse.birt.core.framework.Platform .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(config);
URL rptFileUrl = null;
try {
 rptFileUrl = new URL("****/Reports/*****.rptdesign");
 } catch (MalformedURLException e1) {
  e1.printStackTrace();
 }
IReportRunnable reportRunnable = null;
  try {               
   if (rptFileUrl != null) {
reportRunnable =
engine.openReportDesign(rptFileUrl.openConnection().getInputStream());


  ReportDesignHandle designHandle = null;
designHandle = (ReportDesignHandle) reportRunnable.getDesignHandle();
 }         
} catch (EngineException | IOException e1) {
                   e1.printStackTrace();
}
while (designHandle.getBody().getCount() > 0) {                
 try {
     designHandle.getBody().dropAndClear(0);
  } catch (SemanticException e) {
      e.printStackTrace();
  }
}
  ElementFactory designFactory = designHandle.getElementFactory();
  try {
   designHandle.setProperty("title", "Description");
   /* creating Grid for the Tab */
   createGrid(designHandle,designFactory);

   /*createTab(designHandle,designFactory);*/ // I have to Implement for the Tab.


  } catch (SemanticException e1) {
    e1.printStackTrace();
  }


 engine.destroy();
  designHandle.getBody().getContents().clear();
  designHandle.close();

 org.eclipse.birt.core.framework.Platform.shutdown();
             try { 
               RegistryProviderFactory.setDefault(ireg);
             } catch (CoreException e) {
               e.printStackTrace();
             }


         }
            } ) ;
          } catch (InvocationTargetException | InterruptedException e) {
            e.printStackTrace();
          }








I used designFactory ,designHandle(above code) to create Grid and inserted data in it . I am expecting that designFactory ,designHandle might Help to create multiple tabs as well but i don't know how to do it. please help me in with some code.

[Updated on: Wed, 10 April 2019 12:29]

Report message to a moderator

Previous Topic:Excel Date issue in BIRT Report
Next Topic:Parameter Validation check
Goto Forum:
  


Current Time: Tue Mar 19 08:55:27 GMT 2024

Powered by FUDForum. Page generated in 0.01773 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top