Jump to content

conditional export for csv format


atiquek

Recommended Posts

Hi,

I have a bar chart in my report which doesnt get exported in csv as expected. Now the requirement is to replace the bar chart with some textual information which can be exported only for csv format. Does anyone have a working sample. Any help will be greatly appreciated.

Thanks,

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I only found out you could exclude a band for specific export types a week or two ago (and it's already been very useful information!).  How to add content conditional upon the export type?  I think that depends on two things:  how the report is "normally" deployed (under what conditions do you want the user to see the bar chart?) and is the information in a band that can be repeated (like Detail_1 vs. Detail_2, etc.).

If your report is deployed to JasperServer and the internal view is where you want to exclude text and include the chart, I'm not sure how you could exclude the text.  Also, if the text/chart is in the Summary (a non-repeatable band, as far as I know), I'm not sure how you could pull it off.

If you're extremely lucky, maybe your end-user doesn't use the internal view much, but instead they normally export to either format 1 (PDF, HTML, etc.) that supports a chart or format 2 (CSV, let's say) that doesn't, and let's say that the chart/text is in a repeatable band like group footer.  Then I think you could just make two group footers, one with text and one with the graph, and you could specify that you want to suppress the graph group footer band if you export to format 2, and you want to suppress the text if you export to format 1.

I don't think the internal view is considered an "export", so I don't think you can use the exclude property on it.

Carl

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