07-22-2012 02:29 PM - edited 07-22-2012 02:36 PM
Hi,
I am having trouble trying to simplify my work on the Vi for my results template using the labview report generator toolkit. I have a word template which has approximate 85 fields, each measured value has 4 bookmarked results that means 336 bookmarks, In my short experience I usually bookmarked each field and used the append text option to mapp each part of the template. My question is, if there is a possibility to simplify the work?, I consider that doing 336 append text.vi for each individual bookmark is a little too much and not efficient. I am open for any recommendations on how to approach this problem better. What i would like to do is that the 4 results categories always apply for each of the 84 field, sort of a matrix way of seeing it, that would avoid doing it 336 times, unfortonuetaly I dont know if its possible
I am thankful for any support
Best regards,
Miguel
07-22-2012 03:01 PM
It would help to see the template and the code you have so far. I suspect there should be a way to use a for loop and an array. One other question, 85 * 4 = 336? Not understanding your math here but that is unimportant, please post some screenshots or files and we'll do our best to help you out.
07-22-2012 03:03 PM
I just saw this post
http://forums.ni.com/t5/LabVIEW/word-report-with-template/m-p/345673
perhaps by making a loop I could avoid making so many append text Vi. ?, if so I would be thankful if somebody could provide an example,
Thank you
Miguel
07-22-2012 04:33 PM - edited 07-22-2012 04:39 PM
Hi Charles,
sorry about that I meant 84*4=336. I would generally use the express report Vi alternative but apparently for this feature only 17 bookmarks are available therefore I am using the append text feature. What you see in the attached example is one of the 4 results (bookmarks ) that correspond to each field that is answered in the report, again that corresponds to 84 fields, and I would like to know a way to simplify the programming load if its possible instead of doing 336 append text Vis
thanks again for the support
Miguel
07-22-2012 04:38 PM
What format is your incoming data in? If it is already in an array then this is pretty easy to accomplish. Build a For loop around your append text vi's and wire the arrays to the appropriate inputs. The For loop will auto index these arrays and write one value each time. I'd send some example code but I need to have an idea of where the data is coming from in order to give you code that would have a chance at working.
07-22-2012 04:45 PM - edited 07-22-2012 04:47 PM
the input data is a litte more complicated, it should be the data measured from a data bank, i wouldnt know if its array data , my task for the project to the moment is to only develop the .Vi to fillup the template. I would really appreciate the loop example,
best regards,
Miguel
07-22-2012 05:06 PM
Try this. Again, I highly doubt it will work out of the box as I have no idea what your input is.
07-23-2012 01:39 AM
Thank you Charles
I dont quiet understand how the Append Text within the loop will have different bookmarks according to the data inputs.
maybe i explained the issue wrong, I have too many bookmarks and i would like to reduce the load of the work. For example
Thanks again
07-31-2012 04:25 AM
Hi
according to the reply of "Darren" yes, I think it makes the most sense to keep the bookmark names in a text file (or XML, or whatever), and use Append Report Text.vi in a loop to apply certain values.
If you wire an array to a For Loop,the For Loop executes a number of times equal to the number of elements in the array.
07-31-2012 07:54 AM - edited 07-31-2012 07:57 AM
@yukipilas wrote:
maybe i explained the issue wrong, I have too many bookmarks and i would like to reduce the load of the work.
Thanks again
It is hard to give suggestion without knowing the kind of data you want to save and how it is organize. A suggestion to reduce the number of bookmarks would be to build result tables in LabVIEW and then use the Word Easy Table vi. This would require only one bookmark per table.
(If your not using the Report Generation Toolkit use the Append Table to Report.vi)
Ben64