10-15-2012 10:23 AM
I am having trouble setting the table row height in the report generation toolkit. I can set the column width fine, but the row height seems to remain the same no matter what I set it to. I have attached the VI that generates and formats the table, and the printout it is resulting in. I have also attached the template file I am using.
Any tips to get this to work right? I am trying to make the cells exactly the same height as the text inside.
Solved! Go to Solution.
10-15-2012 11:17 AM - edited 10-15-2012 11:22 AM
Hi,
I ran this VI, changed the row height from .2 to 2. Seemed to work fine. I had to add the create report VI, added values into the markers control, and attached the template you gave. Not sure that helps, but I would think there might be some issue with the inputs to this SubVI.
Although the snippet shows the integer 2, it worked for 1.8 and .8 too. In the past I have had issues with values not being supported by word/excel, but this seems not to be the case.
Here is the report.
10-15-2012 11:50 AM
Yeah sorry, not the easiest subVI to execute on its own.
The .2 I have there does not work though. 0.2 is printing out as if it is .4 or so, as a point of reference the table above it in the template is 0.2". Is there maybe something with the font properties that is double spacing it?
10-15-2012 12:25 PM - edited 10-15-2012 12:41 PM
Hi,
So I tried .2 and it didn't work. So I went to Word to manually change it, and it did not work either. There is a selection box in word, for the table properties, that seems to default to the value "at least". When I changed this manually to "exactly" in word, no problem with the .2 manually in Word.
Hopefully this can be set within the template, for all new inserted tables. I'm not sure the report generator VI's expose this property. Well, this is a start for the issue.
Edit ****
You can go into the add table VI and expose the property. See pic. However, you have to decide if you want to "upgrade" this VI permanently to expose this property or make a copy with the property exposed. I haven't messed with the new class reports too much, so not sure of the ins and outs with this.
I think this is the issue with the row size becoming smaller.
03-29-2016 04:37 AM - edited 03-29-2016 04:38 AM
Hi
I am trying to resize the height of row, but i couldn't. I also used the HeightRule as well.
Please guide me to adjust the row height.
I attached the VI with this.
Thanks & Regards,
Shree
03-29-2016 08:17 AM - edited 03-29-2016 08:17 AM
Shree-
I was able to get this to work by doing what Mark Ramsdale above suggested-Modifying Word Set Table Dimensions.vi to expose the "heightRule" property, and changing it to "wdRowHeightExactly." It works but it really kills the portability of your code.
I havent ever been able to figure out a better solution than this, if anyone has found a way to do this without modifying NI vis I would love to hear.
03-29-2016 09:15 AM
03-29-2016 09:43 AM - edited 03-29-2016 09:45 AM
@ben64 wrote:Try this vi, it works with the RGT.
Ben64
Worked for me, made a small change to it though: I made it use inches or centimeters like the toolkit does.