Print Page | Close Window

[SOLVED] BeforeDrawRow event markup escape chars

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=13349
Printed Date: 04 May 2024 at 5:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] BeforeDrawRow event markup escape chars
Posted By: Aaron
Subject: [SOLVED] BeforeDrawRow event markup escape chars
Date Posted: 06 February 2009 at 7:44am
Hi,
 
How to handle & char in Markup string? It doesn't work with markup for grouped rows in BeforeDrawRow event...
 
 
 
 
 
 
 
Thanks
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Replies:
Posted By: nighthawk
Date Posted: 06 February 2009 at 10:39pm
Did you try:

&

I found that special characters in XAML have the same codes as in HTML.  For example, < and > are specified by the html codes &lt; and &gt; respectively.


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0


Posted By: Aaron
Date Posted: 13 February 2009 at 7:07am
Hi,
 
I am using V13.0.0 (just for testing) and I see that this is solved ??? Is this correct ???
 
If so, thank you very much
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 13 February 2009 at 12:32pm
Hey Aaron,

You should escape your plain-text before adding it to markup strings...I posted a function in the Xaml board a while ago that should do the trick:

https://forum.codejock.com/forum_posts.asp?TID=10865 - https://forum.codejock.com/forum_posts.asp?TID=10865

This function is only useful for escaping purely plain text that contains no markup/Xaml of it's own (since it will convert < and > characters to &lt; and &gt;)


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 13 February 2009 at 1:33pm
Hi Jason,
 
Thanks for reply
 
With previous version I noticed that the Markup string didn't work in Grouped items, it showed the complete string and not as the Markup string should be... and only because of the "&" char. In V13.0.0 it shows the Markup as should. Does this mean that CJ covered this already? I would like that support would reply on this, so I know that I don't need to do anything (at least for RC).
 
Question though: the characters in the function are the only characters you need to replace for Markup?  


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 13 February 2009 at 4:04pm
Hi Aaron,

Those should be the only common characters that need escaping...what I'm not sure about is:

1) Whitespace/Unprintable characters (tab, CHR$(0) through CHR$(31), CHR$(127))
2) Extended ASCII characters (CHR$(128) through CHR$(255))
3) Unicode characters

Perhaps I'll run some tests...You mention that only the & character was breaking the XAML validation..what happens if you add markup to your column next (e.g. Nood <Bold>Alarm</Bold>)...does the group row text interpret the XAML as XAML tags, or does it show the tag string as text?


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 06 March 2009 at 5:20am
Hi Jason,
 
I'm sorry, I didn't read your reply so well and didn't know you ask me something.
 
If I set col.Caption with & character inside a string, markup will breakup also. So I replaced & character with &amp;  and it will work as should
 
Thanks
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net