title: Dynamic Jasper subreport table border
body: <p>Hi i am new to dynamicjasper, i created sub report but when i set border using setBorder property  to my subreport its raise Exception <code>java.lang.reflect.InvocationTargetException</code></p>
  
  <p>This is subreport code</p>
  
  <pre><code>public DynamicReport buildReport() throws Exception {
  
          FastReportBuilder frb = new FastReportBuilder();
          frb.setTitle("PROJECT DOCUMENTATION")
             .setMargins(5, 5, 20, 20);
           frb.addColumn("","project_id", String.class.getName(), 30)
          .addColumn("","product_name",String.class.getName(),30)
  
          .setQuery("select * from project_master where project_id=$P{project_id}", DJConstants.QUERY_LANGUAGE_SQL);
           SIZE = table_name.size();
           delete_table = table_name;
           System.out.println("SIZE = = = "+SIZE);
  
           frb.addGroups(2);
  
          for(int s=0;s&lt;table_name.size();s++){
              System.out.println(" s "+s+" = "+table_name.get(s).toString()+" s_n "+seciton_name.get(s).toString()+" tab_type "+table_type.get(s).toString());
          frb.addSubreportInGroupHeader(2, subreport(table_name.get(s).toString(),seciton_name.get(s).toString(),table_type.get(s).toString()),getLayoutManager
  
  (),"getDataSourceSubreport"+s,DJConstants.SUBREPORT_PARAMETER_MAP_ORIGIN_PARAMETER,DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE);
         params.put("getDataSourceSubreport"+s, getDataSourceSubreport(table_name.get(s).toString()));
  
              }
  
  
         frb.setPrintBackgroundOnOddRows(true);
  
          frb.setUseFullPageWidth(true);
          params.put("project_id","PJT/0001");
  
          return dr;
      }
  
  public DynamicReport subreport(String tab_name,String tit_name,String tab_type)throws Exception{
  **Style tbl_border = new Stryle();
         tbl_border.setBorder(Border.THIN());** //***Error occured in the line***
         FastReportBuilder drb1 = new FastReportBuilder();
         if(tab_type.equals("textarea")){
             int max_width = 0;
                      Statement st5 = connection.createStatement();
              ResultSet rs5 = st5.executeQuery("select column_name from information_schema.columns where table_name='"+tab_name+"'");
              while(rs5.next()){
                                  System.out.println("inside while textarea");
                      if(max_width&gt;=1){
                        drb1.addColumn("",rs5.getString(1).toString(),String.class.getName(),25);  
                      }
                      max_width++;
              }
               drb1.setUseFullPageWidth(true); 
         }
         if(tab_type.equals("table")){
  
              int max_width =0;
                      Statement st5 = connection.createStatement();
                  ResultSet rs5 = st5.executeQuery("select column_name from information_schema.columns where table_name='"+tab_name+"'");
                  while(rs5.next()){
                      System.out.println("inside while");
                         **drb1.addColumn(rs5.getString(1).toString(),rs5.getString(1).toString(),String.class.getName(),25)addStyle(tbl_border);**
  
                          max_width++;
                  }
             if(max_width&gt;2){
                  drb1.setUseFullPageWidth(true); 
             }
         }
  
  //           for(int sg=0;sg&lt;header.size();sg++){
  //             drb1.addColumn(header.get(sg).toString(),header.get(sg).toString(),String.class.getName(),25);
  //           }
  
               drb1.setSubtitle(tit_name);
               drb1.setTitle("");
  
                   DynamicReport dr1 =   drb1.build();
  
               return dr1;
     }
  </code></pre>
  
  <p>In above code i set one condition if table i need exact border like table, how can i achieve it</p>