ObjectDataSource: Dragging more than 1 property generates compile error  
Author Message
Frank Nesse





PostPosted: .NET Base Class Library, ObjectDataSource: Dragging more than 1 property generates compile error Top

I have created an ObjectDataSource for my report and I can drag the properties of the object inside a list on my reportdesign. Nice.... However, whenever I drag a second property inside the list on the same report and try to compile, I get the following error:

More than one data set, data region, or grouping in the report has the name ‘RZ_Agora_MarketInformation_Win32UI_Registration_MarketSegmentReport’. Data set, data region, and grouping names must be unique within a report. C:\agora\RZ.Agora.MarketInformation\Win32UI\Registration\PrintFormRecordingPerMarketSegment.rdlc RZ.Agora.MarketInformation

After, if I look into the DataSetName property of the list, I can select from two instances of the same dataset

There is a workaround, and that is by adding an empty editbox to the report and type the expression manually. It seems that the drag& drop event does some unwanted extra things.

Am I doing something wrong here or is this a bug

Another question: How can I tell the report that the ObjectDataSource has changed. If I add a property to my object and refresh the objectdatasource I do see the new property in the objectdatasource, but when I add this new property to the report I get the followoing compile error: (Id is the new property here)

The Value expression for the textbox ‘textbox1’ refers to the field ‘Id’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope. C:\agora\RZ.Agora.MarketInformation\Win32UI\Registration\PrintFormRecordingPerMarketSegment.rdlc RZ.Agora.MarketInformation

Is there any way to handle datasets inside a report manually (Using VS 2005 Standard Edition)




.NET Development4  
 
 
jeffgu





PostPosted: .NET Base Class Library, ObjectDataSource: Dragging more than 1 property generates compile error Top

I had a similar issue. Namely, after adding an object data source for use in my report, and consuming it in the report... I added additional public properties to the object. However, even after removing and again adding the ObjectDataSource to my project (and the report for that matter) these additional properties were not listed or accessible.

I guessed that some voodoo magic was going on with VS2005, perhaps involving the VS cache, and this indeed appears to be the case.

The following steps solved these woes:

1. I deleted the object data source.
2. I closed VS2005.
3. I deleted the VS cache file I found at "C:\Documents and Settings\JeffGu\My Documents\Visual Studio 2005\Settings". I forget what it was named.
4. I restarted VS2005 and opened my project.
5. I again added the object data source.
6. And there it was... the object with all properties accessible.

I assume some of these steps are unnecessary superstition... but it worked!

word.