Nov 9, 2011
I'm a PHP/MySQL/HTML guy, but in the course of my work, I sometimes have to delve into Gatesland.I am working in VS2005 developing reports, and occasionally I have to write some custom code. This code is in (I believe) VB.NET. I avoid this as much as possible. It is my belief that if you have to use custom code in a report, you're doing something wrong with the DB, or with your query.Now, my boss (for reasons unknown) is storing data in the database as HTML. This data is historical, having a month and a dollar amount, and comes in a form like this:[code]I know this breaks even 1NF. I did not design the database. I simply must suffer under it's schema. See, the developer did this so that he could just read in a field, and dump it straight out to an echo/print statement when forming up the HTML. Unfortunately for me (the report developer), HTML shows up as verbose text if I dump it out as a field in a text field in a VS2005. So, I need to strip out he HTML tags, and replace them with appropriate values.
View 5 Replies
I am first trying to strip out the <th> data, and print it out with appropriate line feeds and carriage returns. This is the code I am trying to use:[code]Now, far from doing what I intend it to do, it simply returns the jubilent result "#Error". Wonderful. I'm sure the client will be happy.There must be some simple syntax errors or something going on there, but I am nowhere near an expert with VB.NET. I've used VBA extensively, but last time I used it was about 3 years ago. I'm hoping I can cash in some of that positive rep I've got, and get some much needed help in the dark wilderness of Microsoftia