{"action":"closed","issue":{"url":"https://api.github.com/repos/opensagres/xdocreport/issues/38","labels_url":"https://api.github.com/repos/opensagres/xdocreport/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/opensagres/xdocreport/issues/38/comments","events_url":"https://api.github.com/repos/opensagres/xdocreport/issues/38/events","html_url":"https://github.com/opensagres/xdocreport/issues/38","id":86932682,"number":38,"title":"While using @before-cell and @after-cell random cells and even rows can be deleted","user":{"login":"nicky1038","id":3922891,"avatar_url":"https://avatars.githubusercontent.com/u/3922891?v=3","gravatar_id":"","url":"https://api.github.com/users/nicky1038","html_url":"https://github.com/nicky1038","followers_url":"https://api.github.com/users/nicky1038/followers","following_url":"https://api.github.com/users/nicky1038/following{/other_user}","gists_url":"https://api.github.com/users/nicky1038/gists{/gist_id}","starred_url":"https://api.github.com/users/nicky1038/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicky1038/subscriptions","organizations_url":"https://api.github.com/users/nicky1038/orgs","repos_url":"https://api.github.com/users/nicky1038/repos","events_url":"https://api.github.com/users/nicky1038/events{/privacy}","received_events_url":"https://api.github.com/users/nicky1038/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-10T11:18:44Z","updated_at":"2015-08-07T14:27:21Z","closed_at":"2015-08-07T14:27:21Z","body":"---Sorry, accidendally I have closed issue #37 so this is it once again---\r\n\r\nWhat steps will reproduce the problem?\r\n1. Create a lot of several mergefields in .docx document (e.g. @before-cell#if($p.source) and @after-cell#end in a table cell).\r\nIn my case the larger is the document the more is a probability that some of the mergefields will be divided into different runs in document.xml as it is shown below.\r\n![bad](https://cloud.githubusercontent.com/assets/3922891/8079891/707aa4aa-0f70-11e5-94a6-c075b4e286fc.png)\r\n![good](https://cloud.githubusercontent.com/assets/3922891/8079892/708014da-0f70-11e5-8468-d427272916e1.png)\r\n2. Try to fill this template using java/scala.\r\n\r\nWhat is the expected output? What do you see instead?\r\nI expect that every mergefield will be filled but in practice the other situation happens - those mergefields that were divided into various runs (during creating template) will not be filled. If you try to launch your java code once again you will discover that the same mergefields were not filled because mergefields are stored in the template itself.\r\n\r\nWhat version of the product are you using? On what operating system?\r\n- xDocReport 1.0.6, but I tried to use earlier versions too - it does't matter.\r\n- MS Word 2010 for creating templates - the problem, as I understand, is in it but I would like to ask you to create more smart solution that will take this stupid fault into consideration\r\n- OS Windows 8.1\r\n\r\nPlease provide any additional information below.\r\nThe most interesting thing is that if you try to delete and re-enter bad mergefields with the same information there will be a probability they will not be spoiled again.\r\n\r\nI understand it is not a problem of yours and your library. Moreover it's really easy to use and it's a pleasure to work with it, but this trouble is a real headache for me and doesn't allow to work normally. Please add some features so that this problem will not be a problem anymore.\r\n\r\nHere you can find a template, scala/java code and resulting output. I need to implement my project in scala so this template was processed using scala code too. But for your convenience I've added equivalent java code.\r\nhttps://www.dropbox.com/sh/f2iyaiyvqg7wy1m/AAAf7nfNnTuULFstakS-59hUa?dl=0\r\n\r\nThis issue was also created there: https://code.google.com/p/xdocreport/issues/detail?id=483\r\nUPD:\r\nI've been tried to find a bit more information what exactly is wrong and I've found that as it's shown at screenshots every run has its own RSID parameter. It serves for conveniet merging of documents and can be turned off. It could be helpful, but..\r\n- In the attached template \"@before-cell#if($print.variableThree)\" mergefield was broken even without any RSIDs and wasn't filled correctly.\r\n- In my project (sorry, I can't attach it) it seems that turnind RSIDs off helped and fresh mergefields (I tested ones with \"@before-cell\" token - it is the main headache) were really created as a single run. Whatever after processing resulting table didn't contain some cells/rows/columns (I can't guess a rule in which they are being deleted) as before.\r\n\r\nThen I've tried to edit document.xml myself to make broken mergefields look like ordinary ones. It didn't affect on template's view but my program began throwing strange parse exceptions even if I've only removed really unnecessary runs.\r\n\r\nThank you very much!\r\nNick."}}