Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [SOLVED] BeforeDrawRow event markup escape chars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] BeforeDrawRow event markup escape chars

 Post Reply Post Reply
Author
Message
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] BeforeDrawRow event markup escape chars
    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....
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1357
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

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

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1357
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 5.074 seconds.