Crossjoining Data From 2 Datasets

Mar 7, 2007

Hi,

I have one dataset DS1 connected to one SQL 2005 server DB, another dataset DS2 to different server on different physical machine, different SQL 2005 DB. I'm trying to build only one chart which data is based on those two different datasets DS1 and DS2. I understand that I can use subreports to use two different datasets, but how can I crossjoin those data together in one chart?



Thanks!

View 4 Replies


ADVERTISEMENT

Data From 2 Datasets In One Table

Apr 24, 2007

i have 2 datasets in my report.



dataset1 brings back:

date shirts pants

4/1 3 5

4/2 4 6

4/3 2 9



dataset2 brings back:

date shoes boots

4/1 7 4

4/2 3 2

4/3 9 8



i want to to have a report that shows:

date shirts pants shoes boots

4/1 3 5 7 4

4/2 4 6 3 2

4/3 2 9 9 8



when i added a table in the layout tab, and drag in fields from the 2 datasets, for the dataset1, i would get fields like "=Fields!shirts.Value". but, when i drag in fields from dataset2, it shows up like "=Sum(Fields!shoes.Value, "dataset1")".



i don't want the sum, i just want the value. when i take out the "sum" part of the field expression, i get an error that says:

[rsFieldReference] The Value expression for the textbox €˜shoes_1€™ refers to the field €˜shoes€™. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.


any advice?



thank you much :-)

View 7 Replies View Related

Problem Updating Data While Using Datasets And Sqldatasource

Apr 3, 2008

 




hello.i'm having the following problem.in one page i have a dataset created at runtime along side with sqldataadapter and an sqlconnection.i'm using a dataset here since i'm working with heirarchical tables.when i click on child table [in a spcific column] it opens up a new aspx page with an editing form [formview in edit mode]when
i press the update button it claims to update the data, but when i
close the form and reopen it from the same column it opens the form
again, but with the old data, and the new data doesn't get updated
until i close the openinig aspx page [the one with the table]
refreshing it doesn't work, nor does creating a postback.anyone has any ideas ?

View 2 Replies View Related

Change Data Source For Mutiple Datasets At Once

Jun 4, 2007



Hi All,



In the BI development studio when I have to change the data source for data sets within a report, I have to go to each of the datasets individually to do this. Is there a quicker way to do this. Say I want to change data source for the entire report in BI dev studio.



thanks



Sonny

View 3 Replies View Related

Data Access, DataReaders, DataSets, Web Pages And Controls

May 10, 2007

I have a question about loading data on the page lode event. The question is more conceptual then how to.
 
Using C#, I would like to make a call to a SQL 2000 Server, with the use of a stored procedure return one row with eleven fields. Then use the data to fill five different controls. There is no manipulation of the data it is just presented as information. With a DataReader and the GetValues method using the resultant array I can fill the controls (or can I), or with a DataSet and the Load method do the same thing. Now this code can be placed in the code behind page or it can be implemented in a class. This is the only page that uses this combination of fields and controls; however I would think a more generic call to the data could be made then pick and chose the fields as needed. What process makes the most sense? Is what I just described even possible (as yet I haven’t tried it)?
 
As always thanks in advance for any thoughts, comments, and suggestions.

View 1 Replies View Related

Reporting Services :: Accessing Data From 2 Datasets In A Tablix?

Aug 26, 2015

I have to create tablix report using data from 2 datasets. The data source for one of the dataset, DataSet1 is Microsoft SQL Server and the data source for the other dataset, DataSet2 is Excel.

I have to pic 3 columns from DataSet1 and one column from DataSet2.

I tried using a lookup function Expression:

=Lookup(Fields!ProgrammerName.Value,Fields!ProgrammerName.Value,Fields!Skill.Value, "DataSet2")

The above expression is throwing #Error on that column in the output.what should I do?

View 5 Replies View Related

Defining Report Datasets For Package Data From SQL Server Integration Services (SSIS)

Feb 22, 2008

Hi,

