Showing posts with label valid. Show all posts
Showing posts with label valid. Show all posts

Wednesday, March 28, 2012

InvalidOperationException in ReportItem.set_RenderingInfo

I have an exception being thrown during the set_RenderingInfo call as show
in the following stack trace:
Operation is not valid due to the current state of the object.
at
Microsoft.ReportingServices.ReportRendering.ReportItem.set_RenderingInfo(Object
value)
at
Exony.ReportingServices.Rendering.RenderingProviders.HtmlRenderingFactory.PreRender(RenderContext
context, ReportItem item) in
c:\dev\source\reporting\main\app\exony.reportingservices.rendering\renderingproviders\htmlrenderingfactory.cs:line
75
I really need to understand why this is happening and how I can avoid it so
looking at the code I expect the bit in question (inside the
ReportItem.set_RenderingInfo function) is:
if (!this.m_renderingContext.InPageSection)
{
if (this.m_intUniqueName == 0)
{
throw new InvalidOperationException();
}
}
What is m_intUniqueName for and what is causing it to be '0'?
Many thanks,
James SnapeHi James,
Thanks for your email.
I have noticed you are developing your won rendering extension.
UniqueName is A string that uniquely identifies this report item
ReportItem
UniqueName=0 means it is not initilized correctly due to some issues when
contrsucting.
Constructors for all subtypes of ReportItem require two arguments: Name
(String) and UniqueName (String). These properties cannot be set after the
report item is created.
Since customized rendering extension is not officially support at present,
I would like to introduce you to the CSS Advisory Services team.
Advisory Services is a remotely delivered, hourly fee-based, consultative
support option that provides a comprehensive result beyond your break-fix
product maintenance needs. It is an hourly fee-based, consultative
support option that provides proactive support beyond your break-fix
product maintenance needs. This support option includes working with the
same technician for assistance with issues like product migration, code
review, or new program development.
For more info in the US and Canada:
http://support.microsoft.com/default.aspx?pr=AdvisoryService
Outside of the US/Canada:
http://support.microsoft.com/default.aspx?scid=%2finternational.aspx
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Michael,
I am writing a rendering extension because our customers have decided they
don't like the default HTML rendering that comes with Reporting Services.
Regarding rendering extensions being unsupported, can you point me to the
EULA or other document that states this because reporting services books
online seems to suggest it is a standard part of the product
(ms-help://MS.RSBOL80.1033/RSPROG/htm/rsp_prog_extend_security_87oi.htm). It
does mention that the documentation is not yet available but not that it is
unsupported.
The advisory services seems a little expensive to ask a question of plus I
can't see that it's available outside the US.
Thanks in advance,
James Snape|||Hi James,
Thanks for your email.
Since we do not have much documents / references on hand about rendering
extension either, we do not support custom rendering extension in SQL
Server 2005.
If you want the the support for this, I recommend that you open a support
incident with Microsoft Customer Service and Support (CSS) so that a
dedicated Support Professional can work with you in a more timely and
efficient manner and contact development team much closer. If you need any
help in this regard, please let me know.
For a complete list of Microsoft Customer Service and Support phone
numbers, please go to the following address on the World Wide Web:
<http://support.microsoft.com/directory/overview.asp>
If you are outside the US please see http://support.microsoft.com for
regional support phone numbers.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 19, 2012

Invalid Database after SP1 Install

We applied SP1 and now are getting the following error:
The version of the report server database is either in a format that is not
valid, or it cannot be read. The found version is 'C.0.6.51'. The expected
version is 'C.0.6.43'. To continue, update the version of the report server
database and verify access rights. (rsInvalidReportServerDatabase)
Is there a remedy for this?SP1 has to be applied both where you develop application and on the server.
Have you applied SP1 at both places?
Give a little more info on your configuration.
Bruce L-C
"Gary Gordon" <sbss1@.icdc.com> wrote in message
news:10e871srs5s3762@.corp.supernews.com...
> We applied SP1 and now are getting the following error:
> The version of the report server database is either in a format that is
not
> valid, or it cannot be read. The found version is 'C.0.6.51'. The expected
> version is 'C.0.6.43'. To continue, update the version of the report
server
> database and verify access rights. (rsInvalidReportServerDatabase)
> Is there a remedy for this?
>|||We applied the SP to both the develpoment machine and the server. We ended
up having to uninstall Reporting Services and reinstall it. Then we import
the database from our backup that was done prior to application of the SP.
"Bruce Loehle-Conger" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23Ll9303XEHA.2360@.TK2MSFTNGP10.phx.gbl...
> SP1 has to be applied both where you develop application and on the
server.
> Have you applied SP1 at both places?
> Give a little more info on your configuration.
> Bruce L-C
> "Gary Gordon" <sbss1@.icdc.com> wrote in message
> news:10e871srs5s3762@.corp.supernews.com...
> > We applied SP1 and now are getting the following error:
> >
> > The version of the report server database is either in a format that is
> not
> > valid, or it cannot be read. The found version is 'C.0.6.51'. The
expected
> > version is 'C.0.6.43'. To continue, update the version of the report
> server
> > database and verify access rights. (rsInvalidReportServerDatabase)
> >
> > Is there a remedy for this?
> >
> >
>

Wednesday, March 7, 2012

Invalid attempt to read when no data is present using SQLdatareader

I'm trying to determine if the record is NULL/empty or is valid from the datareader.

objReader = strCMD.ExecuteReader
objReader.Read()
if objReader.IsDBNull(0) = true then...

If NULL/Empty, display no records found. If records are found, display "1 or more records have been found". I keep getting the error "Invalid attempt to read when no data is present". I'm not sure what I am doing wrong here.Do While objReader.Read()
' your code.
Loop|||Use the HasRows property of a DataReader:

objReader = strCMD.ExecuteReader
If objReader.HasRows() Then
' Display 1 or more rows found
Else
' Display no rows found
End If

The reason your code was failing was because the "objReader.Read()" line attempts to access the next element in the DataReader, and so if it's empty then it becomes an invalid access, like trying to access one more index past the end of an array. If all you need is whether or not the DataReader contains any information, then HasRows is your easiest bet.|||And if what you need to do is access the info datareader contains, and are getting this error, and have a do while loop, what's the next thing to try?|||Look at why the SQL isn't returning anything!