Jump to content
Changes to the Jaspersoft community edition download ×

JasperViewer doesn\'t show up


levianz

Recommended Posts

I'm having a weird problem here.

I made reports using jasperreports and so far it was shown well in the development laptop, but it's not shown in the client (by running the same runnable jar file).

I have no idea what the problem is, cause I can see the jasper file was generated but the jasperviewer doesn't show it up in the screen as seen in development laptop.

 

Thanks in advance,

Here's a part of the code that handles the jasperreports :

 

Code:
private void displayReports(int repName) throws JRException, SQLException {    con1 = DriverManager.getConnection("jdbc:jtds:sqlserver://xx.xx.xx.xx:1433/db;user=sa;password=passdb");    HashMap<String, Object> parameterMap = new HashMap<String, Object>();    switch (repName){    case 0:         parameterMap.put("label", txlabel.getText());         jasperCompileManager.compileReportToFile("Reports\\report.jrxml", "Reports\\" + txlabel.getText().toString().trim() + ".jasper");         jasperPrint = JasperFillManager.fillreport("Reports\\" + txlabel.getText().toString().trim() + ".jasper", parameterMap, con1);         break;     case 1:     };     JasperViewer jasperViewer = new JasperViewer(jasperPrint, false);     jasperViewer.setVisible(true);     jasperViewer.setDefaultCloseOperation(DISPOSE_ON_CLOSE);     parameterMap.clear();}
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...