I'm using SQL 2008 Februar CTP and trying to use SSIS for Data Source as described in http://msdn2.microsoft.com/en-us/library/ms159215(SQL.100).aspx.
I've created SSIS package and preformed steps described in http://msdn2.microsoft.com/en-us/library/ms345250(SQL.100).aspx (after fixing version to 10.0.0.0).

Now I got next error when trying to add SSIS DataSource (in Report Designer - Visual Studio):


Error messageThe data extension SSIS could not be loaded.


Please help.

Matej

View 3 Replies View Related

Reporting Services :: Change Visibility Of Textbox (Tablix) Based On Data From Two Datasets?

Jun 11, 2010

I have two charts which are based on their own separate datasets.  One chart shows data aggregated by MONTH, the other chart shows data aggregated by WEEK.  I have put both of these charts inside a rectangle and set their visibility based on whether or not there is data returned by their respective datasets.  This part is working just fine.

However, I have added a tablix to the report, deleted all columns and rows leaving only one remaining row/column so it looks like a textbox.  This tablix is sitting on top of the two charts.  The problem i'm having is that when both charts return no data and they do not show up in the report, the tablix still remains visible. I need to set the visibility but based on a condition between the two different datasets behind each chart.

Here's what I need:  If ONE of the charts returns data, then I need the tablix to be visible.  If neither chart returns data, then I need the tablix to be invisible.  I'm trying to write an IIF statement comparing the two datasets but I get inscope errors.  Isn't it possible to compare values which are contained in two separate datasets in SSRS?

Seems like something like the following logic should work:

IIF(CountRows("Monthly_DataSet") > 0 OR CountRows("Weekly_DataSet") > 0 , FALSE, TRUE)

Obviously the above expression will return syntax errors, but you'll get the point as to how i'm thinking. How can I set the visibility of the tablix based on these two charts?

View 4 Replies View Related

Where Did The Datasets Go In .NET 2.0???

Jul 5, 2006

I typically use  DataAdapters and Datasets from the toolbox when connecting to a SQL database.  Since switching to VS 2005, I am not able to find (or add) these items to the tool box for web site development.
   Any ideas on how I can get them back?  Or is there a better alternative to retrieving the data so I can process it?  Any help or suggestions would be appreciated.
 
Thank you

View 1 Replies View Related

About Datasets

Apr 19, 2007

Can anyone advise me on how to view the contents of a dataset in VS dotnet 2003..

I had filled a dataset from a query...But i don know what happens after filling the qry results.It might be helpful if someone tells me to view the contents of the dataset

View 1 Replies View Related

Ado Datasets

Jun 6, 2007

hi

i am using older ado datasets in a borland 6 program.

i need to retrieve the data per record count....



example is that i need all 1000 records but i only want to retrieve them 100 at a time....

how will i accomplish this?

View 1 Replies View Related

Datasets And SQL Injection

Oct 25, 2007

I have become a big fan of the datasets in Visual Studio 2005.  I usually create the SQL for each method in the table adapter; however, I am wondering if there is any 'built-in' functions in the C files for sql injection prevention?  I have read that using stored procedures is a good method for prevention.  Should I be using SP rather than SQL within my methods in the data table?

View 5 Replies View Related

Working With Datasets

May 3, 2007

Hi,

Is there any possibility of combining data from two datasets to a single report item. If there is any thing that we can do, can any one please tell me what to do, so that my problem will be solved.

Thanks

Rajeev

View 1 Replies View Related

Large Datasets

Mar 27, 2008

Hi,

I have a table which has over 450,000 records in it, I have now split this into 4 so each table has around 100,000 records in it but I'm still having the problem of the data being returned really slowly.

What I need to do to this data is group it by a code and show the total for each code for every month of the year (this is currently based on one column and selecting the data accordingly). I have created views and put some indexes onto my table but the results are still being returned slowly. Does anyone have any suggestions of how I can speed this up?

Thanks

Gemma

View 5 Replies View Related

Datasets And Iff Statements

Sep 6, 2007



