Deselect All On Multivalue Paramater When Other Value Is Chosen
Dec 26, 2007
I use "All" as default value in my parameters, my parameters are multivalue.
Now if a user chooses a value it will mark the value but the All will also remain marked. Isn't there a way that it deselects the all when one or more individual values are chosen ?
I thought that the reporting services just didn't have that functionality but someone told me that its possible but i haven't found it anywhere.
In SSIS I use the DQS Cleansing transformation component. I've got a knowledge base (KB) in place and this KB holds various domains and my data source has more input columns than would like to use for a particular clean up operation. I want to use some of the input columns to map against some domains in the KB. It is my understanding that it should be possible to select only the required input columns, but all i can do is select all input columns.
I'm running the same query on two computers but getting a different query plan. On one of the servers, the query returns in 10 seconds, on the other server it takes over a minute. What the heck!
1. same hardware configuration on both computers 2. same user databases on both computers 3. same NT setup on both computers 4. same software installed on both computers
I can only imagine that MSSQL7 was setup differently and the query optimizer is making a stupid choice. I've compared numerous SQL server options and they are both the same.
1. sp_configure (same on both computers) 2. properties sheet on each server from enterprise manager (same on both computers)
When I first looked at the query behind highlight exceptions, I assumed that PredictCaseLikelihood() was the basis for deciding which rows to flag, but a closer look at the sample data shows this not to be the case. For example, looking at the "Table Analysis Tools Sample" table in the DMAddins_SampleData workbook, ID 11147 is highlighted while ID 11378 is not. Training a cluster model via DMX on this same dataset shows these rows having PredictCaseLikelihood values of 0.165 and 0.158 respectively.
Does anyone have an idea what methodology is used to select the Outlier rows? And once those rows are selected, how are the suspect columns within that row chosen? Appreciate any clues or directions.
I have a package that needs to be executed from a webpage, which I can get to INITIATE fine. The page calls a stored procedure which in turn starts a package (use DTExec and xp_cmdshell). The problem is that the package reads/writes to flat files that the most accounts do not have rights to. That being the case I get errors that the file doesn't exists. The package was developed by using a domain account which does have access to the files so it obviously runs fine in BIDS.
How do I force the stored package to run under that account when being called by a stored procedure? I've done this with scheduled jobs because I can use a proxy account. Is there something simlilar that I can do vis DTExec?
New user here. I've got a report with a couple of multi-value parameters and I'm displaying the selected values on the report using = Join(Parameters!ReportingGroup.Value, ", "). This works properly.
The users now want the report to display "All" if "Select All" is chosen, rather than showing the whole list.
Can anybody help me with this? I'm thinking of using an IIF statement in my expression, but have no idea how to define the condition?
Hey everyone I'm having trouble finding a way to pass a particular paramater, my main goal of this is to create a custom paging and sorting control for the DataList, but we wont worry about all the un-nessesarry code, here is what I am dealing with... Sub Page_Load()
Dim Conn As SqlConnection Dim Query As String Dim SqlComm As SqlCommand Dim myDataReader As SqlDataReader
' Define connection object Conn = New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
' Define query to retrieve main category values Query = "SELECT [productMainCategory] FROM [User_Products] WHERE [productMainCategory] = @productMainCategory" ' Define command object SqlComm = New SqlCommand(Query, Conn)
' Iterate through records and add to array list While myDataReader.Read() IDList.Add(myDataReader("productMainCategory")) End While
' Close DataReader and connection objects myDataReader.Close() myDataReader = Nothing Conn.Close() Conn = Nothing
' If page has not been posted back, retrieve first page of records If Not Page.IsPostBack Then Paging() End If
End Sub The Entire Point to this bit of code is to open a connection to the database find the category productsMainCategory, count all the fields with the Name 3D Art --> and save that number into an Array List where I will be using it later on in my code......The big old problem here is that it counts every single field in the productsMainCategory, Columb.........I need to figure out how to pass it a parameter so that it only counts my 3D Art --> fields, I have tried using this bit of code but nothing SqlComm.Parameters("@productMainCategory").Value = "3D Art -->"Does anyone have any ideas of how I might go about donig this?Thank You..
I guess a pretty basic sql question here. I am using tableadapters. And some of the queries have multiple parameters. But often a parameter is at a default or null - wherein I'd like to be able to pass it in and have it not filter at all - ie., return everything. Simple example: Select * from ReportsWhere ReportID = @ReportID If I have a dropdownlist of reports where the values are ReportIDs - but the topmost unselected value is say "", then the results will be generated by Select * from ReportsWhere ReportID = '' Whis not what I want. What I would want is simply Select * from Reports or Select * from ReportsWhere ReportID = ReportID So how can one setup say an ObjectDataSource or somehow handle this where I don't need to use dynamic sql to expand/contract my where clause? Really need hlpe on this and hope I've made my question reasonably clear. Thanks.
Hi all In my application i have to upload a excel file.After that it will retrive tha data from database depending upon the data in excel sheet.So now the problem is that i am using a stored procedure for this and in that procedurei have taken output parameter to catch any type of error.For example suppose in my excel sheet i have 3 columns.let it Group Code,Employee No and Employee Code.So incase it will not find the employee number so using the output parameter i am throwing the error message.So here we are getting two return types.one is the selected data and another is the error message.So how to handle these two thing in asp.net.Usong a dataset i can only retrive the selected data.But how to get the errror message as well as the data.So please help me.
I need to parce a criteria in the data base I have a field/colum in my tbl1 call invoice_num I am left joining to to site_id on tbl2. how can i talk tbl1 invoice_num and parce it to add in numbers.
IE tbl1.invoice _num is AF3456 and in order to match it to tbl2.site_id I need to add a 0 so that it would be AF03456 or AF034560.
I have a simple 2 column dataset representing Date of session and Client Name (Please download workbook from here - [URL] .... The Financial Year runs from April 1 to March 31. I want to determine the number of sessions conducted in chosen financial year - 2. So if I select FY 2015-16 in a slicer, then, I want view the number of session conducted client wise in FY 2013-14. This is the formula calculated field formula I have written but when I drag this in the Pivot Table, I get an error message. In the calculated field window, when I click on Check for errors, then there are no errors at all.
I have a search page, containing 3 drop down lists. Theses are used to match data in 3 seperate collumns of a table.I can get the search to work when all boxes are completed, but I need to be able to leave some blank.A similar question was asked in http://forums.asp.net/626941/ShowPost.aspxAnd a very good solution was give: http://www.sqlteam.com/item.asp?ItemID=2077But I don't seem to be able to get any of these examples working!If I use the SET @SQL method, I get an error message saying that my input parameter has not been declared, when it has.When I use the COALESCE method, there is no data returned.(I am passing the data drop down list data fin the search page through the query string to a results page).Does anyone know of any other examples, or sample coding??Thanks...
Removing a parameter on a Reporting services report based on a 2005 AS cube results in an error:
[rsParameterReference] The Value expression for the query parameter €˜KalenderHierarchieJaarMaand€™ refers to a non-existing report parameter €˜KalenderHierarchieJaarMaand€™.
On the dataset, the parameter still exists. The error still occors after removing the parameter overhere too.
Steps to reproduce:
Build a raport based on a cube. Make a parameter in the dataset. check if the parameter works. Save the report and remove the parameter via the menu: Report> Report parameters > select the parameter and choose [Remove]. go to the "Preview" tab.
I get the ora-12645 error when doing an import from oracle to mssql. The error comes-up when setting up the datalink properties of the source database which is oracle. This error happens on a 2003 server machine using the import/export wizard. It works fine when using an xp machine.
Can some one offer me some assistance? I'm using a SQLDataSource control to call a stored proc to insert a record into a control. The stored proc I'm calling has an output paramater that returns the new rows identity field to be used later. I'm having trouble getting to this return value via the SQLDataSource . Below is my code (C#): SqlDataSource1.InsertParameters["USR_AUTH_NAME"].DefaultValue = storeNumber;SqlDataSource1.InsertParameters["usr_auth_pwd"].DefaultValue = string.Empty;SqlDataSource1.InsertParameters["mod_usr_name"].DefaultValue = "SYSTEM";SqlDataSource1.InsertParameters["usr_auth_id"].Direction = ParameterDirection.ReturnValue;SqlDataSource1.Insert();int id = int.Parse(SqlDataSource1.InsertParameters["usr_auth_id"].DefaultValue); below is the error I'm getting: System.Data.SqlClient.SqlException: Procedure 'csi_USR_AUTH' expects parameter '@usr_auth_id', which was not supplied. Has anyone done this before and if so how did you do it?
make it so that I compare that parameter, that is a char(3), to something like "XXX" and then choose the correct SELECT statement to use depending on that parameter.... much like an if else.
Ok,This sounds dangerous (and yes I know it is)But its in a controlled enviroment and I really need to know how to dothis.How can I pass a Subquery for an Exist or In clause as a paramaterSomething like thisCREATE procedure dbo.mytry@funk varchar(1000)asSelect * from Customers where exists(@funk)GOSo I would execute something like soexec mytry @funk='Select ID From Customers where ID < 100'Any Ideas, I have tried LOTS of things but I can actually get it towork.I need to use it conjunction with a 3rd party product that can onlyselect from a Stored Procedure, and I can only pass paramaters to theSP.Any suggestions ?ThanksChris
I have a parent and child package. i pass a parent package variable called @abc with a value of (1,2,3,4,5,6) to the child package. here in the oledb source i have a select statement like, select * from A where id in (@abc)
I am trying to get a stored proceedure to return the autogenerated numerical primary key of the last row created to our appliciation. I have created what I thought was an output parameter to handle this however when the application runs I get a message that seems to indicate that it is ASKING for the parameter instead of returning it. Here is the code of the sproc:
Code Block USE [chronicle] GO /****** Object: StoredProcedure [dbo].[CreateNewLicense] Script Date: 01/03/2008 06:35:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[CreateNewLicense]
Does anyone know if it is possible to have one parameter that is used for both a relational(SQL) and Analysis Services(MDX) query within one report? I need to pull up-to-date inventory counts for a product, which are not in my Analysis Services cube I also have related Product information in Analysis Services that I need in the same report. I can't seem to find any information about how to do this or if it is even possible...
Juste have fun with the following, if you can manage this out your my savior, been wasting far too much time on it, tried a couple of method and none ever worked. Conversion from type 'DBNull' to type 'String' is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.Source Error:
Line 105:Line 106: Protected Sub sdsProprActionAJO_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles sdsProprActionAJO.InsertedLine 107: Dim MessageSysteme As String = CType((CType(e.Command.Parameters("SQL_MSG"), IDbDataParameter)).Value, String)Line 108: End SubLine 109: With sdsProprActionAJO .ConnectionString = ConfigurationManager.AppSettings("DB_CS_MSSQL") .InsertCommandType = SqlDataSourceCommandType.StoredProcedure .InsertCommand = "dbo.sp_adm_cartListe" .InsertParameters.Clear() .InsertParameters.Add("Mode", TypeCode.String, "SEL") .InsertParameters.Add("LPR_Groupe", TypeCode.String, CBool(CType(Me.pnlProprActionAJO.FindControl("rblProprActionAJOGroupe"), RadioButtonList).SelectedValue)) .InsertParameters.Add("LPR_Etiquette", TypeCode.String, CType(Me.pnlProprActionAJO.FindControl("tbProprActionAJOEtiquette"), TextBox).Text) .Insert() End With End Sub Protected Sub sdsProprActionAJO_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles sdsProprActionAJO.Inserted Dim MessageSysteme As String = CType((CType(e.Command.Parameters("SQL_MSG"), IDbDataParameter)).Value, String) End Sub Protected Sub sdsProprActionAJO_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles sdsProprActionAJO.Inserting Dim Param As System.Data.SqlClient.SqlParameter = New System.Data.SqlClient.SqlParameter() param.DbType = DbType.String param.Direction = ParameterDirection.Output param.ParameterName = "SQL_MSG" e.Command.Parameters.Add(Param) End Sub CREATE PROCEDURE [dbo].[sp_Adm_Proprietes_AJO](@MODE VARCHAR(3),@LPR_Groupe BIT = NULL,@LPR_Etiquette NVARCHAR(32) = NULL,@RPP_LPR_IdParent [INT] = NULL,@RPP_LPR_IdEnfant [INT] = NULL,@SQL_MSG NVARCHAR(8) OUTPUT)AS--DECLARE @SQL_TEMP NVARCHAR(4000)DECLARE @INT_TEMP [INT]--IF @MODE = 'RRP'BEGIN INSERT INTO t__REL__PropParent_PropEnfant ( RPP_LPR_IdParent, RPP_LPR_IdEnfant ) VALUES ( @RPP_LPR_IdParent, @RPP_LPR_IdEnfant )END--IF @MODE = 'LPR'BEGIN IF NOT @LPR_Etiquette = NULL BEGIN SELECT * FROM t_Lib_Proprietes WHERE (LPR_Groupe = @LPR_Groupe ) AND (LPR_Etiquette = @LPR_Etiquette ) IF @@ROWCOUNT <= 0 BEGIN INSERT INTO t_Lib_Proprietes ( LPR_Groupe, LPR_Etiquette ) VALUES ( @LPR_Groupe, @LPR_Etiquette ) SET @SQL_MSG = 'CON_000A' END ELSE BEGIN SET @SQL_MSG = 'ERR_000A' END END ELSE BEGIN SET @SQL_MSG = 'ERR_003A' ENDENDRETURN @SQL_MSGGO
Hi, I don't want to pass in parameter values in the url to get a certain record from my database (for a better search engine result) so instead i'm using webuser controls (this is a must) with Public Values that should be read by the SqlDataSource. So in the page that contains the usercontrol there is something like:UserControl.Value = "myvalue"Now I want the SqlDataSource in the usercontrol to read this value and pass it into a query (in the parameter of the WHERE statement, eg.: @recordID = myvalue).Thanks in advance!
Im new to SSRS, basically I have created and deployed a report to my reporting server.
Now I have a query parameter on my report. From my application, I can access the report manager, and here it asks me for my variable. I'm not sure if my question is a vb.net one, but I was wondering if anyone knew how I could pass my query paramater to SSRS at runtime. Basically it would be easier for my users if they could just see the report they are interested in, rather than having to type the variable in to be able to see the report.
I am using SQL2005 and would like to know if it is possible to pass a table name as an input parameter in a stored procedure?? I am struggling to get it to work.
For example:
CREATE PROCEDURE dbo.StartBlock
@TableName varchar(30),
@minX float OUTPUT,
AS
BEGIN
SET NOCOUNT ON;
SET @minX = (SELECT min(X) as mX
FROM @TableName);
END
GO
The above does not work and give the following error
Im new to SSRS, basically I have created and deployed a report to my reporting server.
Now I have a query parameter on my report. From my application, I can access the report manager, and here it asks me for my variable. I'm not sure if my question is a vb.net one, but I was wondering if anyone knew how I could pass my query paramater to SSRS at runtime. Basically it would be easier for my users if they could just see the report they are interested in, rather than having to type the variable in to be able to see the report.
All i want to do is add a parameter for Territory_code how do i do that, in a stored procedure that uses a memory table. the yellow shows the two places i thought i should be able to include it. Any help will be greatly appreciated!! thanks! I couldnt post the whole code, so i deleted alot , just need to know where to put the param!
Code Snippet
USE [RC_STAT] GO
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER PROCEDURE [dbo].[PROC_RPT_Breeder_Sales] AS (@Territory varchar(20) BEGIN SET NOCOUNT ON;
Declare @ReportingTbl TABLE ( Source_Id int, Territory_Code varchar(20), Territory_Description varchar (30), Sort_Id int, Column_Text varchar(20), Subbrand_Key int, SubBrand_Description varchar (30), Period_1 Decimal(18,0), Period_2 Decimal(18,0), Period_3 Decimal(18,0), Period_4 Decimal(18,0), Period_5 Decimal(18,0), Period_6 Decimal(18,0), Period_7 Decimal(18,0), Period_8 Decimal(18,0), Period_9 Decimal(18,0), Period_10 Decimal(18,0), Period_11 Decimal(18,0), Period_12 Decimal(18,0), Period_13 Decimal(18,0), YTD Decimal (18,0), Total_Amount decimal (18,0)) ------------------------------------------------------------------------------------------------------------------------------------------ ----Distributor Load Section ------------------------------------------------------------------------------------------------------------------------------------------ INSERT INTO @ReportingTbl (Source_Id, Territory_Code, Territory_Description, Sort_Id, Column_Text, Subbrand_Key, SubBrand_Description, Period_1, Period_2, Period_3, Period_4, Period_5, Period_6, Period_7, Period_8, Period_9, Period_10, Period_11, Period_12, Period_13, YTD, Total_Amount) SELECT 1 as Source_Id, Tbv_Customer.Breeder_Territory_Code, RC_DWDB_INSTANCE_1.dbo.Qry_Sales_Group_Dimension.Territory_Name, CASE WHEN cusSales.Customer_Sales_Summary_Year = YEAR(GETDATE()) THEN 2 ELSE 1 END as Sort_Id, cusSales.Customer_Sales_Summary_Year Column_Text, cusSales.Sub_Brand_Id , Qry_Report_Level_Brand.Sub_Brand_Description, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 1 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END)AS Period_1, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 2 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_2, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 3 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_3, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 4 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_4, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 5 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_5, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 6 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_6, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 7 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_7, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 8 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_8, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 9 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_9, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 10 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END)AS Period_10, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 11 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_11, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 12 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_12, SUM(CASE cusSales.Customer_Sales_Summary_Period WHEN 13 THEN cusSales.Customer_Sales_Summary_Amount ELSE 0 END) AS Period_13, 0 as YTD, SUM (cusSales.Customer_Sales_Summary_Amount) As Total FROM RC_DWDB_INSTANCE_1.dbo.Qry_Sales_Group_Dimension INNER JOIN Tbv_Customer ON RC_DWDB_INSTANCE_1.dbo.Qry_Sales_Group_Dimension.Territory_Code = Tbv_Customer.Breeder_Territory_Code INNER JOIN RC_DWDB_INSTANCE_1.dbo.Tbl_Customer_Sales_Summary_Fiscal AS cusSales ON Tbv_Customer.Customer_Code = cusSales.Customer_Code INNER JOIN Qry_Report_Level_Brand ON cusSales.Sub_Brand_Id = Qry_Report_Level_Brand.Sub_Brand_Id WHERE cusSales.Bill_Customer_Code NOT IN ('RNPROC','RNPROF') AND cusSales.Sub_Brand_Id <> 65 AND cusSales.Report_Level_Id = 85 AND cusSales.Report_Level_Id = 85 AND cusSales.Consolidated_Sales_Tables_Id = 6 AND cusSales.Customer_Sales_Summary_Year >= YEAR(GETDATE()) - 1 GROUP BY Tbv_Customer.Breeder_Territory_Code, RC_DWDB_INSTANCE_1.dbo.Qry_Sales_Group_Dimension.Territory_Name, cusSales.Customer_Sales_Summary_Year, cusSales.Sub_Brand_Id , Qry_Report_Level_Brand.Sub_Brand_Description
SELECT Source_Id, Territory_Code, Territory_Description, Sort_Id, Column_Text, Subbrand_Key, SubBrand_Description, Period_1, Period_2, Period_3, Period_4, Period_5, Period_6, Period_7, Period_8, Period_9, Period_10, Period_11, Period_12, Period_13, YTD, Total_Amount FROM @ReportingTbl -- ORDER BY Source_Id, Sort_Id where Territory_Code=@Territory END
I was trying to extract data from the source server using OLEDB Source and SQL Server Destination when i encountered this error:
"Transaction (Process ID 135) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".
What must be done so that even if the table being queried is locked, i wouldn't experience any deadlock?
Hi. I am fairly new to reporting. I have a report that currently displays queried data in both a table and a matrix. I'd like for the data that is displayed to be based off of my report parameters. I have three, all of which are multivalue. Currently, I am able to display the report, based on the only the first value of TWO of the three parameters. I tried using the dataset parameters, but was not successful with linking them to my report parameters. Please help! In addition, is there a way to set multivalue parameters to only display distinct values? Thanks, in advance, for any help.