LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

arrange lines in report format html

Hi,

I want to add text to the end of report ,but the labview code did not let me to this in standrad report,how can i do it in one report (only when i create other new report it save it in other file report)? PLS advise.

 or

how can i copy specific lines and write them at the end of file ,in standrat report in html?

 

thank you.

 

 

0 Kudos
Message 1 of 6
(419 Views)

I can see the problem you're talking about (the Context Help for "Append Horizontal Line to Report.vi" is I think what you mean?) but I'm not sure I understand what you've already done.

 

Could you post a VI with some example (or real, if that's acceptable) code?

0 Kudos
Message 2 of 6
(390 Views)

I've written HTML Reports, and have read and written Excel Reports using the Report Generation Toolkit.  The New Report function has an input for a Template, which (for Excel) means an existing Report that you may want to modify.  This works like a charm in Excel, as there are functions to do such things as read the Report or go to the end of the Report (i.e. find the last row), so I tried doing something similar with HTML.  However, there are no analogous "Read" or "Move" functions for such Reports, and what you end up doing (I did the Experiment) is overwriting the old Report.

 

In lieu of re-writing the RGT, I'm going to file an Idea on the Idea Exchange to allow "appending" to an existing Report.  Note that there are functions in the RGT called "Append Text", or "Append Image", but these all implicitly start from the beginning of the Report, thereby over-writing what may already be present.  In addition, when opening an HTML report, the Template input is ignored (adding Insult to Injury) ...

 

Bob Schor

0 Kudos
Message 3 of 6
(357 Views)

Hi Bob,

I understand that it can not append text or table to the end of standrad report html,right?

 

0 Kudos
Message 4 of 6
(325 Views)

You can set up tags in your HTML that you can search for so you know where to replace something. This would allow for you to search for that tag and then just replace that tag.

Tim
GHSP
0 Kudos
Message 5 of 6
(321 Views)

That is correct.  New Report does just that -- opens a "new" Report (meaning it starts "from the beginning").

 

However, you can, with a little "extra work", have your Cake and Eat It, too.  Here's the idea:

  • Assume you have a file, "First Half Report.txt", to which you want to add some new stuff at the end and call the result "Full Report.txt.
  • Use the RGT to write "Second Half Report.txt" and save the file to disk.  Dispose Report.
  • Use LabVIEW to open both files, read all the lines from First, then all the lines from Second, and write Full Report.txt.

Try it.  Let me know if this works for you.

 

Bob Schor

0 Kudos
Message 6 of 6
(313 Views)