473,411 Members | 2,230 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Website Datasources Bug?

I'm using VS2005, C#, ASP.NET 2.0. I'm trying to create a report using SQL
Reporting Services (to be used in local mode so I don't have to deal with
SQL Server). When I create a new report in my website, nothing shows up in
the Website Data Sources window. I added a few different strongly-typed
Datasets to my website, and they don't show up. The only way I could get
anything to show up was to create a new class that's derived from a
strongly-typed Dataset I created in a separate assembly. Once I did that,
this parent Dataset (from the external assembly) was listed as a Website
Data Source (but not the derived class?). And, all of the sudden all of the
strongly-typed Datasets I created in my website also showed up. The
DataTables from the Dataset defined in my external assembly do not seem to
import into the Website Data Sources properly either. All DataTables are
listed once, with the exception of the first DataTable, which is listed
again with the name of the DataSet prepended to the DataTable's name. If I
delete the class (in my website) that I derived from the Dataset (in the
external assembly), then all of the strongly-typed Datasets I defined in my
Website project disappear from the Website Data Sources, as does the dataset
defined in the external assembly. I must be missing something, or there's a
bug of some sort.

Here's what I want to be able to do: Build a report based on a Dataset that
I've defined in a separate assembly from my website (i.e. my business logic
layer). I will populate this Dataset manually without using any database.
I don't think I should have to derive a class in my website (which I'll
never actually use) from the dataset defined in my separate assembly, just
to be able to use the Dataset defined in that separate assembly as a report
data source for my website.
Jan 2 '07 #1
19 3130
I sure feel your pain about Data Sources being extremely flakey. Im
using business objects, and maybe 20% of the time they show. Much more
often I have to close the solution, re-open it, bring up a report and
hope the objects are there. The one strongly typed dataset a test
report uses normally shows. The objects are exposed as a generic list,
which is what MS shows on the msdn site in their samples
Arrggghhhhh. Never had this nonsense with the crystal reportviewer.

cpnet wrote:
I'm using VS2005, C#, ASP.NET 2.0. I'm trying to create a report using SQL
Reporting Services (to be used in local mode so I don't have to deal with
SQL Server). When I create a new report in my website, nothing shows up in
the Website Data Sources window. I added a few different strongly-typed
Datasets to my website, and they don't show up. The only way I could get
anything to show up was to create a new class that's derived from a
strongly-typed Dataset I created in a separate assembly. Once I did that,
this parent Dataset (from the external assembly) was listed as a Website
Data Source (but not the derived class?). And, all of the sudden all of the
strongly-typed Datasets I created in my website also showed up. The
DataTables from the Dataset defined in my external assembly do not seem to
import into the Website Data Sources properly either. All DataTables are
listed once, with the exception of the first DataTable, which is listed
again with the name of the DataSet prepended to the DataTable's name. If I
delete the class (in my website) that I derived from the Dataset (in the
external assembly), then all of the strongly-typed Datasets I defined in my
Website project disappear from the Website Data Sources, as does the dataset
defined in the external assembly. I must be missing something, or there's a
bug of some sort.

Here's what I want to be able to do: Build a report based on a Dataset that
I've defined in a separate assembly from my website (i.e. my business logic
layer). I will populate this Dataset manually without using any database.
I don't think I should have to derive a class in my website (which I'll
never actually use) from the dataset defined in my separate assembly, just
to be able to use the Dataset defined in that separate assembly as a report
data source for my website.

Jan 2 '07 #2
Hello cpnet,

As for the Datasource for local report(RDLC) of webform reportviewer
control, it will list those DataSet or custom business classes defined in
the web project itself or in any referenced assembly or projects. Is your
separate class library project referenced through project reference or
direct dll reference? You can try removing it and adding reference against
it again to see whether it works. Here is the MSDN walkthrough on
displaying local report with custom business class in webform reportviewer:

http://msdn2.microsoft.com/en-us/lib...92(VS.80).aspx

