How to do a Carriage return on text in a Text Box in Item View?


Userlevel 3
Badge +16

Hi there,

 

I need to write the following in a text box:

 

Signature

OR

Associate ID Number

 

It needs to appear as above in a textbox, but when i enter the text, its appears all in one line and takes up the vast amount of space in the next box where the signature will go.

 

Is there any way to do the above in an Item View?

 

Thanks


15 replies

Badge +6

Hi,


 


Would it not be an option to display the text using multiple labels?


 


Regards.

Userlevel 3
Badge +16

It all needs to be in one Text Box with a Border as a signature is required.

 

using multiple lables will not allow a single border round the 3x labels

 

 

Badge +7

This one was bugging me...I think I accomplished what your looking for.

 

Create Three lables or Data lables, and put in your wording for each line:

 

Datalable 1: Signature, Datalable 2: Or...and so on.

 

Now you need a data lable for the carriage return: Datalable 3: 


 

Now, in the rule for view initialization put a data transfer from those lables to the Text area control:

12953i92AFD17F3AE18A1D.png

 

Stack them up something like: Signature data lable, then the carriage return data lable, then the or data lable, ....

 

Let me know if that worked for you, it seemed to work like a charm on my end.

Badge +7

Further experiementing, it looks like you just need the carriage return xml code in the data label (
).  You can format the datatransfer a bit easier if you type out what you want with intermittently putting in the carriage return:

 

15873iC058D386A8C9C478.png

Userlevel 3
Badge +16

Hi daerne,

 

That worked great, I would never have sussed that out.

Only slight niggle is that I have split it across 4 lines of text:

 

Signature:

OR:

Number ID

Card ID

 

When running the View, it is only displaying the top three lines, CARD ID is there, but you have to use the scrolling arrows on the Text area to scroll down to see it. Any idea how I make the Text Area height bigger to accomodate the 4th line?

 

Thanks again, you've been a great help, I was just wanting to make the form look right and your method was spot on!!!

Badge +7

Yes, sir...

 

When you click on the text area, look at the properties.  Look at Settings > Rows

11950iB26C3C03CF163335.png

Userlevel 3
Badge +16

Oh no,

 

Changed the rows to 4, which worked, but now getting an error message:

 

function updateTableArray has corrupted the table array...

 

Gulp.... any ideas?

Badge +7

You shouldn't have received any errors on that simple change.

 

Try to change it back to three rows and check to see that it cleared the error msg.  I might also test out increasing it to four rows and disabling the rule to see if that is corrupting the view.

 

What version of SmartForms are you using?  You may have discovered a bug.

Userlevel 3
Badge +16

I can change the rows back to 3, but if i edit the view and click on any empty cell, I get that error message (I was just wanting to add an extra row underneath the text area.

 

I'm on the current version of smartforms, and the function appears to work in other views I just tried.

Badge +7

I'm still new to interpreting errors within smartforms...so I'm not sure what's going on there.

Userlevel 3
Badge +16

Daerne,

 

No probs, I deleted the original view and re-created it and all is well, so not sure what happened there.

 

This DataLable seems quite powerful, can I use it to insert things like the Current Date and Current Time onto a View/Form?

 

Thanks

Badge +7

datalables are sort've a goto control for me when I'm trying to work out a problem.  Yea, you can definately pass in a date, or if you want to show the current status of a form.  I'll sometimes hide the data lable and pass data to it so I can then pass/or test for data conditions.

 

Some of the cooler stuff I've been trying to work out is putting data lables into a breadcrumb navigation for the user...like the first example:

 

14053i660672B3D4C504E0.png

Badge +1

Hi,

 

When i  k2 installation in my PC. I am getting Error like this ( Configuration test faild as database of the wrong type exit.

 I Need Solution.

 

Here attached with screen shoots.

Please find attached screen.

 

 

 

 

Thanks & Regards 


15386i8441D4401290E955.png
Badge +4

Hi infoconnect,


 


Have a look at the following documentation please as this could be the reason you are getting the "wrong type".


 {Look at the collation settings on your environment}


 


http://help.k2.com/helppages/k2blackpearlgettingstarted4.6.7/webframe.html#microsoft_sql_server_2008__reporting_services.html


 


HTH 


 


Regards


Quintin

Badge +3

Based on the solution listed on the first page, I've tried with a TextBox and TextArea to set the carriage return but haven't been able to manage it.

 

I set a Data Label control to use Xml as the Data Type and in the Text value I enter 


 

It just isn't going on a new line unfortunately, can somebody please advise what I'm doing wrong?

 

Thanks

Reply