Hello experts,

I have a report with four different datasets that slice certain record by different days of the week. I can do the individual summing for each dataset by putting a , "datasetname" at in the expression. I also have 4 matrixes in the report that are grouped on certain transactions within each timeslice. My problem is that if I use the dataset name in the fields, the groups get ignored. Do I have to put the dataset name in each group expression? for example, here is my group expression...





Code Snippet
=iif(Left(Fields!TestName.Value,4)="VTAM","VTAM Logon",
iif(Left(Fields!TestName.Value,4)="CICS","VTAM Logon",
iif(Left(Fields!TestName.Value,4)="Shaw","SHAW Main Menu",
iif(Left(Fields!TestName.Value,7)="Inquiry","Inquiry Menu",
iif(Left(Fields!TestName.Value,6)="Search","Search Menu",
iif(Left(Fields!TestName.Value,6)="SEAX A","SEAX Auxiliary Search Menu",
iif(Left(Fields!TestName.Value,8)="SEAX - B","SEAX",
iif(Left(Fields!TestName.Value,4)="STLN","STLN","Other Value"))))))))






Not sure where I put the dataset name in this.

Thanks,
C

View 1 Replies View Related

Joining Two DataSets

Jan 2, 2007

How do you join two datasets in reporting services... one from sql and another from oracle?

Thanks

View 2 Replies View Related

Cached Datasets?

Aug 8, 2007

Hello all,
I have a report with a table and a chart. It uses dataset1 as the data source.
All works fine.
I create a new dataset called dataset2.
The queries are exactly the same. The only differences between the 2 datasets is the database server and the fact that one of the columns is a smallint (in dataset2) and an int(in Dataset1)
I change the datasetName property of both the table and the chart to use dataset2.
When I run the report I get a conversion error stating that there was an overflow of int2 while using dataset1. I have verified the report is not using dataset1 anywhere. If I delete dataset1 and run the report the error goes away. If I add it back, I get the error again. Why is the report looking at dataset1 if it is not referenced at all in the report? Does SQL RS cache the datasets and verify each when it compiles?

regards,
Bill

View 9 Replies View Related

Relationship Between Two Datasets

Apr 29, 2008

If I have a dataset that has ID and CODE, and another dataset that has CODE and DESCRIPTION, is it possible to relate these two datasets to one another so I put the ID and Code in columns 1 and 2 and then put the related DESCRIPTION in column 3 on the report table layout? In other words, can you "JOIN" two datasets, or must all that be done in the query and create a unified dataset for the report contents?

View 6 Replies View Related

Multiple Datasets

May 31, 2007

I have a report that I have created with multiple subreports and datasets. There should be a better solution so I am asking the question here.



The report should display like this:







Object
Object Title
Budget
Curr-Spent
Ytd-Spent
Ytd-Encum
Post-Ytd
Balance
% Remaining

4100
EMPLOYEES
$380.00
$250.93
$343.67
$0.00
$0.00
$61.33
15.94%

4102
EMPLOYEES - TEMPORARY
$149.00
$110.75
$139.70
$0.00
$0.00
$47.30
30.16%

4201
EMPLOYEE BENEFITS
$138.00
$73.16
$12.60
$0.00
$0.00
$32.40
25.28%



Each column represents another dataset.

Each column right now is a subreport so I can use the object as a parameter to the subreports dataset. Each column needs to have the object as a parameter.



Is there a way I can pass a field from the first dataset as a parameter for the next dataset without using subreports?

View 4 Replies View Related

Joining Two Datasets?

Mar 8, 2007

Hi All,

I have got two datasets. Some 'normal' rows with state values and an addtional dataset with the translation from state value to plain text (value / text pair).

A table object is attached to the first dataset, but I would like to show the plain text from the second dataset in a group header. So I'd like to do some kind of 'look up in another dataset'.

I wasn't able to find a function that could help me solve this problem. Does anyone has any ideas on this?



Kind regards.

View 6 Replies View Related

Connect To SAS Datasets

