.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
SP
satyapriyanayak
Subhransu Sekhar Jena
abhays
DotnetUser
Post New Web Links

Can the choices for one parameter depend on the selection of another one?

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Sql Server
 

Hi there,

I have a report with two parameters: type (simple or complex) and country (can be any country (e.g. UK, US,..)). I am wondering if it is possible that a user can only select a country when they have chosen the type 'complex'. If they have chosen the type 'simple' the country box should be selectable (e.g. greyed out).

Thanks and best wishes

Oliver




View Complete Post


More Related Resource Links

SSRS Report Parameter Auto selection

  
HI All    I have a report paramater 'ParamBranches' which list all branches say aa,bb,cc etc ... and another report parameter is 'ParamBranchStartswith' So when i type in 'a' in Branh Starts with paramter -  the 2nd parameter that is ParamBranches will be filled with "select ",  "aa"   As there is only one Branch starts with 'a' ,  Is there any way to autoselect the Branch 'aa'  in Branches list , rather than user manually selects 'aa'       Regards Sooraj

Boolean Parameter to include null on selection on false

  
What i am trying to do is use a boolean parameter which when a user selects true only brings up true but when user selects false it brings up all nulls as well as false    Sample    Declare @Parameter1 boolean  Select  From example  Where field.1 = @Parameter1 (If parameter1 is false I want it to select all null fields as well as false)   Thanks   Michael 

Report viewer web part: Dependency of parameter choices on user rights?

  

Hi there,

I am wondering if it is possible to restrict the choices for a parameter depending on the user rights. For instance, if an "administrator" can select three different options for one particular parameter, a "normal user" should only be able to choose from two.

I am using Sharepoint 2007 and Reporting Services 2005.

Best wishes

Oliver

 


In Crystal Reports selection formulas/select expert with formula field and parameter field together

  

I have this report that does not yield the same output from my crystal reports to ssrs due to below selection formula.  Any help would be much appreciated.

Is there any workaround on this combined formula of parameter and formula field i.e {@HomeCo} in {?Company}

@HomeCo as being ...

if isnull({VP_TIMESHEET.LABLEVELNAME4})=true or {VP_TIMESHEETITMV42.LABLEVELNAME4} = "00000"
    or isnull({VP_TIMESHEET.LABLEVELNAME5})=true or {VP_TIMESHEETITMV42.LABLEVELNAME5} = "00000"
    then {view_EmpMaster_ca1.LABLEV4NM}
else {VP_TIMESHEET.LABLEVELNAME4}

and {?Company} as being ...

select distinct COMP_ID,COMP_DESC
from COST_ALLON.dbo.COMP where COMP_ID NOT IN ('0110', '0610')

Thanks,

Sweet_and_Sour


Parameter enabling based on selection in another parameter.

  

Hi,

I have a parameter Owner with 1,2,3 options in dropdown.

On selection of option 1 , a country parameter should be enabled with all countries' values defaulted.

Option 2 should enable Region parameter with all the Regions values selected and country parameter should be displayed.

Option 3 should disable both Region & Country Parameter.

Please help me in achieving this.

I am using SSRS 2005 with Enesys tool as add on.

Thanks in advance.

 

 


Parameter values dependency on prior Parameter selection

  

Hi,

I need immediate help on the following Issue.

Based on Parameter value I need to hide value in Other Parameter.

To be more specific.,

I have three filters Operation, Region, District and Currency

When user chooses Operation and Region I need to show only USD Currency though Operation/Region might have both the USD and EUR.

