Dataset MDX Query For ALL Selected In Parameters

Apr 2, 2008



Hello All,

I have 2 MultiValued Parameters in my reports, our of which first is dependent on the other.

Eg. I have a SubProductGroup Parameter and depending upon the value selected in SubProductGroup, the other parameter which is Product gets filled in combo box.

Both these parameters are MultiValued and I am having "Select ALL" option in both the combo box.

Now, whenever you select any SubProductGroup values, the Dataset for Product gets executed to fill the Product combo box.

The MultiValued Parameters works using the "IN" Clause. All those products are retrieved which are "IN" the selected SubProductGroup.

Whenever user selects "Select All" option for SubProductGroup, there is no need for this "IN" clause, because we actually need all the records for Product.

Similarly, I have the Main Dataset which retrieves the Sales data for the Products selected from the Combo Box. So, the same question arises there also.

Right now I am using STRTOSET( ) and Join( ) function and this is working fine for me.

But when User Selects "Select All" in SubProductGroup, it takes a long time to fill the combo box for Product as well as when user selects "Select All" for Product, it takes a long time for the actual Dataset to retrieve records. But its working fine.

In order to improve the Performance, I am trying to eliminate this IN clause when "Select All" is selected.

How can I do this ?


Any Inputs ?

Thanks & Regards,
Kapadia Shalin P.

View 4 Replies


ADVERTISEMENT

Reporting Services :: Can The Report Parameters Be Passed To Query Of Referenced Dataset

Sep 29, 2015

So I have a report that uses an MDX query to fetch the main data for the tablix.  Then I have a custom row added which pulls data in via a Lookup function and references a different dataset.  The report has 3 parameters.  Each dataset uses those 3 parameters in its underlying query.  However, the dataset referenced in the lookup function doesnt seem to be updating when change the parameters and re-run the report.

View 2 Replies View Related

Return Value For One Selected Row From A SQL Database/Dataset Problem

Jan 26, 2008

I try to get a value from ArtikkelId from a SQL database into a textbox. Can anyone help me?
My Code-----------------------------------------
Imports System.DataImports System.Data.SqlClient
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Conn_News_db As String = System.Configuration.ConfigurationManager.ConnectionStrings.Item("NEWS_CS1").ToString()Dim SQL_conn As New SqlConnection(Conn_News_db)Dim SQL_cmd1 As New SqlCommand()Dim myDataSet As New DataSetDim Select_ArtId_Max As String = "Select ArtikkelId from Hoved where ArtikkelId=(Select MAX(ArtikkelId) from hoved)"Dim SQL_DA As New SqlDataAdapterSQL_DA.Fill(myDataSet)TextBox1.Text = myDataSet.Tables.Item["ArtikkelId"]
End Sub----------------------------------

View 2 Replies View Related

Displaying Selected Parameters In A Report

Jun 29, 2006

Hi,

In the report I'm working on, I want to display a list of the parameters selected by the user, as in:

Selected Cars:
Toyota Camry
Ford Taurus
Chevy Corvette
Saturn Ion

Note that these are selected items from a multi-value parameter. How can I go about doing this with Reporting Services 2005? In ASP.NET, I'd just use the parameter array as the datasource for a repeater/datagrid/gridview. Could I do something similar with SSRS? I'd really like to use the format specified above, whether or not it is in a table; I really don't want to do the following:

Selected Cars: Toyota Camry, Ford Taurus, Chevy Corvette, Saturn Ion.

Thanks,
Mark

View 5 Replies View Related

Selected Date Parameters Not Working

Jun 2, 2007

Hi all,

I'm looking to return certain rows from our db into an SSRS based on a user selected date range using the parameters calendar.

My query/analyzer returns all required fields/rows, but how do I
pull the specific rows, (that are based on a date range that the user enters),into the report? I've tried expressions, and vb functions to no avail. The users will be using the calendar parameter to select date ranges .So far the reports pull in all rows from my query.

Thanks,

Scott

View 1 Replies View Related

Reporting Services :: Displaying A Chart Based On Parameters Selected