May 4, 2006

Is it possible to connect to SAS dataset using MS SQL Server 2005? If yes, then please explain how do I access SAS data source.

View 1 Replies View Related

Using Two Datasets In A Report

Feb 25, 2008

hello everyone!

i have a report in which i use two datasets
the problem is that when i was using only one, there wasn't any scope argument you know, to tell in which dataset i am , because there was only one and all fields and cells in my table returned me the correct values

but as soon as i add the second data set and i drag and drop the datasets fields in my table

instead of having for instance



Code Snippet

=Fields!Consultant.Value






or




Code Snippet=(Fields!Consultant.Value, "dataset1")





it automtically applies the function "first"




Code Snippet=First(Fields!Consultant.Value, "dataset1")





and i don't understand why

please can you give me precious help on this

because it returns me the name of the first consultant only and if i deleter the function first in the expression, the report doens't work anymore

View 3 Replies View Related

2 Datasets In One Report?

Nov 29, 2007

Dear Experts,

I have a problem regarding my report.

Can we use 2 datasets in one report (tabular or chart, either one)?

my report get its data-fed from OLAP database (Cubes) and Oracle tables.

Let say the cube contains the actual sale (all aggregated and query using MDX) and the Oracle table contains the budget value for specific period.

And I am trying to construct a tabular like this:

date item type Revenue Budget Actual (Sale - Budget)
Jan calls regular 2000 1800 200
Jan calls super 3000 2500 500
Feb calls new 1000 900 100
Mar calls super 4500 4000 500
..... and so on

The data for date, item, type and Revenue are available in the OLAP (cubes) and the Budget value is available in Oracle table and we can't afford to transfer the Budget value to the cube.

Is this possible in SSRS? Please let me know if more information needed.

Thanks very much

View 6 Replies View Related

2 Datasets For 1 Table

Sep 28, 2007

Hi !

