LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

print form feed \f escape sequence in labview 7.0

I have a large string that I am trying to print that contains a form feed (\f) as defined in the LabView documentaiton. What I get is a little square where the \f should be and no new page. What am I doing wrong?

Steve
0 Kudos
Message 1 of 11
(4,069 Views)
Hey Steve,

To where are you trying to print your string? LV front panel string control?....or to some external device?

I would check and make sure your string controls/indicators are in code/normal mode. You can do this by right-clicking on the control/indicator...(codes and normal are two of the options)

Set in codes mode for the \f to be interpreted as a form feed. On the other end, normal mode, should perform the form feed.

Let me know if this helps/works,
Brett
0 Kudos
Message 2 of 11
(4,068 Views)
Thanks Brett. I have an string indicator that shows the text before I direct it to an external printer. Both the string indicator and the printer show the \f as a small square character and there is no form feed. I am concatenating the \f constant into a long string that is a multi-page report. I look at the constand in \ mode and hex and it appears to be correct. What do I do now?

Steve
0 Kudos
Message 3 of 11
(4,068 Views)
Hey Steve,

If you have all of your strings that are being concatenated set to "\codes" I would think that would work. Have you tried another escape command such as "\n" for new line. Try just outputting one line, set to codes, to your printer and see how it responds. ie. "Line1\nLine2"

Brett
0 Kudos
Message 4 of 11
(4,068 Views)
Brett:

\n \r \s all work correctly on the indicator and the external printer. But \f will not. I have tried to put the constant string with the form feed in normal mode, \ mode, hex mode all with the same results. I have put the string indicator in normal mode, \ mode and hex mode and found the \f ( or xOC ) on the string indicator or the little square in normal mode. However on the printer all I get is the little square. No form feed.

Steve
0 Kudos
Message 5 of 11
(4,068 Views)
Hmmm...I thought that would be it. Has this printer responded to a "\f" form feed before?
0 Kudos
Message 6 of 11
(4,068 Views)
I was just about to output "page1\fpage2" to a text file. MSWord picked up on the \f and created two pages. I am beginning to wonder if it isn't your printer.
0 Kudos
Message 7 of 11
(4,068 Views)
Brett:

I have tried eight printers now with the same (no form feed) result. Then I realized that I did not give you a probably important piece of information. I am printing the report (string containing /f) with NI Report Generator VI. Could I have an old version? Is there a reason that form feeds do not work with the Report generator?

Steve
0 Kudos
Message 8 of 11
(4,068 Views)
That is probably important information. It's certainly possible that the report generation ActiveX component does it's own pagination. What you should try is calling eh New Report Page function (VI.lib\Utility\NIReport.llb) explicity and that way you know that your are sending the correct info to the report generator.
0 Kudos
Message 9 of 11
(4,068 Views)
I don't understand Dennis? How to I call "eh New Report Page function () EXPLICITLY?"

Steve
0 Kudos
Message 10 of 11
(4,068 Views)