Oct 2, 2015

I am producing a report in Report Builder 2 containing a chart and table.  The user is able to select single or multiple choices on a parameter called Specialty.  My present chart is only suitable when one Specialty is selected.  Therefore I only want this to be visible when the user has selected one Specialty.  I am planning to create a second chart which is suitable for than more than one selection. So if the user selects more than one Specialty the existing chart will not be visible and instead will be replaced by the second.I think this should be done using Chart Properties>Visibility but cannot develop the logic of the expression.

View 5 Replies View Related

Reporting Services :: SSRS 2008 R2 - Default Multi Value Parameters Are Not Selected

Feb 21, 2011

I've been running into this issue quite a few times, and have been unable to solve it through reading various posts/forums.  Here is the issue

Software Details:
Datawarehouse Database - SQL Server 2008 R2
Reporting Services Version - SSRS 2008 R2
Development Environment - Visual Studio 2008
Problem Details:

I have been writing reports based of a Relational Datamart with dimensions and facts.  The report in question uses dimensions for parameters and facts for content.  Multi valued parameters are enabled in the report query by using the 'IN(@Paramenter)' statement within the report query.  It has a total of 6 multi-value parameters.  I assign the same available values from dimension datasets for each parameter to it's default parameter. Theoretically all the values in the option lists should be selected after first render.  This is not always the case.

Example:
SELECT *
FROM dbo.MyTable
WHERE
TableColumn0 IN (@Parameter0)
AND
TableColumn1 IN(@Parameter1)
AND ....N (continue syntax to 6 multi valued parameters)
 
Some of the multi-value drop down lists are defaulting to have every value selected, and some are not. The problem is I need to know why some parameters are not selecting all by default when specified.

View 23 Replies View Related

Show/Hide Report Parameters Based On Selected Values In Different Parameter

Mar 14, 2007

Hi All,


I have requirement where first I need to show only one report
parameter. Based on user selection I need to prompt or show the user
another report parameter.


Say suppose I have 3 parameters. User selects first value in first
parameter I should not show the other 2 parameters. If user selects
second value in first parameter I should show second parameter and
hide third parameter. There is no relationship between these 2
parameters except user selection. Similarly if user third value in
first parameter then I should show third parameter and hide second
parameter.


Is this possible? I can not see any Visible property for report
parameters.


If yes, how to achieve this functionality?


Appreciate your help.


Regards,
Raghu

View 1 Replies View Related

How To Show The User Selected Values In Page Header By Using Parameters Which I Have Already Created In The Report

Dec 10, 2007

Hi ,

I am working on Sql server Reporting Services(Sql Server 2005),

i have designed a Report and deployed that report on Report Server, on this report i need to show the user selected values
in page header by using Parameters which i have already created in the Report.

There are 35 to 40 fields in the Front End(Asp.net2.0)

on passing all these values from front end Report is prompting for parameters which is not desired for my case even though i have made ShowParameterPrompts to false.



Thanks in advance

Srinivas Govada

View 1 Replies View Related

Is There Any Way To Train A Portion Of A Training Data Set From A Selected Dataset For Data Mining?

Jun 19, 2007

Hi, all experts here,



I am wondering is there any way to select only a portion of a data set to train the mining model? In this case, I mean we dont need to split the dataset in advance, what I want to do is being able to select any random portion of a selected dataset to train a mining model. Any advices?



I am looking forward to hearing from you and thanks a lot in advance for your advices and help.



With best regards,



Yours sincerely,



View 3 Replies View Related

Reporting Services :: SSRS 2008 R2 Cascading Parameters - Visible Only When Certain Criteria Previously Selected

Oct 22, 2015

I am creating a report where there are 3 tables in one report which have visibility set as an expression so that when a certain criteria is selected in the "Report" parameter, a different table is shown below.  This works as expected.

When table 3 is shown, I want a new parameter to be visible to the user called "Ward" where the user will select the ward they are interested in and the table will display data below just for the ward selected.  However, I don't want the ward parameter visible when either of the other 2 options are selected. Is this possible and how to do this? 