For your scenario, if you want to supply the datasource for
reportviewr(localreport) without querying database(or use DataSource
control), you can do it programmatically as below:

==========aspx template==================
<div>
<rsweb:ReportViewer ID="ReportViewer1" runat="server"
Font-Names="Verdana" Font-Size="8pt"
Height="400px" Width="400px">
<LocalReport
ReportPath="c:\inetpub\wwwroot\ASPNET\V2\WebSites\ UrlCopySite\reports\simple
report.rdlc">
<DataSources>

</DataSources>
</LocalReport>
</rsweb:ReportViewer>

..........................

========code behind=======================
protected void Page_Load(object sender, EventArgs e)
{

UrlCopySiteLib.ProductDS.ProductsDataTable products = new
UrlCopySiteLib.ProductDS.ProductsDataTable();
products.AddProductsRow("product1", 1, 1);
products.AddProductsRow("product2", 2, 2);
products.AddProductsRow("product3", 3, 3);
products.AddProductsRow("product4", 4, 4);

ReportDataSource rds = new ReportDataSource("Products", products);

ReportViewer1.LocalReport.DataSources.Add(rds);

}

==================================

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 3 '07 #3
As for the Datasource for local report(RDLC) of webform reportviewer
control, it will list those DataSet or custom business classes defined in
the web project itself or in any referenced assembly or projects. Is your
separate class library project referenced through project reference or
direct dll reference? You can try removing it and adding reference against
it again to see whether it works. Here is the MSDN walkthrough on
displaying local report with custom business class in webform
reportviewer:
Unfortunately VS doesn't seem to behave like you're describing below.
Here's my situation:

- I have defined 3 DataSets in my web project (dsTest1, dsTest2, dsTest2)
- I have defined a 4th DataSet (dsTest4) in OtherAssembly.dll. Some classes
in my web project use this dsTest4 DataSet
- I have added a reference to OtherAssembly.dll in my web project
(right-clicked on my web project, and selected "Add Reference...", then
selected the assembly from the "Projects" tab of the Add Reference dialog)

When I do all of the above, NOTHING shows up in the Website Datasources
window. I have tried adding and removing the reference to OtherAssembly.dll
a couple of times, and this has not helped. OtherAssembly.dll is part of
the same solution as my web project.

Next, what I tried is:
- create a new class (dsTest4Descendent) in my web project that is derived
from dsTest4 (from OtherAssembly.dll)

When I do this, I see the following available as datasources:
- dsTest1
- dsTest2
- dsTest3
- dsTest4
- I do NOT see dsTest4Descendent listed.

As soon as I remove the dsTest4Descendent class from my web project, ALL of
the available Website Datasources disappear.

My web project also has a few helper classes that return strongly-typed
DataSets/DataTables as either public properties or methods, and none of
these show up as Website Datasources ever.
Jan 3 '07 #4
Thanks for your reply cpnet,

It seems the problem you met is specific to some particular things, and so
far my local tests behaves a bit different from you. I've performed some
research over the net and did found some other members suffer the similar
issue. Is this the only project you've suffered on the problem?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 5 '07 #5
I am suffering from the same problem. It started happening when I added
a new column on a datatable on my dataset and build the dll with the
dataset.
When I opened the rdlc to refresh the website datasource it just
vanished.
I created a new web site (jst for test), added a reference to my dll
(with the dataset), added a new report. The website datasources where
there (with my dataset), when I changed the datatable including a new
column, the problem happened the same way.

If you wanna see it happening, just create a simple class project with
a typed dataset and then a website project with a rdlc and then see the
website datasources, then you change your dataset, build and try to
refresh the website datasources. I will reinstall my vs2005 and the
vs2005 sp1 (which I installed yesterday) while I wait for your answer
Mr. Cheng.

