alexeysem Posted March 29, 2010 Share Posted March 29, 2010 Hi,I have a very short question. On saving a jrxml document in iReport it does reformats the xml source code. That would be okay if it didn't also remove all comments. This is rather annoying as I 1. cannot leave any comments for the further supporters of the very non-trivial report I'm developing 2. cannot comment elements I don't need while debugging.So, is it possible to disable source reformatting in iReport, or fine-tune it to keep the comments? I hope it is...Thanks in advance. Link to comment Share on other sites More sharing options...
marciotw Posted April 22, 2010 Share Posted April 22, 2010 hi my friend. I have this same problem than you. you found solution ?Please, if you found this, you can help me ?Thanks. Link to comment Share on other sites More sharing options...
alexeysem Posted April 23, 2010 Author Share Posted April 23, 2010 Hi,As you might have noticed, every time you do something in iReport's visual editor and then switch to the jrxml source, it looks like it fully reformats the code.Actually, as they say, it doesn't simply reformat, it simply exports the internal representation of the report.So, what iReport works with is only that internal representation, and surprisingly there's no place in it for preserving the original formatting or at least the comments.To sum it up: currently there's no way to keep the comments.I personally treat this as a miserable failure, as the whole JRXML language seems to be very well focused on being readable and understandable, especially compared to e.g. BIRT reports, which quickly become huge and monstrous. I guess they just didn't have time or spare hands to implement this feature.Hope this helps,A. Link to comment Share on other sites More sharing options...
marciotw Posted April 23, 2010 Share Posted April 23, 2010 I go continue with this problem..Thanks my friend. Link to comment Share on other sites More sharing options...
marciotw Posted April 23, 2010 Share Posted April 23, 2010 you not found neither artifice for insert comments in files of jasperreports, for identify who make file or changes ?Because i need insert information about developer and what for serving this codes.Thanks more a time. Link to comment Share on other sites More sharing options...
slinkeey Posted November 12, 2010 Share Posted November 12, 2010 Has anyone come up with any creative ideas to have xml comments stay intact? Link to comment Share on other sites More sharing options...
slinkeey Posted November 12, 2010 Share Posted November 12, 2010 I just tyhought of it I think..Add the comments like Author and revision information to the SQL Statement.. Link to comment Share on other sites More sharing options...
alexeysem Posted November 12, 2010 Author Share Posted November 12, 2010 See my answer few comments above:"To sum it up: currently there's no way to keep the comments."And just don't waste your time on this issue...If you need comments in the beginning of the end of the file, you could just keep them in a separate file (e.g. "file.jrxml.comm") and expand your building tool to merge them before a check-in.Note that you'll go straight to the hell after your death if you follow this advice :) Link to comment Share on other sites More sharing options...
slinkeey Posted November 12, 2010 Share Posted November 12, 2010 Thanks for the Advice. This is a nice idea..I decided to just put them before the SQL statement so that it shows in the SQL window at the top.. It works out just fine for now..Thanks!! Link to comment Share on other sites More sharing options...
pablodc Posted November 13, 2010 Share Posted November 13, 2010 Hi, In JR 3.7.x there are a element called "callouts". You can reach these in IR under the Pallet Window. These "callouts" works like sticky notes in the IR interface and in the generate XML it can be readed like this:<property name="ireport.callouts" value="##Fri Nov 12 23:12:35 GMT-03:00 2010\ncallouts.1.text=Hello World!, I'm a callout...\ncallouts.1.bounds=294,80,181,73"/>Grettings from Argentina!PS: I have attached a screenshot. Link to comment Share on other sites More sharing options...
radhikasharda Posted April 7, 2011 Share Posted April 7, 2011 hi! When are we going to have a comment facility in Jasper reports? Its really bothering issue comments get deleted. I am new to iReport and when I made something as a comment , to my surprise it got lost. I thought as if I hade done something wrong. But when I searched in then came to know about comments being not supported in ireports. I hope we will get this requirement fixed very soon. Link to comment Share on other sites More sharing options...
hablutzel1_1 Posted March 12, 2013 Share Posted March 12, 2013 Is there a filed issue at the issue tracker for this? Link to comment Share on other sites More sharing options...
hablutzel1_1 Posted March 12, 2013 Share Posted March 12, 2013 Found the filled issue: http://community.jaspersoft.com/ireport-designer/issues/822Please upvote it to get it implemented soon (you'll need to register) Link to comment Share on other sites More sharing options...
majerus.eric Posted August 27, 2013 Share Posted August 27, 2013 Considering the issue tracker ticket was created 8 years ago, I'm assuming this will never be fixed. So, a recap of ideas/hacks here and then a couple more I've tested:Comment the SQL queryAdd a callout element from the Palette in the Tools category. As stated above, these are sticky notes and do not show up in the reportAdd a separate file for comments and then use a build tool to merge them (then go to hell after death)For parameters and fields, there is a "Description" property you could use to commentFor variables, if you use an expression, you can include Java comments (//) in the expression but they must be on a different line than the expression being semicolons are illegal. It appears iReport uses the newline character to separate comment from expression code.For other elements, you can experiment with "Print When Expression" to sneak comments in. Again, they must be on their own line. If the element is always visible, then you can write your comment and then simply type "true" on the next line.Unfortunately none of these methods let you debug by commenting out elements in the XML directly, but it's something anyway. Link to comment Share on other sites More sharing options...
kbailey Posted December 23, 2013 Share Posted December 23, 2013 I haven't seen this suggestion, but it's one I use from time to time. If you really must keep comments in the file, create a static text field and enter your comments there. Then set the dimensions of this field to 0,0,0,0 so that it doesn't display. Link to comment Share on other sites More sharing options...
hozawa Posted June 27, 2015 Share Posted June 27, 2015 This is a very old thread but for those still searching for a solution, the best I can think up of is to put them in properties. Link to comment Share on other sites More sharing options...
showboxapk1 Posted February 24, 2016 Share Posted February 24, 2016 I really think this can be resolved if you keep them in properties. I was having issues like this but later I got experience in this topic. I tried to put them before the SQL statement and got wrong with it. Thanks, Mike Link to comment Share on other sites More sharing options...
fireslinger Posted September 19, 2018 Share Posted September 19, 2018 How will people notice a field with 0 dimensions? If I have room, I put the comment in a static text field with green text saying // COMMENT: and a Print When Expression Boolean.FALSE. Link to comment Share on other sites More sharing options...
williamsdanielusa Posted September 16, 2022 Share Posted September 16, 2022 I also get deleted comments from time to time, getting over it maybe because my answer is off-topic so it's erased by iReport. wordle Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now