View 3 Replies View Related

Parameters Value From One Dataset

Mar 11, 2008

Hello.
I have one dataset with a few parameters.
Each parameter get its available values from the some dataset.

So if I have the main DS whice is:
"select name,age,sex from table1 where age = @age and sex = @sex"

The available values for the parameters "age" and "sex" are those datasets:

"select distinct age from table1" and
"select distinct sex from table1".

The problem is thet the query on table1 takes a lot of time and in this case I need to run her three times.

Is there a way to initialize the parameters values in one query excution and save some time?

Thanks.

View 4 Replies View Related

DataSet Fill Using Cmd.Parameters - Legal?

Jan 2, 2007

A - Must Declare variable @ZipEntry - error generates when I run the code below.  If I hard code the "WHERE ZipCode = 72364" it works (display messed up but it works - don't know how to code in the line breaks yet).  But when I try to pass in the value of a TextBox called txtZipEntry on the page I get this error.  Am I not delcaring @ZipCode in the correct spot ?
Thank you,
public partial class ContractorResultsDisplay : System.Web.UI.Page{string ZipEntry;protected void Page_Load(object sender, EventArgs e){
ZipEntry = txtZipEntry.Text;SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["localhomeexpoConnectionString2"].ConnectionString);string sql = "Select [City], [StateCode], [AreaCode], [Latitude], [Longitude], [ZipCode] From [ZipCensus11202006] Where ZipCode > @ZipEntry";SqlCommand cmd = new SqlCommand(sql, con);cmd.Parameters.AddWithValue("@ZipEntry", ZipEntry);SqlDataAdapter da = new SqlDataAdapter(sql, con);
DataSet ds = new DataSet();da.Fill(ds, "ZipCodeRefs");StringBuilder htmlStr = new StringBuilder("");
foreach (DataRow dr in ds.Tables["ZipCodeRefs"].Rows){htmlStr.Append(dr["City"].ToString());}
ZipContent.Text = htmlStr.ToString();
}
}

View 1 Replies View Related

Reporting Services :: Passing Parameters To MDX Dataset

Oct 1, 2015

I have an MDX data-set query as follows: -

Member [Measures].[Measure3] As [Measures].[Value Rent Period Receipts]
Member [Measures].[Measure4] As (([Measures].[Value Rent Period Receipts]*-1)/[Measures].[Value Rent Period Debit])