Thanks in advance and sorry about my english (I'm Brazilian)

Alexander M. Santos (MCAD)

Jan 5 '07 #6
I was not able to get the issue using the same process as Alexander, but I
am able to replicate this by doing the following:

- Create an assembly "DataSetAssembly.dll" which contains only a
strongly-typed DataSet, "MyDS". (No TableAdapters needed, I just have 3
DataTables and 1 Relation).
- Create a web project that references "DataSetAssembly.dll"
- Add a SQL Server Reporting Services report to the web project. You will
see the DataSet/DataTables defined in "DataSetAssembly.dll" listed as
Website Datasources, however, the first table is always imported twice. I
have 3 DataTables in my DataSet: Test1, Test2, and Test3. These are listed
as "MyNamespace.Test1", "Test1", "Test2", "Test3". So, there is a bug in
how VS is importing the DataTables since the first table (Test1) is listed
twice.
- Add a class to the webproject.
- Add a public method to the class that returns a new instance of the
"MyDS" DataSet, defined in "DataSetAssembly.dll". Despite the fact that
this method returns the whole DataSet "MyDS", this is listed in the Website
Datasources window as, "MyDS.Test1" (as if the method only returns the first
DataTable from the DataSet).
- Add a public method or property to the class that returns one of the
DataTables from the MyDS DataSet. The Website Datasources window will now
be empty.
- Create a new class in the web project that derives from MyDS. In this
test, doing this achieved nothing - my Website Datasources list is still
empty. In my original project/solution when I first noticed the problem,
doing this would cause the Website Datasources list to be populated.
Jan 5 '07 #7
Hi cpnet,

Regarding on the behavior you mentioned in the last reply.

I think the first one:

====================
You will see the DataSet/DataTables defined in "DataSetAssembly.dll" listed
as Website Datasources, however, the first table is always imported twice.
===============

it is expected. Because this means that you can use a certain
DataTable(typed) as data source through two means.

1) directly reference to a DataTable's instance as datasource

2) reference to a typeDataSet which contains the DataTable. The reason why
the first item only contains DataSetName.FirstTable is because, the first
datatable is always the default member use to databind when you perform
databinding against DataSet(this is true for not only SSRS report, but also
normal ASP.NET databound control).

For the second issue, I have tested in my local environment and did
reproduce it.
================
Add a public method or property to the class that returns one of the
DataTables from the MyDS DataSet. The Website Datasources window will now
be empty.
==================

I'll perform some further research to see whether there is existing issue
on this and will update you as soon as possible.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Jan 8 '07 #8
Hello Cpnet,

After some initial discussion with some other engineers, there seems hasn't
an existing documented issue on this. Since this is an obvious problem
behavior which impact the design-time user experience, I have helped you
submited a bug request on this internally. I'll wait for the product team
engineer's feedback on this. I'll closely monitor it and keep informing you
the latest information.

Thanks for your understanding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 10 '07 #9
Sounds good... thanks.
Jan 10 '07 #10
We are experiencing the same issue. Website Data Sources are disapearing. On one machine it works ok (the same machine that created the object data sources), but on other team member machines, the data sources are not to be seen. We get an error message "Unable to load assembly xxx.dll or one of it's dependancies". Hope this helps. It may be related to the way the designer enumerates through the dependant assemblies?
Jan 11 '07 #11
Hello Cpnet,

Just inform you that we're still tracking this issue and the product team
has got the bug request and is finding the proper engineer to review it.
I'll keep inform you about the latest update.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 16 '07 #12
I am too having a similar problem with Website Data Sources.

My scenario is VS2005 sp1.

I have a very simple website which I am using to test ObjectDataSources
with the ReportViewer control.

I have a C# class in the App_Code folder.

It does seem fairly random if the ObjectDataSource I have created will
be displayed in the Website Data Sources.

The only way I can ensure that it does get displayed is to delete the
C# class then add it in again and Build Solution. Not an ideal way to
work!

Jan 17 '07 #13
I am having the same thing happen. I start a new AJAX enabled website
in VS2005 SP1. Proceed to add a simple business object from the walk
through and then add a report. The object data sources show up for a
while and then suddenly disappear after adding more objects to the
project and rebuilding. Any update on a fix would be appreciated.
Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Jan 18 '07 #14
If you uinstall SP1 for VS2005 the data sources appear flawlessly. So I
would suggest uninstalling SP1 untill there is a fix for this problem.

