Showing posts with label equal. Show all posts
Showing posts with label equal. Show all posts

Wednesday, March 21, 2012

Name cannot begin with the '>' character, hexadecimal value 0x3E

Hi,

This is my first attempt at SSRS, I've added code section to the xml file. But when I use <> for not equal to, it is giving me this error. What should I do? The code is as posted here.

Thanks,

Debi

***************************************************************************************

<Code>
Dim PrevId as Object
Dim a_Count As Double
Dim b_Count As Double
Dim c_Count As Double
Dim d_Count As Double
Dim e_Count As Double
Dim Total As Double = 0
Function SumMPCount(ByVal CurrID As Object,ByVal code As Object, ByVal NewCount As Object) As Double

If(CurrID is Nothing or code is Nothing or NewCount is Nothing)Then
Exit Function
End if
If PrevId Is Nothing Then
PrevId = CurrId
End if
If CurrID <> PrevID Then
a_Count = 0
b_Count = 0
c_Count = 0
d_Count = 0
e_Count = 0
Total = 0
End if
Select Case mp_Code
Case "a"
a_Count = a_Count + NewCount
SumMPCount = a_Count
case "b"
b_Count = b_Count + NewCount
SumMPCount = b_Count
case "c"
c_Count = c_Count + NewCount
SumMPCount = c_Count
case "d"
d_Count = d_Count + NewCount
SumMPCount = d_Count
case "e"
Total = a_Count + b_Count + c_Count + d_Count + e_Count
SumMPCount = Total
case else
e_Count = e_Count + NewCount
SumMPCount = e_Count
End Select

PrevId = CurrId
End Function
</Code>

It looks like you directly copy&pasted the code snippet into the RDL(XML) file and therefore the <> is not encoded an is interpreted as invalid xml element.

You have two options - either copy&paste the code snippet into the report designer custom code window (and report designer will automatically encode the characters correctly), or replace the <> in the RDL file with &lt;&gt; (which is the encoded representation).

-- Robert

|||

Thanks for the reply. Where is the custom code window? When I right click on the report and select properties, it just shows me the usual Properties tab on the RHS which shows background color, image, etc..

I actually worked around it using Object variables and using "Is" instead of <> .

|||I think he might have meant
right click on the report.rdl -> Prooperties -> Code tab -> paste theresql

Monday, March 12, 2012

Mysterious and sudden performance worsening

A few days ago one of the server I use become very slow. I've a tween
server, it's pretty equal to it's brother: it's still working properly (it
runs at about 10 time faster for the same query).
I checked the hardware (raid controller, network connection and general
performances) and it seems perfect. The memory occupation and the processor
use is equal to it's tween, but the disk access has abnormally increased. To
solve the proble I've:
1 - restarted the server
2 - installed all the patches, updates and services pack I could find.
My last chance is to reistall SQL server, but I still hope to find a more
"scientific" solution.
Thanks for any suggestion.
MTA variety of things coul cause this. Just a few ideas that might be useful:
Perhaps the database has become fragmented?
Perhaps index statistics are out of date / not being updated automatically?
Have indexes been dropped?
Are there any long running transactions?
Regards,
Greg Linwood
SQL Server MVP
"MT" <cutme.mttc1685@.hotmail.com> wrote in message
news:qACnb.73796$vO5.2693264@.twister1.libero.it...
> A few days ago one of the server I use become very slow. I've a tween
> server, it's pretty equal to it's brother: it's still working properly (it
> runs at about 10 time faster for the same query).
> I checked the hardware (raid controller, network connection and general
> performances) and it seems perfect. The memory occupation and the
processor
> use is equal to it's tween, but the disk access has abnormally increased.
To
> solve the proble I've:
> 1 - restarted the server
> 2 - installed all the patches, updates and services pack I could find.
> My last chance is to reistall SQL server, but I still hope to find a more
> "scientific" solution.
> Thanks for any suggestion.
> MT
>|||To add to Greg's post:
Check out the execution plans, se if that differs. This is what I would start with. Can for example
lead to out-of-date statistics (as per Greg's post).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"MT" <cutme.mttc1685@.hotmail.com> wrote in message
news:qACnb.73796$vO5.2693264@.twister1.libero.it...
> A few days ago one of the server I use become very slow. I've a tween
> server, it's pretty equal to it's brother: it's still working properly (it
> runs at about 10 time faster for the same query).
> I checked the hardware (raid controller, network connection and general
> performances) and it seems perfect. The memory occupation and the processor
> use is equal to it's tween, but the disk access has abnormally increased. To
> solve the proble I've:
> 1 - restarted the server
> 2 - installed all the patches, updates and services pack I could find.
> My last chance is to reistall SQL server, but I still hope to find a more
> "scientific" solution.
> Thanks for any suggestion.
> MT
>|||I have had similar proplems. Run a DBCC INDEX DEFRAG and
sp_updatestatistics. That should greatly improve the performance.
Thanks
Bryan
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:eBWsv6fnDHA.2404@.TK2MSFTNGP12.phx.gbl...
> To add to Greg's post:
> Check out the execution plans, se if that differs. This is what I would
start with. Can for example
> lead to out-of-date statistics (as per Greg's post).
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "MT" <cutme.mttc1685@.hotmail.com> wrote in message
> news:qACnb.73796$vO5.2693264@.twister1.libero.it...
> > A few days ago one of the server I use become very slow. I've a tween
> > server, it's pretty equal to it's brother: it's still working properly
(it
> > runs at about 10 time faster for the same query).
> > I checked the hardware (raid controller, network connection and general
> > performances) and it seems perfect. The memory occupation and the
processor
> > use is equal to it's tween, but the disk access has abnormally
increased. To
> > solve the proble I've:
> > 1 - restarted the server
> > 2 - installed all the patches, updates and services pack I could find.
> >
> > My last chance is to reistall SQL server, but I still hope to find a
more
> > "scientific" solution.
> > Thanks for any suggestion.
> > MT
> >
> >
>|||Problem "partially" solved: the test was made using microsoft DAO on a PC
with microsft XP with integrated security. I changed to SqlServer security
and now everything works properly. I'm afraid I will never know what caused
the sudden worsening.
If you use DAO with XP never access the database with integrated security,
as I don't believe that they will release a patch for an obsolete platform
like DAO.
"MT" <cutme.mttc1685@.hotmail.com> ha scritto nel messaggio
news:qACnb.73796$vO5.2693264@.twister1.libero.it...
> A few days ago one of the server I use become very slow. I've a tween
> server, it's pretty equal to it's brother: it's still working properly (it
> runs at about 10 time faster for the same query).
> I checked the hardware (raid controller, network connection and general
> performances) and it seems perfect. The memory occupation and the
processor
> use is equal to it's tween, but the disk access has abnormally increased.
To
> solve the proble I've:
> 1 - restarted the server
> 2 - installed all the patches, updates and services pack I could find.
> My last chance is to reistall SQL server, but I still hope to find a more
> "scientific" solution.
> Thanks for any suggestion.
> MT
>
>