Select {[Measures].[Measure1]
,[Measures].[Measure2]
,[Measures].[Measure3]

[Code] ....

There are two parameters; the value of lag passed to the LastPeriods function, and tenancy types passed in the where clause

I have a third parameter I would like to use called FirstDate and this I would like to pass to the LastPeriods function as the second argument

FirstDate is a value from my Time dimension, something like [Time].[Fiscal Time].[Sep. 15]

When editing the query to: -

Member [Measures].[Measure3] As [Measures].[Value Rent Period Receipts]
Member [Measures].[Measure4] As (([Measures].[Value Rent Period Receipts]*-1)/[Measures].[Value Rent Period Debit])
Select {[Measures].[Measure1]
,[Measures].[Measure2]

[Code] ....

The code errors. I have tried all sorts of formats such as  LastPeriods(@LagMonths,[@FirstDate]) and LastPeriods(@LagMonths,[Time].[Fiscal Time].[@FirstDate]), but nothing works

View 2 Replies View Related

How To Get The Values From Dataset To Parameters On Report Header

Mar 13, 2008



Is it possible to get the reportdataset field values into parameters. dynamically when the report is generated.

Thanks.

View 1 Replies View Related

Reporting Services :: How To Display (All Selected) When Parameter (Select All) Is Selected In SSRS

May 6, 2015

Using SSRS 2008 r2...I have a report with a single-value parameter and three multi-value parameters, Class1, Name2 and Name3. I'm hoping for an explanation to one thing that I'm seeing and information on a second thing.

Class1 and Name2 both have the (Select All) parameter selected but Class1 is displaying the concatenated parameter variable list whereas Name2 is showing Null. Why is that? If anything, how can I get Class1 to be similar to Name2 and show Null?But my desired wish is to have Class1, Name2 and Name3 display the text"All Selected" when the parameter (Select All) is chosen.

View 3 Replies View Related

SQL 2012 :: Selected Subscriber Does Not Satisfy Minimum Version Compatibility Level Of Selected Publication

Feb 21, 2014

I have created a Transactional Replication Publication on my SQL 2012 server.When I log into another server on the domain running 2008R2 and try to subscribe to the 2012 Publication, I get the following error when clicking on "Add SQL Server Subscriber": "The selected Subscriber does not satisfy the minimum version compatibility level of the selected publication"

The 2012 DB is set as 2008 Compatibility Mode?Am I not able to Publish from 2012 to 2008?.I was using SSMS 2008 to connect to my 2012 Instance, thats why it didn't work...

View 0 Replies View Related

Passing Parameters To DataSet Useb As Report Data Source

May 21, 2007

Hi guys,



How can I pass a parameter used for the DataSet query? I'm using this DataSet file as data source of my .rdlc report for Windows Forms.



I've already done a .rdlc report to Web Forms where I passed the query parameter by ObjectDataSource.SelectParameters, but in Windows Forms this object was not created. I just hava the following created objects:

- despesaTableAdapter (from myDataSetTableAdapter)

- despesaBindingSource (Windows.Forms.BindingSource)

- RelatorioDataSet (from myDataSet)

- relatorioDataSet1 (from myDataSet)



Any help will be very appreciated.







Tks and rgds,

Luis Antonio

View 1 Replies View Related

Update Records Just Selected (in One Query)

Mar 28, 2006

I have a stored procedure that I give some parameters and it joins a couple of tables and returns the results.  I would like to know how to update the records in one of the original tables before returning results.
CREATE Procedure dbo.DS_GetSomething(@someValue char(5)AS
Select table1.* ,table2.* FROM table1 left inner join table1.itemid on table2.itemid where table2.someValue = @someValue
The table has a field of IMPRESSIONS that I would like to do something like:
;UPDATE table1 set impressions=impressions + 1 where recordid=??
I don't know how to access the recordids I just got from the original select statement.
Thanks for any help
Greg

View 7 Replies View Related

Can A Query Using OUTPUT Statement Be SELECTED From?

Oct 19, 2007

I tried wrapping a DELETE FROM ...OUTPUT DELETED.* WHERE... inside of a select, crossed my fingers and got a syntax error. I thought maybe since the OUTPUT statement produces a rowset that it and it's DELETE could be selected from. Is such a thing possible in the same query or should I give up?

View 5 Replies View Related

SQL Query - Updating Selected Rows/Creating New Row - Same Table

Jan 24, 2008

I have to write a couple scripts that will update a couple columns in two separate tables and also insert a new row with the same data except for a few calculated or provided values ...... see specs below ...




1. tGradeHist Table Script One (Needs to be run first)



a. Read tGradeHist Table and Select rows with GradeEndDate = NULL and GradeStartDate = '1/1/2007 12:00:00 A.M.'

b. Calculate New Step Amount = StepAmount * Incr% (Round To Nearest Whole Dollar)

c. Create New Row for this table using information from row read above and insert new information where indicated :


GradeCode - Same

GradeLocationCode - Same

Step - Same

GradeStartDate - '7/1/2007 12:00:00 A.M.'

GradeEndDate - NULL

GradeCurrencyCode - Same

StepAmount - Result of b (above)

GradeFrequencyCode - Same

RangeMaximumAmount - Same

RangeMidAmount - Same

RangeMinimumAmount - Same

GradeCurrentFlag - 'True'

MarketMaximumAmount - Same

MarketMidAmount - Same

MarketMinimumAmount - Same

GradeGUID - Same

TSCOL - Same


d. Update Row read in a (above) with GradeEndDate = '6/30/2007 12:00:00 A.M.' and GradeCurrentFlag = 'False'





2. tPersonBasePayHist Table Script Two (Needs to be run second)


a. Read tPersonBasePayHist Table and Select rows with PersonBasePayEndDate = NULL

b. Calculate New PersonBasePayAmount = PersonBasePayAmount * Incr% (Round To Nearest Whole Dollar)

c. Create New Row for this table using information from row read above and insert new information where indicated :



PersonGUID - Same

PersonBasePayStartDate - '7/1/2007 12:00:00 A.M.'

PersonBasePayEndDate - NULL

PersonBasePayCurrencyCode - Same

PersonBasePayAmount - Result of b (above)

PersonBasePayFrequency - Same

PersonBasePayPayrollFrequencyCode - Same

BasePayReasonCode - 'SA'

ConductedBasePayReviewDate - Same

ScheduledBasePayReviewDate - Same

PayrollCode - Same

PersonBasePayCurrentFlag - 'True'

ApprovedByPersonGUID - Same

PersonBasePayGUID - Same

TSCol - Same



d. Update Row read in a (above) with PersonBasePayEndDate = '6/30/2007 12:00:00 A.M.' and PersonBasePayCurrentFlag = 'False'














View 7 Replies View Related

Sql Query To Retrieve Comments Based On Selected Month And Data

Jan 4, 2008

hi,
i am generating report for my project.
my table goes like
ID   VASID     VASSID     JanMail   JanVisit    JanPhone    JanComment    FebMail   FebVisit    FebPhone   FebComment................. DecPhone  
1      25            4              True         False         False            Mail me             False       True           False            Visit me                  
 
My report has 3 check boxes for Mail,Visit,Phone respectively and a listbox of 12 months january-december respectively.. 
once user check on Mail and select a month suppose January in my report,the report should generate only January Comments.
here user can select any number of months.if user selects january,february and march, report should generate respective months Comments.
Please help me in writing SQL Query to get the comments.......
 
if any one know the solution for the above problem,Please help me
 
Thanks & Regards,
 

View 2 Replies View Related

Query Duration Using Parameters Vrs No Parameters

Apr 27, 2006

Hi,
I have an app in C# that executes a query using SQLCommand and parameters and is taking too much time to execute.

I open a SQLProfiler and this is what I have :

exec sp_executesql N' SELECT TranDateTime ... WHERE CustomerId = @CustomerId',
N'@CustomerId nvarchar(4000)', @CustomerId = N'11111

I ran the same query directly from Query Analyzer and take the same amount of time to execute (about 8 seconds)

I decided to take the parameters out and concatenate the value and it takes less than 2 second to execute.

Here it comes the first question...
Why does using parameters takes way too much time more than not using parameters?

Then, I decided to move the query to a Stored Procedure and it executes in a snap too.
The only problem I have using a SP is that the query can receive more than 1 parameter and up to 5 parameters, which is easy to build in the application but not in the SP

I usually do it something like
(@CustomerId is null or CustomerId = @CustomerId) but it generate a table scan and with a table with a few mills of records is not a good idea to have such scan.

Is there a way to handle "dynamic parameters" in a efficient way???

View 1 Replies View Related

SQL Query In DataSet

Apr 14, 2007

I create a Query in Dataset that get values from multiple tables when i execute query in query builder its execute successfuly but whan i am save this query found following message.
"The new command text returns data with schema different from the schema of the main query. Check your query's command text if this is not desired"
 after OK i am check my query result in Preveiwdata its show deffrent result.
 
Help me
regards
Fakhruddin
 

View 1 Replies View Related

Query On Dataset

Nov 7, 2006

I have a dataset filled with data.
I want to get a particular (row,column) value from the dataset.

How do I query on the dataset if the query is
firstname, lastname where employeeid='1234'?

View 9 Replies View Related

SQL DataSet Query

Oct 2, 2007



Please Help I'm having a brain freeze here,

Table

column 1 column 2
A 10
A 20
B 10
C 10
C 20

Im looking for a query that returns record 3. Ruturning just the records that have a record in which column 2 is a 10 but not a 20. If I enter WHERE = 10 I get 1,3,4. Please help. Thanks!!

View 6 Replies View Related

Problem With DataSet Or SQL Query

Sep 27, 2007

I've faced the following problem while forming DataSet. I'd like to ask the following SQL query:
___ 
select Users.UserID,Users.FirstName,Users.LastName, Users.Email, data.Suffix, data.Unit,data.Telephone, data.IM,
data.Websitefrom(select UserID,       max(case PropertyName when 'Suffix' then PropertyValue end)Suffix,       max(case PropertyName when 'Unit' then PropertyValue end)Unit,       max(case PropertyName when 'Telephone' then PropertyValue end)Telephone,       max(case PropertyName when 'IM' then PropertyValue end)IM,       max(case PropertyName when 'Website' then PropertyValue end)Website  from  (SELECT UserProfile.UserID, UserProfile.PropertyValue, UserProfile.PropertyDefinitionID,
ProfilePropertyDefinition.PropertyName   FROM UserProfile,ProfilePropertyDefinition WHERE UserProfile.PropertyDefinitionID=ProfilePropertyDefinition.PropertyDefinitionID    )table2 group by UserID)datainner join Users on Users.UserID = data.UserIDWHERE data.Suffix = 'IT';
__
Nothing happens while fulfilling as well (i.e. if to set up Breakpoint and watch the DataSet condition - it will be empty there). If to change the request to let's say some standart - then DataSet downloading begins - it seems there's something wrong with the request
I'm checking....If to look with the holp of request master and press "perform", data is reflected in a normal way...But as soon as i press "Bild", emptiness is shown as usual
Please, prompt me what to do
Initial code in the file .aspx.cs:
------------------------------
UserInfo ds = new UserInfo();UserInfoTableAdapters.UserInformationTableAdapter da = new UserInfoTableAdapters.UserInformationTableAdapter();
da.Fill(ds.UserInformation);
Info.DataSource = ds.UserInformation;
Info.DataBind();
 

View 15 Replies View Related

Using Sets In My Dataset Query

Oct 11, 2007

I popped into the Transact-SQL forum to get some help and created the dbo.selectaudit1 table, which can be queried succesfully.




Code Blockcreate table dbo.selectaudit1 (startkey varchar(10) not null,
endvalue varchar(10) null,
endkey as coalesce(endvalue, startkey))

insert into dbo.selectaudit1 (startkey)
select '042'
union all select '140'
union all select '2089'
union all select '2031'
union all select '2051'
union all select '2100'
union all select '2299'
union all select '2300'
union all select '2349'
union all select '2350'
union all select '2389'
union all select '2390'
union all select '2399'
union all select '2732'
union all select '2733'
union all select '2849'
union all select '2850'
union all select '2883'
union all select '2898'
union all select 'V073'
union all select 'V078'
union all select 'V100'
union all select 'V109'
union all select 'V580'
union all select 'V581'
union all select 'V661'
union all select 'V662'
union all select 'V671'
union all select 'V672'
union all select 'V711'
union all select 'V760'
union all select 'V769'
insert into dbo.selectaudit1 (startkey, endvalue)
select '1400' ,'2089'
union all
select '2100', '2299'
union all
select '2300' ,'2349'
union all
select '2350' ,'2389'
union all
select '2390' ,'2399'
union all
select 'V100' ,'V109'
union all
select 'V760' ,'V769'





Then in reporting services, I created a report with the following query in my dataset. This query works fine in a BIDS query windows, however, when I refresh my dataset and attempt to execute the query I am getting the following error:

Cannot find the object "selectaudit1" because it does not exist or you do not have permissions.
(Microsoft SQL Server, Error: 1088)




Code Block
Select
p.MRN
, p.PatientName
, CONVERT(CHAR(20),p.AdmitDate,101) AS AdmitDate
, CONVERT(CHAR(20),p.DischDate,101) AS DischDate
, p.VisitTypeCode
, d.VisitTypeName
, p.AnyDx
, p.PrinDxCode
, p.PrinDxDesc
, p.SecDx1Code
, p.SecDx2Code
, p.SecDx3Code
, p.SecDx4Code
, p.SecDx5Code
, p.SecDx6Code
, p.SecDx7Code
, p.SecDx8Code
, p.SecDx9Code
, p.SecDx10Code
, p.SecDx11Code
, p.SecDx12Code
, p.SecDx13Code
, p.SecDx14Code
, p.SecDx15Code
From dbo.PtMstr p inner join
ampfm.dct_VisitType d on d.VisitTypeCode=p.VisitTypeCode
INNER JOIN dbo.selectaudit1 sel
ON (PrinDxCode between sel.startkey and sel.endkey
AND DischDate between '2006-11-01' and '2007-09-30')
OR (SecDx1Code between sel.startkey and sel.endkey
AND DischDate between '2006-11-01' and '2007-09-30')




What am I missing?

View 4 Replies View Related

Use Results From Query For Another Dataset

May 5, 2008

Hello, I have two datasets. One dataset has some delivery informations the other dataset has billing informations. The first dataset builds the resultset out of the selected parameters (those parameters do not correspond to the values in table two). What I wanna do is pass some informations (like custno, artno) to the other dataset so that I can only display the corresponding information. Any ideas?

Thanks in advance!

View 2 Replies View Related

Dataset Distinct Query

Oct 27, 2006

I am trying to build a report with a prompt to select building. It all works fine except I in the prompt building is list as may times as there is data for it. I want it to only display once, but not effect the other data is there a way I can query this?

I have my 2 datasets and my parameter set up to display building to select from. My issue is I get multiple values in the Select Value Prompt. It will pull the correct data I just want to clean up the Select Value Prompt.

Example: of prompt list

Building 1

Building 1

Building 1

Building 2

Building 2

Dataset 1:

Select Building, First, Last

From Table

Dataset 2:

SELECT Building, First, Last

From Table

WHERE (Table.Building = @Building)

View 4 Replies View Related

Multi-dataset Query?

Dec 19, 2007


I need to write a query in which some of the columns will be derived from a dataset (join) and the other columns will be derived from another dataset. Is there a way to do this?


Thanks!

View 1 Replies View Related

Help With Parameterized Query Building Dataset

Feb 27, 2007

I have a class that works fine using the SQLDataReader but when I try and duplicate the process using a Dataset instead of a SQLDataReader it returnsa a null value.
This is the code for the Method to return a datareader
 
public SqlDataReader GetOrgID()
{
Singleton s1 = Singleton.Instance();
Guid uuid;
uuid = new Guid(s1.User_id);
SqlConnection con = new SqlConnection(conString);
string selectString = "Select OrgID From aspnet_OrgNames Where UserID = @UserID";
SqlCommand cmd = new SqlCommand(selectString, con);
cmd.Parameters.Add("@UserID", SqlDbType.UniqueIdentifier, 16).Value = uuid;
 
con.Open();
SqlDataReader dtr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
 
 
return dtr;
 
This is the code trying to accomplish the same thing with a Dataset instead.
 
public DataSet organID(DataSet dataset)
{
Singleton s1 = Singleton.Instance();
Guid uuid;
uuid = new Guid(s1.User_id);
string queryString = "Select OrgID From aspnet_OrgNames Where UserID = @UserID";
SqlConnection con = new SqlConnection(conString);
 
SqlCommand cmd = new SqlCommand(queryString, con);
cmd.Parameters.Add("@UserID", SqlDbType.UniqueIdentifier, 16).Value = uuid;
 
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = cmd;
 
adapter.Fill(dataset);
return dataset;
 
 
 
}
 
Assume that the conString is set to a valid connection string. The Singlton passes the userid in from some code in the code behind page ...this functionality works as well.
So assume that the Guid is a valid entry..I should return a valid dataset but its null.

View 2 Replies View Related

Can We Dynamicaly Change The DataSet Query

Sep 17, 2005

I would like to know about Reporting Services. Can we change the Dataset queries used in a report at run time.

View 1 Replies View Related







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