I'm creating a report with SSRS (2005). In that report I have a table, and in that table I need to put fields from two different datasets. But I don't know how to link those both datasets (because if I don't I get a cartezien product)...

Could someone help me please ??


PS : Excuse my poor english please...

View 9 Replies View Related

Using 2 Datasets In The Same Table?

Jul 31, 2007

is this possible? i need to make a report that accesses two different tables, one for user activity and the other for the number of reports that user has done. the report information is in a different database however so i have to use different datasets. is there a way to use both databases in the same table? all i need is the one field from the reporting one and they can be linked by the user id...

View 1 Replies View Related

Filtering Datasets

Jun 18, 2007

I have the following report



1. A mulitvalued parameter State with WA, SA, QLD, TAS etc

2. A single value parameter of Top n - 10, 20, 40



The user will select the state and the top number to get the top n sellers off that state or a combination off states.



I have a dataset with the following cutdown version off SQL





Declare @TopNo Int

Set @TopNo = @Param_TopNo

Set Rowcount @TopNo



SELECT CreateDate,SaleDate,sales.Consultant, State, Sum(Value) As Winbacks

FROM dbo.tbl_kpi_sales

GROUP BY CreateDate, Consultant, State, SaleDate, Winbacks

ORDER BY Winbacks Desc;



Set RowCount 0


When I execute it and select 'Select all' from the mulitvalued state parameter with a Top N value off 100 the query returns all the top 100, which is correct, however when i select just a single state ie WA it only returns me the records which were in the TOP 100 off all states when it should be filtering it by only the state I choose and returning the 100 records...For some reason it when a single state is selected or a combination off states the dataset is already narrowed down and doesnt reexecute the query for just that state...Can someone suggest how to overcome this, maybe a table filter ?

View 2 Replies View Related

Combining Two Different Datasets Into One

Mar 26, 2008


I am relatively new to MS Reporting and I can€™t figure out how to do something that seems rather simple.

I need to somehow combine two different SQL statements into one dataset. The two different SQL statements are the same, except for the Select list and the Where.

Example,

1st Dataset:

SELECT dbo.claimtable.grpnum_plancode, dbo.plancodetable.plandescription,
SUM(dbo.claimtable.charges) AS Charges,
SUM(dbo.claimtable.benefitpaid) AS BenefitPaid
FROM dbo.claimtable INNER JOIN dbo.plancodetable ON
bo.claimtable.grpnum_plancode = dbo.plancodetable.grpnum_plancode
WHERE (dbo.plancodetable.plantype = 'Med') AND (dbo.claimtable.paiddate BETWEEN @BeginDate AND @EndDate) AND (dbo.claimtable.paidflag = 'Y') AND (dbo.claimtable.grpnum IN (@GroupNumber))
GROUP BY dbo.claimtable.grpnum_plancode, dbo.plancodetable.plandescription

2nd Dataset:

SELECT dbo.claimtable.grpnum_plancode, dbo.plancodetable.plandescription, COUNT(distinct dbo.claimtable.claimid) AS ClaimCount
FROM dbo.claimtable INNER JOIN
dbo.plancodetable ON dbo.claimtable.grpnum_plancode = dbo.plancodetable.grpnum_plancode
WHERE (dbo.plancodetable.plantype = 'Med') AND (dbo.claimtable.paiddate BETWEEN @BeginDate AND @EndDate) AND (dbo.claimtable.paidflag = 'Y') AND (dbo.claimtable.backoutflag = 'N') AND (dbo.claimtable.grpnum IN (@GroupNumber))
GROUP BY dbo.claimtable.grpnum_plancode, dbo.plancodetable.plandescription


I tried just referring to the different dataset within the report table, but it only provides it at the aggregate level and I need the claimcount at each individual claimtable.grpnum_plancode level.

I tried a union statement, but get a variety of errors.

Any help would be greatly appreciated.

View 4 Replies View Related

[Almost Resolved] SqlDataReader Vs. DataSets

Feb 1, 2008

Hi,
I am pretty new to harcore ASP.NET and .NET in general but I know the basics of the language and stuff like that. Basically I used to be a hardcore object pascal Delphi developer doing Windows Applications but have now moved to .NET world. The reason I posted this question here is I couldn't find any other specific place to ask so here it goes.
To get me started with good programming source and practices I downloaded the ASP.NET TimeTracker Starter Kit and after some modificaion in connection string (using SQL 2005 Developer edition not the Express one) I have managed to make it work. Things done in there are pretty interesting way by using a delegate to retrieve data and present it using databound controls.
As much simple as it sounds I am more of a fan of not using too many databound controls except in dropdown box, list box and stuff like that. So basically I need to develop DataAccessLayer (DAL) in such a way that it's useful for both Windows and Web application. So with my research I found that I should be using DataSets in the DAL because they are serializable and thatz what Web Applications & Services love over using SqlDataReader. Other advantage of using DataSet is to use ForEach syntex over While Loop in SqlDataReaders. So below is some code I extracted from the TimeTracker Starter Kit to get me started.
I also noticed that the return result is a list array of certain object, in this case Category. So does it mean that it can be used in frontend using ForEach syntex? How can I convert the code below to use DataSets over SqlDataReader?  Private Delegate Sub TGenerateListFromReader(Of T)(ByVal returnData As SqlDataReader, ByRef tempList As List(Of T))

Public Overrides Function GetAllCategories() As List(Of Category)
Dim sqlCmd As SqlCommand = New SqlCommand()
SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_CATEGORY_GETALLCATEGORIES)

Dim categoryList As New List(Of Category)()
TExecuteReaderCmd(Of Category)(sqlCmd, AddressOf TGenerateCategoryListFromReader(Of Category), categoryList)

Return categoryList
End Function

Public Overrides Function GetCategoryByCategoryId(ByVal Id As Integer) As Category
If Id <= DefaultValues.GetCategoryIdMinValue() Then
Throw New ArgumentOutOfRangeException("Id")
End If

