Invalid Report Definition

I get this error when my .Net application tries to call an RDL with a barcode in it.

The report definition is not valid. Details: The report definition element ‘CustomReportItem’ is empty at line 3, position 2611. It is missing a mandatory child element of type ‘Type’. —> The report definition is not valid. Details: The report definition element ‘CustomReportItem’ is empty at line 3, position 2611. It is missing a mandatory child element of type ‘Type’.

However, I’ve checked and there is a ‘Type’ element in the custom report item… Any ideas would be greatly appreciated.

I don’t have access to the source of the application. However it is running on reporting services/SQL 2005.

Hi dsentelle,

I am afraid it's too hard to locate the problem without the .rdl source file. Is it possible to reach the source code/ config files(rsreportserver.config, rssrvpolicy.config)?

Well, the complication is in that this RDL's output isn't being called by the client computer itself. The client computer is logged into a web based .Net application that calls the report. There's something funny this .Net app does in the background, too, and I'm blaming that.

I know there's something funny in the .Net app because this particular version can't use RDL files which were writeen in VS2005, only 2003. Nevermind the fact that it is a SQL 2005 SQL server with the latest reporting services.

If you do make the mistake of editing your RDL in VS2005 you can make it work in every other case by changing a couple of lines in the source of the RDL file...

Quoting someone in our user group...

In the XML, change the 2nd line of the report as shown:
http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

Also, remove the two lines:
11in
8.5in

I don't know how that makes it work but it does. I also know that the datasource in the RDL file gets ripped out and replaced by local application settings for the app's datasource.

For the record though, the RDL does contain the proper BarCode elements. it just seems to be being ignored. Here's the custom report item...


BarCode
1.625in
0.625in


_symbology
Pdf417


_codeText
Fields!Bc_first.Value & CHR(3) & CHR(13) & CHR(10) & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_last.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Company.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Adr1.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Adr2.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_City.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_State.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Zip.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Country.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Phone.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Fax.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Email.Value & CHR(3) & CHR(13) & CHR(10) & Fields!Bc_Emp_Involved.Value & CHR(3) & CHR(13) & CHR(10) &CHR(3) & CHR(13) & CHR(10)


_codeTextFont
Arial, 8pt


_codeTextColor
Black


_RenderFormat
Png


_yDimension
0.03



It works fine from the report manager's preview, and Visual Studio's preview.

Here's the rsreportserver.config part regarding aspose...





And here the rssrvpolicy.config section...





I wondered if, due to SQL/RS2000's restriction that CustomReportitems on be of type 'Image' if things would work by changing the name of the codegroup class. I figure there's some part of RS2000 inside this .Net App screwing things up.

Oh well, so I'm dropping back and punting and trying the VS2003 version of the product, but that's giving me errors now... I'll go post those elsewhere so as to not intertwine threads.

We should likely kill this thread. We’re about to leave the version of
our application that requires reports run on our SQL 2005 server be
composed in VS2003, totally eliminating the problem.



Thanks–