10-08-2009 09:14 AM
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.
Solved! Go to Solution.
10-08-2009 11:08 AM
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? |
10-08-2009 03:44 PM
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
10-08-2009 04:16 PM
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? |
10-09-2009 07:17 AM
You solved my issue. I never knew about the "logfilewrite" command, I love it.
Thank you