Working with Line breaks

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
sqlstew
Enthusiast
Posts: 8
Joined: Wed Oct 10, 2007 5:27 pm
Location: Visalia, CA

Working with Line breaks

Post by sqlstew » Thu Oct 18, 2007 8:08 pm

I am using NiceWatch to print labels from text files that are exported from a SqlServer Db. I am trying to preserve line breaks so that the formatting looks nice on my label. If my text file looks like this:

Item 1
Item 2
This is my freeform text
that has particular line breaks
that need to be preserved.

I use a filter in NiceWatch to read the text into my variables. I specify variable 1 to read from row 1 to end of line. Variable 2 is the same as Variable 1. Variable 3 however is set to read from row 3 column 1 until row 5 column 40. I simply need to be able to capture the crlf's.

When I set up my label I set the field up as Rich Text Box and the variable length set with a line length = 40, multiline checked, # of lines 15, and Break Lines radio button selected.

I am using the demo version of Nice Label 5 with the idea of purchasing it if this works.

Any suggestions?

Thanks

User avatar
lpatty
NiceLabel
NiceLabel
Posts: 60
Joined: Mon Sep 11, 2006 4:15 pm
Location: Milwaukee, WI
Contact:

Post by lpatty » Thu Oct 18, 2007 11:24 pm

The use of the RTF object and specifying multiline in your variable may be stepping on each other. Try one or the other. If you use the RTF object, make sure your variable has enough of a length to accept all characters, but uncheck multiline in the variable definition.

If you use multiline in the variable, don't use the RTF box. Instead, use the simple Text object (not TextBox). Text Box and RTF use auto wordwrapping and do not need multiline.

User avatar
Maarten
Veteran
Veteran
Posts: 69
Joined: Wed Oct 11, 2006 9:00 am
Location: Soest, Netherlands
Contact:

Post by Maarten » Fri Oct 19, 2007 8:48 am

I have had a customer with the same wish, and at that moment I could not find a solution. I think "sqlstew" means he's trying to achieve this:

If the lines are like this in the database:

Code: Select all

This text should
not be word-wrapped
but displayed as is
It should also be displayed on the label the same, not with word-wrap, so:

Code: Select all

This text should
not be word-wrapped
but displayed as is
And not:

Code: Select all

This text should not be word-wrapped but displayed as is
Our customer had like 2000-4000 text files, not in database stored (don't laugh), and line breakes we're used. Is there a solution for this?

User avatar
Maarten
Veteran
Veteran
Posts: 69
Joined: Wed Oct 11, 2006 9:00 am
Location: Soest, Netherlands
Contact:

Post by Maarten » Mon Oct 29, 2007 11:36 am

Small bump, any ideas?

User avatar
Saso
NiceLabel
NiceLabel
Posts: 2970
Joined: Mon Sep 04, 2006 8:09 am
Contact:

Post by Saso » Tue Jan 08, 2008 3:00 pm

The document analysis filter in NiceWatch was first designed with the idea to parse printer data streams. Even if the data is contained in multiple rows with CR/LF at the end, NiceWatch ignores the CR/LF and merges all the characters together.

If you want to use data from several rows merged in the same variable, extract each row separately to separate variables, and then merge the variables together.

You can merge the variables together using VB script action in NiceWatch trigger configuration, or using Concatenate function in the label.

Or, additional idea. :idea:
Before you parse the data from the text file, do the following:
  • Replace the CR/LF characters with some special character(s) not used elsewhere in the file
  • Extract all the characters in all rows at the same time. Use just on filter.
  • Use VB script to replace all special characters with the CR/LF.
I will put the request to parse the CR/LF from the text files to the NiceLabel wish list.
Remember, if you find some functionality missing in NiceLabel software, you can post your question to the forum Suggestions and New Ideas. We are happy to hear back from NiceLabel users.
Saso Fleiser
Senior Technical Product Specialist

Post Reply