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

barneskd

Members
  • Posts

    4
  • Joined

  • Last visited

barneskd's Achievements

  1. I have a requirement to plot x,y values onto a 4-box diagram - basically to show how plotted items fall into 4 separate quadrants. I've attached a mockup for reference. My plan was to use a scatter chart with a transparent background overlayed on top of the 4-box diagram image. Each plotted item in the chart would have a numeric label that corresponds with a table below the chart that provides the details for each plotted item. I was able to overlay the chart on top of the graphic and plot the items, but I have not been able to figure out how to expose labels for each of the plotted items. I wanted to avoid using the chart's legend for providing references because when the legend expands beyond the height limit of the chart it wraps the legend to a new column and shrinks the chart accordingly. There will be an unknown number of items to plot, so there is no way of knowing how many times the legend will have to wrap to fit everything. I cannot have the chart shrink because it needs fixed dimensions to fit on top of the 4-box diagram and plot items correctly. Any suggestions on how to expose the labels for plotted items or any other alternatives to the approach explained above?
  2. I have a requirement to color certain report elements (text, text field backgrounds, crosstab backgrounds, etc.) according to a color value returned by my data source. I'm trying not to use conditional formatting because that would require updating the report to create a new conditional style every time a new color is added. Ideally, my data source would return a color value as a field, say $F{color1}, and then I could use $F{color1} as an element's foreground/background color. This way the onus is on my data source and stored procedures to control the color rather than Jasper. Is this feasible?
  3. Problem solved. I created a group on the context field, told the Context field not to print repeated values, placed a right and left border on the Context field in the Details band, overlayed a static text field with a top border over top of the Context field in the Details band and told it to only print when the group count == 1, and then I added a horizontal line to the column footer to act as the bottom border of the column. Convoluted, but it works.
  4. Using iReport v3.7.6 and Jasper, I have a request to create a table where the first column acts to section/categorize the questions and answers displayed in the rest of the table. Example of requested output: http://i.imgur.com/al8Wk.png **EDIT:** For those of you not able to view the image, it is a 3-column table containing fields "Context", "Question", and "Answer". Each set of Question and Answer belongs to a single Context, which acts as a category for the set, and Context can act as a category for multiple sets of Question and Answer. The request is that it look something like this: __________________________ | Context1 | Question1 | Answer1 | | |_________|________| | | Question2 | Answer2 | | |_________|________| | | Question3 | Answer3 | | |_________|________| | | Question4 | Answer4 | |________|_________|________| | Context2 | Question5 | Answer5 | | |_________|________| | | Question6 | Answer6 | |________|_________|________| I know I can set iReport to not print repeated values, which solves part of my issue of not printing the Context on each line, but the second part of my problem is placing a cell border around the entire Context field so that it looks like the example above, that is, it looks like a dynamically expanding field that covers N number of rows. If I place a border around Context in the Details band of a report then I get the border for ever row in the table, resulting in a number of empty cells in the Context column. Is this kind of formatting possible using iReport 3.7.6? Would it be possible to group on the "Context" field and somehow place a border around the entire group? Since the quantity of questions per Context category is known it would be possible to use flags in my dataset and conditionally style around the Context fields (e.g. flag set to "top" for first record in group and "last" for last record in group and style a frame's borders to show a top or bottom border according to flags), but that seems likes an awfully messy way of handling the issue. Plus, that bandage would break as soon as questions were dropped/added. Another thought was creating a subreport that generated each Context individually, placing borders around the entire subreport, and combining the results in a master report's Detail band, but again that seems like a complex solution to an easy problem.
×
×
  • Create New...