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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Change parameter property after selecting another parameter

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net

Hi guys, a question:

Is it possible to change a parameter's property after the uer has made a selection or filled in another parameter field? I'm using VS2005



- 3 parameter fields;  Country,Station,Carrier  all three are textfields and are allowed to stay 'blank'.

- When the user enters a Country-code in the 'Country' parameter field, the 'Carrier' parameter should become a required field.


I did some searching on the net, but haven't found the solution. I started to wonder if it's actually possible??

View Complete Post

More Related Resource Links

How to re-render report on parameter change?

I have a drill-down report with several levels. I added a parameter to allow me to collapse/expand all so I don't have to go through all the levels to open individually. This works but I have to set the collapse state on the param, then I have to click View Report button. I haven't found a way to tell report to re-render when a certain parameter changes so I don't have to click the view report button. Is it not possible?   Thanks!--ACG

How to change the Default Value of the Parameter to "Query Based"


Hi I have a Report which i deployed into my localhost.

In the Report Manager, Report Parameter Properties, I unchecked the HasDefault option for which Default value is coming from some Query.

When I retry to Set the Default Value to Query Based, Its not taking.

Need Help.

Is possible to change parameter's font?



I made "Last Names" parameter to filter data, but users can not read  this text. Is possible to change font for this parameter?


change "View Report" Submit button Caption in parameter area


Hi All.

Using SSRS 2008.

Can please suggest, Is there a way to change the caption of submit button that appears when we have report parameters. "View Report" to something else

Thanks for replies.



SSRS 2005 - Change 2nd Parameter Value based on 1st Parameter Value (Non-queried)


I am wanting to filter my report based on Fiscal Year.  I have the first parameter as @STARTDATE and 2nd parameter as @ENDDATE.  The values for both of these are hardcoded in non queried.  When the user selects the @STARTDATE , I want to automatically set the value for the @ENDDATE parameter.  I'm doing it this way because I'm using BETWEEEN in my SQL Query.  Ideally, I will just have the @ENDDATE value hidden if possible.

So for example:

@STARTDATE has values of 10/1/2009 and 10/1/2010.
@ENDDATE has values of 9/30/2010 and 9/30/2011.

When @STARTDATE is selected to 10/1/2009, set the @ENDDATE value to 9/30/2010.
When @STARTDATE is selected to 10/1/2010, set the @ENDDATE value to 9/30/2011.

Any idea how/if this can be accomplished?

Any way to change the icon to toggle the parameter panel in SSRS 2008 R2?


Is there any way I can change the icon that the HTML viewer in SSRS 2008 R2 uses to toggle the parameter panel?

I have users telling me it is too small and they want it bigger.  When I look at the page with the IE developer toolbar, the icon looks like it is being pulled from a resource inside ReportViewerWebControl.axd,

Can I assign a property of a custom web part via a URL parameter?


Hi there,

I am wondering if it is possible to assign the properties of a custom web part by passing parameters to the sharepoint URL of that web part.

Thanks and best wishes


Is it possible to pass property accessible modifier as a template parameter



I have a class, i want to make instance of this class as read-only or not, based on the context.

I am not sure whether this can be done by PropertyDescriptor, i am expecting some kind of generic based solution.

Thanks for your reply




SSRS 2008 dynamic change to report parameter properties


I'm running SSRS 2008, and I'm wondering if it is possible to change a report parameter property based on user input in another report parameter.  What I need to do is to make report parameter #2 a required parameter if a specific value is selected in parameter #1.  Parameter #2 should be optional under all other scenario.

Thanks in advance.

store procedure parameter sequence Change In runtime...



this is my code:

builder.Append(string.Format("INSERT INTO deads " +
            " (DieID, Title, FName) " +
            "VALUES ( {0}, {1}, {2} )",
            dt_excel_allRows.Rows[1][0].ToString(), dt_excel_allRows.Rows[1][1].ToString(), dt_excel_allRows.Rows[1][2].ToString()))

some of my col datatype is nVarchar...

in run time because  my value in my table (dt_excel_allRows) are FARSI ; the sequence of my parameter changed and it cant be executed!!!!!

of course the problem is because of FARSI is rtl languges....

how can i fix the problem...

i can not user sqlPArameter becuse of some reason....

i think some thing like rtl or ltr can fix my problem....but how?


Access property of object as session variable as declarative datasource parameter value


I am storing a custom "Organisation" object as a session variable. One of the properties of  the Organisation object is "OrganisationID" (integer).

I have a DataSource that requires a parameter value to run, and I want to use a SessionParameter to populate this. In a previous version, I stored the OrganisationID directly as a session variable. In that case, I could easily access it like this:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    SelectCommand="spGetUserJobList" SelectCommandType="StoredProcedure">
        <asp:SessionParameter Name="OrganisationID" SessionField="OrganisationID" Type="Int32" />

However, how do I now access the OrganisationID property of an "Organisation" type session variable (called "Organisation")?

 I have tried this, which does not seem to work:

<asp:SessionParameter Name="OrganisationID" SessionField="Organisation.OrganisationID" Type="Int32" />


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



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


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">
                            <asp:TemplateField HeaderText="Full Name" SortExpression="lastname">
                                    <asp:Label ID="DisplayName" runat="server" Text='<%# Eval("firstname").ToString() & " " & Eval("lastname").ToString() %>' />
                            <asp:BoundField HeaderText="User Name" DataField="UserName" />

type object parameter



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

MDX Query parameter from SSRS


I've a MDX Query that has where clause as shown below.
I'm designing report using SSRS 2008. How can i pass date as parameter ? I tried to setup @from and @to as parameter but not working ?
any ideas....

WHERE ( {[Date Central].[Calendar Date].[2010-04-01 00:00:00]:[Date Central].[Calendar Date].[2010-08-30 00:00:00]} )

need it to work as
WHERE ( {[Date Central].[Calendar Date].[@From]:[Date Central].[Calendar Date].[@To]} )



Get ServerReport selected Parameter value to use in vb query


I'm using ReportViewer in Asp.net 2.0 to view a SSRS report. I need the value of the selected parameter to use in a vb query. The parameters are populated on the server and its a single selection. Doing searches I've come across  ReportViewer1.ServerReport.GetParameters() but I can't figure out if I can use this to determine which value the user has selected in the parameter dropdownlist. Any help would be appreciated.

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