When user chooses District, need to show corresponding currency. It should be either in USD or EUR. (Just like Cascading and this is working w

Maintain HTML Radio Button Selection Inside GridView After Postback

  
Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

ASP.NET Multiple Selection DropDownList with AJAX HoverMenuExtender

  
Recently, I was looking for a multiple selection dropdownlist control for my new project. After spending some time researching for it, I decided to put together all my finding in one web user control. This web user control consists of an ASP.NET AJAX HoverMenuExtender, JavaScript, StyleSheet and CheckBoxListExCtrl . The final product will work with or without a MasterPage and you can drag and drop more than one instances of the control on to the page.

Enterprize library 4.1 getting output parameter after adding record in db, plz guide

  

Hi,

I need to get output parameter (flag) from db after saving record in database. I am using Microsoft Enterprise Library 4.1 for DB. I am inserting record using I Data reader.

Please guide

Thanks


Gridview Enable Selection Problem

  

Hi,


I have a gridview with Enable selection and Enable Paging equals to TRUE.

I also set the PageSize of my gridview to 4 so that I only displays 4 rows per page.

The problem is when I click the pager in the bottom of my gridview, my gridview is disappearing and no records appear.


Here is code behind of my gridview:

If e.Row.RowType = DataControlRowType.DataRow Then
                e.Row.Attributes("style") = "cursor:pointer"

                e.Row.Cells(2).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(3).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(4).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(5).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(6).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
   

Use a column as parameter for a sds in another column; gridview

  

Hola, I have a gridview which is bound to a sds which returns 7 columns and I added two columns from the GUI.  What I want is to fill up the 9th column with DDLs and these  DDLS will get their data from a different sds which is using a stored procedure with a single parameter.  I created the 9th row, used template field, made the sds for 9th row, the stored_procedure, threw a DDL in Item template and all  I need now is to pass a parameter in the first column to the sds in the 9th column.  I can code this but i'm getting tired of aspx.cs :) and would like to do it from the GUI.


Sort by gridview SortExpression parameter via Stored Procedure

  

I have a gridview that calls data via a stored procedure.  I am unable to enable the gridview columns to be sortable. I need to set the parameter in the Stored Procedure, can someone help me with this?

Here is my gridview:

<asp:GridView ID="AllUsersGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="UserName"
                        GridLines="Vertical" Width="900px" DataSourceID="SqlDataSource1" AllowSorting="True"
                        SelectedRowStyle-Height="30px" CellPadding="4" BackColor="White">
                        <Columns>
                            <asp:TemplateField HeaderText="Full Name" SortExpression="lastname">
                                <ItemTemplate>
                                    <asp:Label ID="DisplayName" runat="server" Text='<%# Eval("firstname").ToString() & " " & Eval("lastname").ToString() %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="User Name" DataField="UserName" />
                            <

type object parameter

  

Hello!

I have a problem I can't figure out.

I've been trying to add a listbox with multi select enabled as a parameter to my select statement in sqldatasource.

So i created a function like this :

string strItemTypes = "";
foreach (ListItem li in lbItemType.Items)
{
   if (li.Selected)
   {
      strItemTypes += "," + li.Value;
   }
}
strItemTypes = strItemTypes.Substring(1);


which gives me the selected items like this for example : "1,2,3"...
Then I've been trying to add it to my sql select statement :


SELECT tblOfficesItems.idOfficesItems, tblStockItems.Name, tblStockItems.Description, tblStockItemTypes.TypeItem, tblStockItems.Notes FROM tblOfficesItems INNER JOIN tblStockItems ON tblOfficesItems.fkItem = tblStockItems.idItem INNER JOIN tblStockItemTypes ON tblStockItems.fkTypeItem = tblStockItemTypes.idTypeItem WHERE tblStockItems.fkTypeItem IN ( @fkTypeItems )


using a hiddenfield with a controlparameter of type=object
but it just don't seem to work, seems like the data just won't bind or something and I don't get any errors so I'm confused!!

then i tried this :


SELECT tblOfficesItems.idOfficesItems, tblStockItems.Name

Is it possible to populate property choices from a database?

  

I'm creating my first server control, and have it working where I can set up an enum and the user can set a property's choices,  based off of that enum.  But I'd like it to pull records from a database and populate the list of choices for the property from a database.  This would allow me to add a new "Host System" to the database, and the other designers wouldn't have to get a new copy of the dll.

Thanks,

Russ


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend