DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

strange characters

Solved!
Go to solution

I have an issue with a report  created with Diadem 11.1.  The issue is when I use a comment box and auto populate it I get squares.  Is there any way to get rid of them and have them represented as the characters they are supposed to be? i,e tabs line feeds and spaces....

 

I have attached the .TDR and a .TDMS file ro further explain my issue.

0 Kudos
Message 1 of 5
(4,883 Views)
Solution
Accepted by topic author Siriusly

Hello Siriusly!

 

Most of your funky characters are tabs (ASCII code 9). REPORT is AFAIK unable to view it in the expected way. You can replace them with other strings but this will not result in an equitable representation. You can try it in your first box with this expression:

@@Replace(Data.Root.ChannelGroups(2).Properties("Notes").Value, Chr(9), ", ")@@

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 5
(4,876 Views)

That is what I needed,  however there is still a square showing up.  How did you know to replace character nine? 

 

I guess I need to replace one other character but I dont know which one.  

 

Thanks

0 Kudos
Message 3 of 5
(4,870 Views)

Hello Siriusly!

 

I made this small script to test the characters:

Option Explicit

Dim i
Dim s

s = Data.Root.ChannelGroups(2).Properties("Notes").Value

For i=1 to Len(s)
  LogFileWrite i & " : '" & Mid(s,i,1) & "' = " & Asc(Mid(s,i,1))
Next

The script writes the string character by character to the log file output in the SCRIPT device.

 

The problem with the reminding square is that the first lines end with CR + LF (ASCII Codes 13 + 10), the data lines only with LF. DIAdem needs the CR + LF combination. If you want to fix your line you have to add two Replace commands:

@@Replace(Replace(Replace(Data.Root.ChannelGroups(2).Properties("Notes").Value,Chr(9),", "), Chr(13), ""), Chr(10), vbCRLF)@@

The line deletes all CR and replaces the reminding LF with CR+LF (vbCRLF constant). Then the output looks good to me.

 

Matthias

 

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
Message 4 of 5
(4,867 Views)

You solved my issue.  I never knew about the "logfilewrite" command, I love it.

 

Thank you

0 Kudos
Message 5 of 5
(4,833 Views)