Re: asp.net report DbSource

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi David,

that's the part that stumps me, I looked at the data, there is no issue of
null values, even though, the query does create duplicates of a primary
key
from a master list.

Well the error is definitely being thrown by the DataSet although it might
not be specific to null values. Is there more than one DataTable in your
DataSet with DataRelations that provide foreign-key constraints? As a
simple test try removing those DataTables from the DataSet that are not
being used in the report.

Duplicate primary keys could very well be the issue here as well if you have
defined a unique constraint on your key column by setting Unique to true in
the .xsd designer or setting the key column as the primary key. Removing
those constraints, if they exist, might solve your problem although you
should probably make a new schema for your report data void of any
constraints that might be causing the error, not only as a test but for
runtime as well.

- Dave Sexton

"David L." <DavidL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8D0839E7-98A8-4D66-AA0F-1E3277CB434F@xxxxxxxxxxxxxxxx
Hi Dave

It's still odd to me that the table adapter fills a grid without a murmur
and failes on the report. And, the base query is used by SQL'05 reporting
services as is without any issues. I believe that there is a bug in the
reporting engine, I wish MS will step in here.

See below

"Dave Sexton" wrote:

Hi David,

Since you can't find the DataSet I must assume that you have configured a
strong-Typed DataSet and associated its TableAdapter with an
ObjectDataSource for your report, correct?

yes

Unfortunately you don't have access to the underlying DataSet until after
it
has been created and filled. Your best bet is to try to narrow down
which
DataColumn is causing the trouble and fix the schema.

that's the part that stumps me, I looked at the data, there is no issue of
null values, even though, the query does create duplicates of a primary
key
from a master list.

Another option is to bind the ObjectDataSource to a DataSet and fill the
DataSet in your code-beside file. This way, you can set
EnforceConstraints
to true, although I really do think you should just fix the schema
instead.

Thanks, I'll keep this in mind.

- Dave Sexton

"David L." <DavidL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FC86EF99-10E1-4513-B84D-7BA8E2DA8C4F@xxxxxxxxxxxxxxxx
Hi Dave

The same query performs just fine in any other consumer. I was able to
use
the exact same query with SQL'05 reprting services, and with an asp
grid.
The
only one breaking is the report viewer.

Also, I was unable to find the location where I can apply the
DataSet.EnforceConstraints in code, can you give me a pointer?

Thanks

"Dave Sexton" wrote:

Hi David,

The query is producing data of a format that is inconsistent with the
schema
for the DataTable in which it is being stored for the report.

Check that the DataTable schema allows nulls for nullable columns in
the
query output and make sure that your query returns enough result sets
and
records
to fill all related tables in the DataSet so that foreign key
constraints
are not violated, or just set the DataSet.EnforceConstraints property
to
false.

- Dave Sexton

"David L." <DavidL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:809D9EA7-8549-4E04-A24A-56D5BEF1D6D7@xxxxxxxxxxxxxxxx
I'm running into a frustrating problem.

ASP.NET 2.0 web application, against SQL'05, I'm trying to run a
report
against a 'table provider' (query) that excutes well within SQL MGT
studio,
and within the data environment.

However, when the report is executed in a web report viewer, the
report
engine comes back with:

An error has occurred during report processing.
Exception has been thrown by the target of an invocation.
Failed to enable constraints. One or more rows contain values
violating
non-null, unique, or foreign-key constraints.

Ideas?









.



Relevant Pages

  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • Re: Fields in Label dont give correct information
    ... You need to create a query based on tblRegEvent and tblRegPayment. ... -If your DCountis to count values in your report, ... half the time with very few errors (other than that label problem I had.) ... For example in the Room assignment on the report an idividual will be ...
    (microsoft.public.access.reports)
  • Re: C# and runtime data population of a crystal report
    ... Did you try to make a run just to get the schema, ... so as far as attaching the data to the report at design ... > Maybe, instead of my own data set, I need to create a data set (File ... >>> I have code that will create a query, use that query with an Adapter ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Tips on domain aggregate replacements
    ... This already is a split db, but the users are 400 miles away from the server hosting the data:) They are all running the same copy of the FE locally on a single terminal server via TS/RDP sessions. ... It doesn't seem to have much impact on performance; the report takes just about as long to run if they are all logged in as it does when I am logged on testing it at night. ... I would do DSums from the controls on the report on the data returned by the query. ... The biggest offender is a certain report that needs to Sum a particular complex total for each of the next twelve months (the DSum in VBA was a sideline to this issue) and present these as items on each line of output. ...
    (microsoft.public.access.modulesdaovba)
  • Re: using a form with combo box to input criteria
    ... Candia Computer Consulting - Candia NH ... When you removed the criteria, ... Then your criteria in the query would be... ... query behind your main report. ...
    (microsoft.public.access.forms)