Showing posts with label datasets. Show all posts
Showing posts with label datasets. Show all posts

Tuesday, March 20, 2012

Reporting services

Hi all,
I have three data sets to populate a report. and after this I have to use these datasets in an expression but they cause these errors which says that the report item needs to be in the same scope as the dataset and that it cannot be used in an aggregate function. Can we use multiple dataset in an expression inside the a report if so how? (p.s one of the datasets is a stored proc) what this sproc does is that it give a header name for my report headers. the others r used to populate the detail row by comparing it with the sproc as well as the other dataset.

any ideas?
thanks

Forum for reporting services:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=82&SiteID=1

Thanks

Tuesday, February 21, 2012

Reporting off ADO.NET datasets

hi,

I am trying to implement this:
http://blogs.msdn.com/bimusings/archive/2006/03/24/560026.aspx

my web service seems to work because i can view the data in the page when i invoke the public web method i created.

i'm trying to retreive the data and use it as the dataset in a report. this is my query string:
<Query>

<ElementPath IgnoreNamespaces="True">
GiveMeDataResponse {}/
GiveMeDataResult/diffgram{}/
Results {}/Table {CompanyID, CompanyName, ABN, Abbreviation}
</ElementPath>

<SoapAction>
http://tempuri.org/GiveMeData
</SoapAction>
<Method Namespace="http://tempuri.org/"
Name="GiveMeData">
</Method>
</Query>

When i try to run the query, it returns my four columns, but there is no data in the columns. it just returns one empty row.

what am i doing wrong?i don't know what i was doing wrong, but i got the example working.

But now i have a new problem and was hoping someone can help me?

I'm still following this example:
http://msdn2.microsoft.com/en-us/library/aa337489.aspx

I've changed the web method to return a dataset that has a datatable added to it. here is my code:

DataSet ds = new DataSet("Results");

DataTable dt = new DataTable("Results");

dt.Columns.Add("FirstName");
dt.Columns.Add("LastName");
dt.Columns.Add("Address");
dt.Columns.Add("City");
dt.Columns.Add("State");
dt.Columns.Add("PhoneNumber");

DataRow row = dt.NewRow();
row["FirstName"] = "Bob";
row["LastName"] = "The Builder";
row["Address"] = "10 My Street";
row["City"] = "Sydney";
row["State"] = "NSW";
row["PhoneNumber"] = "123456";
dt.Rows.Add(row);

ds.Tables.Add(dt);

return ds;

the query in Reporting Services doesn't return any data. It doesn't throw an error, it just returns one empty row.

Thanks for your help.