473,547 Members | 2,532 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3141
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(loc alreport) without querying database(or use DataSource
control), you can do it programmaticall y as below:

==========aspx template======= ===========
<div>
<rsweb:ReportVi ewer ID="ReportViewe r1" runat="server"
Font-Names="Verdana" Font-Size="8pt"
Height="400px" Width="400px">
<LocalReport
ReportPath="c:\ inetpub\wwwroot \ASPNET\V2\WebS ites\UrlCopySit e\reports\simpl e
report.rdlc">
<DataSources>

</DataSources>
</LocalReport>
</rsweb:ReportVie wer>

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

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

UrlCopySiteLib. ProductDS.Produ ctsDataTable products = new
UrlCopySiteLib. ProductDS.Produ ctsDataTable();
products.AddPro ductsRow("produ ct1", 1, 1);
products.AddPro ductsRow("produ ct2", 2, 2);
products.AddPro ductsRow("produ ct3", 3, 3);
products.AddPro ductsRow("produ ct4", 4, 4);

ReportDataSourc e rds = new ReportDataSourc e("Products", products);

ReportViewer1.L ocalReport.Data Sources.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.d ll. Some classes
in my web project use this dsTest4 DataSet
- I have added a reference to OtherAssembly.d ll 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.d ll
a couple of times, and this has not helped. OtherAssembly.d ll is part of
the same solution as my web project.

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

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

As soon as I remove the dsTest4Descende nt 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 "DataSetAssembl y.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 "DataSetAssembl y.dll"
- Add a SQL Server Reporting Services report to the web project. You will
see the DataSet/DataTables defined in "DataSetAssembl y.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.Te st1", "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 "DataSetAssembl y.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 "DataSetAssembl y.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.Fir stTable 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

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

Similar topics

2
324
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 datasources to these controls? What if I want that these collections work with Visual Studio on design time in order to allow me easy create grid...
0
1560
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 project and it appears in the datasources in the report designer. Then I will make an aspx, setup a reportviewer control for my new report, go back to...
9
2882
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 answered... There are articles on the new TableAdapters where it says that a key new advantage is that a single TableAdapter, which can have multiple...
8
1824
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 and I don't want to write an separate provider layer for the datasources. This is because I loose all the benefits of my objectmodel. Are there...
0
1167
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 stored procedure that takes three parameters. On the page i have added a second datasource which calls my stored proc, and spits out the results into a...
1
2034
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 do that and reconfigure any of the datasets with the Wizard, all the datatables I have previously selected are marked as unavailable (with a red x...
3
7225
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 gridviewx.datasource = nothing and gridviewx.datasourceid = nothing before setting it to gridviewx.datasource = newdatasoruceid and then rebinding. All...
0
1014
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 relationship between datasources and gridviews? when I switch datasources - deletes don't happen and I get erros like this when I try to page or sort:
0
943
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 database will be configured in one of those pc. what must i do to correct the connection string in my program. when i tried searching the word...
0
7437
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7703
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7463
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3493
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3473
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1923
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.