*** Sent via Developersdex http://www.developersdex.com ***
Jan 19 '07 #15
Hello Steven,

I followed the walkthrough example at http://msdn2.microsoft.com/en-gb/
library/ms251692(VS.80).aspx to create a ReportViewer with an object
data source. The data sources showed up once in the Website Data
Sources pane but had disappeared when I next opened the rdlc file. I
am no longer able to get any ODS to show up in the pane.

I have SP1 installed and note that others experiencing this issue also
mention that the bug disappears when not using SP1.

Has a workaround been found for this yet? Alternatively, is there
another place on the web that I should keep an eye open for a
solution?

Kind regards,

Rob Thijssen

On 10 Jan, 04:17, stch...@online.microsoft.com (Steven Cheng[MSFT])
wrote:
Hello Cpnet,
After some initial discussion with some other engineers, there seems hasn't
an existing documented issue on this. Since this is an obvious problem
behavior which impact the design-time user experience, I have helped you
submited a bug request on this internally. I'll wait for the product team
engineer's feedback on this. I'll closely monitor it and keep informing you
the latest information.
Thanks for your understanding.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
--
Rob Thijssen
www.thijssen.co.uk, www.linkedin.com/in/thijssen
+44 (0)7856 535344, +44(0)7983 485889, +44 (0)1752 774338

Jan 30 '07 #16
Thanks for your input Rob,

Yes, we're currently contacting some product engineer on this issue. And
they have also received many feedback on this and they found that the
difficulty here is that they can not definitely repro the issue through a
fixed means. AS you also encountered the problem and mentioned the SP1 one,
I'll also report this to the product engineer.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 1 '07 #17
Just a further update that the product team is still reviewing this issue.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 15 '07 #18
Hi All,

We're still tracking the issue request and wait on the further feedback
from product team.

Thanks for the understanding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 20 '07 #19
On 15 Feb, 01:35, stch...@online.microsoft.com (Steven Cheng[MSFT])
wrote:
Just a further update that the product team is still reviewing this issue.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Was this ever resolved, does anyone know? I'm having a lot of problems
with a website built along the same lines as the Beer House starter
kit, which is available as a download from the ASP.NET site. One one
machine, the website data sources tab only shows classes from the DAL,
on my home PC, it doesn't show anything. The same thing happens with
the Beer House site, if you download it and add a new web form
containing a report to it.

Mar 7 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SammyBar | last post by:
Hi all, I have some custom collections (ArrayList of custom Objects) and I want to display them using typical Windows form controls (DataGrid, Combo). What should I do to expose them as valid...
0
by: Greg | last post by:
Anyone having issues with their object datasources appearing and vanishing from the datasource browser? I create an object for binding as a datasource in my App_Code folder, compile my web...
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
8
by: Joey Chömpff | last post by:
L.S., Hello is there a way to implement 2-way databinding without using the datasources from dotnet 2.0. Why would you ask? Now that's simple. I've created an object model with BusinessObjects...
0
by: Owen Richardson | last post by:
I have a page that displays a news article in a form view feeding off a datasource that just picks up the id from a query string. I want to add functionality for related links - so i created a...
1
by: Magnus | last post by:
I have a set of typed datasets that are tied to a database on a mssql2005 server. They are naturally displayed and available in the DataSources window. Now I want to rename the database, but when I...
3
by: jobs | last post by:
I've got a gridview that does not have a datasourceid assigned in the markup. I'd like to switch between two datasources in the codebehind. when I do switch, I first reset the the...
0
by: jobs | last post by:
Is there a correct way to change the datasourceId of a gridview in codebehind so that things like sorting, paging and deleting actually work? Or will have have to have one one to one...
0
nev
by: nev | last post by:
i created a program with datasources which i added using the datasources wizard. my problem is the connectionstring server = localhost the program will be installed in 4 computers and the mysql...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.