Dim sqlCmd As SqlCommand = New SqlCommand()
AddParamToSQLCmd(sqlCmd, "@CategoryId", SqlDbType.Int, 0, ParameterDirection.Input, Id)
SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_CATEGORY_GETCATEGORYBYID)

Dim categoryList As New List(Of Category)()
TExecuteReaderCmd(Of Category)(sqlCmd, AddressOf TGenerateCategoryListFromReader(Of Category), categoryList)

If categoryList.Count > 0 Then
Return categoryList(0)
Else
Return Nothing
End If
End Function

Private Sub TGenerateCategoryListFromReader(Of T)(ByVal returnData As SqlDataReader, ByRef categoryList As List(Of Category))
Do While returnData.Read()

Dim actualDuration As Decimal = 0
If Not returnData("CategoryActualDuration") Is DBNull.Value Then
actualDuration = Convert.ToDecimal(returnData("CategoryActualDuration"))
End If

Dim category As Category = New Category(CStr(returnData("CategoryAbbreviation")), actualDuration, _
CInt(returnData("CategoryId")), CDec(returnData("CategoryEstimateDuration")), CStr(returnData("CategoryName")), _
CInt(returnData("ProjectId")))
categoryList.Add(category)
Loop
End Sub
Hope this makes sense. Sorry if I have posted this in a wrong section..!
Cheers,Nirav

View 6 Replies View Related

SqlDataSources Or DataSets - Confused

Apr 10, 2008

 I was watching the "To Do List" AJAX video created by Joe Stagner and while watching the video I noticed (in designer) Joe use a Dataset to populate a Gridview and this got me thinking. I have a few gridviews in my app at work that just use SqlDataSources, and they seem to work fine, but is it better to use Datasets ? 

View 3 Replies View Related

Selecting Fields From 2 Datasets

Mar 16, 2006

Need syntax for selecting fields from 2 different datasets in one report.

Each dataset connects to a different server.

View 3 Replies View Related

Need Inventory Datasets ! URGENT

Aug 3, 2004

i want to make business portal intellegence with sql2000 as my final project but i don't have datasets. i need iventory datasets like northwind or foodmart or middlewest. somebody help me please!!

View 1 Replies View Related

Beware Of Avg() For Large Datasets

Oct 31, 2006

Not a question, just a post about something I ran into today that surprised me a little.

I have a huge dataset - about 700m rows, one column of which is a tinyint. I needed to take an average of that column, so I did this:


select avg(mytinyint) from mytable


which returned:


Msg 8115, Level 16, State 2, Line 6
Arithmetic overflow error converting expression to data type int.


It turns out, if the sum() over the column is bigger than MAX_INT = 2147483647, then avg() will throw this error. This surprised me a little - I guess I was assuming sql server would use bigint internally when computing integer avg, but it uses int.

so you have to do this:


select avg(cast(mytinyint as bigint)) from mytable


what's annoying to me is, it's impossible that an average of type T could be larger or smaller than the max/min allowed value of a type T. This means sql server devs could have internally always used bigint for sum and count, and then returned cast(sum/count as T) from avg() without possibility of overflow (unless sum or count was bigger than the max bigint! you are on your own if that happens i guess!).

Because of this, you have to cast your column to a bigint to make it work if your dataset is large enough, even if the column is only 1 measly byte! kind of a waste of space if you ask me. :)

here's a little example of what I'm talking about, that doesn't require you to import a 700m row dataset :)


declare @t table (id int)
insert into @t select 1 union all select 2147483647
select avg(cast(id as bigint)) from @t -- works
select avg(id) from @t -- fails

View 2 Replies View Related

Two Different Datasets In A Single Table.

Jan 18, 2008



Hi,

I need to display the datas in a table format. I have placed a table and now i need to use two different datasets for a single table. Those two different datasets are generated based on two different stored procedures. Those stored procedures retrieve data from two different sql tables. Can any one explain me how to use two different datasets for a single table. As far i have tried i was able to fetch only the first record of the other dataset. But i need to fetch all the records of both the dataset. Thanks in advance for any help.

Thanks,
Sangeethaa

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved