if(i<rResult.size())
{
// System.out.println("rResut" +rResult.size());//47185
sLetAct=rResult.elementAt(i).toString().trim().substring(0,1); //letra
// System.out.println("aaa" +rResult.elementAt(i).toString().trim().substring(0,1));
sLetAct=sLetAct.toUpperCase();
sLetAct=sLetAct.replace("Á","");
sLetAct=sLetAct.replace("A","");
sLetAct=sLetAct.replace("É","E");
sLetAct=sLetAct.replace("Í","I");
sLetAct=sLetAct.replace("Ó","O");
sLetAct=sLetAct.replace("Ú","U");
sLetAct=sLetAct.replace("Ç","C");
// System.out.println("Ante: "+sLetAnt);
System.out.println("Act" +sLetAct);
if (!sLetAnt.equals(sLetAct) ){
// System.out.println(sLetAnt + " " + sLetAct +" entro diferente...cierra el archivo *************************************************************");
out.write("</table>n"); //AQUI SE SUPONE QUE CON ESTO DEBERIA DE CERRARSE LA TABLA PARA SEGUIR ESCRIBIENDO EN LA SIG PAGINA
CreaInf(out,numPags,contaPage,numRen,numReg,name,nameP,nomrep);
SnumRen=String.valueOf(contaPage); //num de paginas
nameSig=nameP+sLetAct+".html";
//nameSig=nameP+sLetAct+".html";
outfile = new File (ruta + "/" + nameSig);
out = new FileWriter(outfile);
CreaSup(nomrep, nameP,anioact,iniMes,nameSig,iNumMeses,elem,titulo,enc,out,sLetAct);
ban=1;
contaPage=contaPage+1;
sLetAnt=rResult.elementAt(i).toString().trim().substring(0,1);
sLetAnt=sLetAnt.toUpperCase();
sLetAnt=sLetAnt.replace("Á","");
sLetAnt=sLetAnt.replace("A","");
sLetAnt=sLetAnt.replace("É","E");
sLetAnt=sLetAnt.replace("Í","I");
sLetAnt=sLetAnt.replace("Ó","O");
sLetAnt=sLetAnt.replace("Ú","U");
sLetAnt=sLetAnt.replace("Ç","C");
}//if
}//if
}//while
if(ban==0){
out.write("</table>n");
CreaInf(out,numPags,numPags,0,0,name,nameP,nomrep);
}