Jump to content
We've recently updated our Privacy Statement, available here ×

find an sub report name into main .jasper to compile it


pcouas

Recommended Posts

Hi,

How retrive sub report name  form an main .jasper file ?

I have tried with succes, but it's not very good for me ?

Who have an idea Thanks


String fileName="c:\CustomersReport.jrxml";
                 JasperCompileManager.compileReportToFile(fileName);
                 JasperReport  jasperReport = JasperCompileManager.compileReport(fileName);
            
             JRBand jb = jasperReport.getDetail();
          // jb children Expression
          java.util.List jl=jb.getChildren();
             JRBaseSubreport  jsr=(JRBaseSubreport)jl.get(3);
             JRExpression jre=jsr.getExpression();
             JRExpressionChunk[] jch=jre.getChunks();
             String fichierjasper=jch[0].getText();
 

 

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...