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

jasperserver export chart to excel


tong123123

Recommended Posts

My origin excel chart is created by marco as

Dim ch As ChartObjectSet ch = ActiveSheet.ChartObjects.Add(5, 50, 520, 280)

and the output is like the following diagram (chart 1) 

excelfrommacro.jpg.db687a29d6a161e0c201207bf6fdc4d6.jpgI try to use jasperserver to simulate the same output (their data is different, but I want the chart size can like the chart1), but the result is that the chart is just on A5 cell and it's next cell is already U5 cell, like the following (chart 2): 

excelfromjserverexport.jpg.ee8dbcc64ffec64bd0412f9450c89a05.jpg

1) Any method to let jasperserver exported my chart on a specific area in a worksheet (like chart 1,
ActiveSheet.ChartObjects.Add(5, 50, 520, 280))?

2) I find in excel chart object, the vertical axis max and min value is auto generated, any method to let jasperserver use the same logic as in the origin excel chart?

3) in chart1 using marco, the image is on top of several row (4-20), but if using jasperserver to export the chart (chart2), the chart is on top of one row and that row is enlarged (row5). How to make the chart2 like chart1, on top of several rows instead of one row?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

1) Any method to let jasperserver exported my chart on a specific area in a worksheet (like chart 1,
ActiveSheet.ChartObjects.Add(5, 50, 520, 280))?

Try the Excel API to see if there is something for this; http://jasperreports.sourceforge.net/sample.reference/xlsfeatures/#xlsfeatures

2) I find in excel chart object, the vertical axis max and min value is auto generated, any method to let jasperserver use the same logic as in the origin excel chart?

set a Max or Min property on the axis.  You can either do this statically or dynicamically.  For dynamic, you will need to create a variable you might want to make the variable 80% of the Max value or something i dunno, then pass the variable as the max/min axis setting.

3) in chart1 using marco, the image is on top of several row (4-20), but if using jasperserver to export the chart (chart2), the chart is on top of one row and that row is enlarged (row5). How to make the chart2 like chart1, on top of several rows instead of one row?

Use the following property 

net.sf.jasperreports.export.xls.collapse.row.span = false

Link to comment
Share on other sites

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