Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Edit a report.....
fastcars
Bit of a contradiction for a reporting tool I know but.....
I need to be able to edit a selected number of fields in a report in HTML.
I had thought/hoped that if I applied named styles or user properties to the fields in the report designer that I needed to edit, then the styles/properties MIGHT get generated into the final HTML. If so, I might be able to alter the fields to input boxes in a relatively robust fashion.
This doesn't happen.
Any ideas on alternatives here ?
The HTML that is generated is exactly what I need barring having a few fields editable. Specifically I need invoice line item text/description to be editable. It would be good to be able to edit these in context with the surrounding data, rather that xpathing them out and then generating a framework that can provide the context .
Basically I need a controlled edit where the line item text is editable but the figures/cash amounts are not, so an RTF is not a good solution, in a large invoice a lot of numbers would have to be ticked back to the original values if using an RTF for this.
I want HTML editing rather than PDF as this provides a simpler workfklow, without a download/upload step.
Find more posts tagged with
Comments
mwilliams
Hi fastcars,
So, you want the user to be able to edit the line item text? Not sure I understand exactly what you're going for.
fastcars
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Hi fastcars,<br />
<br />
So, you want the user to be able to edit the line item text? Not sure I understand exactly what you're going for.</p></blockquote>
<br />
As I said its an invoice. The products being invoiced are quite complex and the line item descriptions are some times incorrect. Changing upstream systems to affect the line item description is not always an option, so editing JUST the line item descriptions is what I need. I dont want the financials of the invoice edited as this presents too much of a risk of error / audit issues.<br />
<br />
I did find a solution that I have prototyped for any one who is interested<br />
<br />
We invoice from a web app, so when they want to edit, I generate HTML,<br />
<br />
HTMLRenderOption.setMetadataFilter(this);<br />
<br />
This allows my generator class to be called back for each node being generated in the report. I identify editable nodes by their immutable Node ID assigned by the designer. I then add additional attributes to the HTML div being generated for that node so they are identifiable one the HTML is generated.<br />
<br />
Once the HTML is generated I walk the DOM, looking for my annoted divs and replace them using the meta data (attributes) I had tagged the div with earlier.<br />
<br />
I get a document that is editable only for the fields I need.<br />
Its not quite that simple as the XML data sourcce I feed to the templates can be quite hierarchical, have a couple of levels of totals. I use a dot notation to identify target fields to update in the data structure that is JAX'b into XML.<br />
<br />
item[*].subpart[*].dailyValue[*].description might be the line item description.<br />
Population and retrieval of values from data structure is done by reflection.<br />
<br />
I picked the most complex document I have currently to test this on, and so far all good.
mwilliams
fastcars,<br />
<br />
If you could come up with an example of this or just a good writeup on it to post in the devShare, that'd be great.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/'>All
Topics - BIRT Exchange</a><br />
<br />
There is also a devShare contest that goes on each month where you can win a prize if you're the top voted post of the month.