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

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

Set parameter visibility from table value?

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :Sql Server

I would like to be able to make that report parameter visibility are changing based on the values in the table.

When I change the value in the table, to change the visibility of the parameter. If I set the value field in table to 0, report parameter would be visible, and if the value is 1 a report parameter would not be visible.

Is this possible to manage like this?





View Complete Post

More Related Resource Links

How to use parameter from Dropdownlist to populate Rep. Table

I successfully have populated a dropdownlist from a database. Now I need to create a sort of a Master/Detail situation - based on the selection in the DropDownlist, I need to populate a Repeating table. I just can't find any examples or tutorials on how to do this. I've tried stuff till my fingers were bleeding. Can someone help me figure this scenario out, please?

How can I select Table by pussing parameter table name


How can I Create Select store proc for select Table but I will send the Table Name in Parmeter which table I want Like below.



Proc SelectAll







Drop tables where table name is a parameter


I'm trying to drop some tables and I created a curser to do so.

The table name is a parameter.

I get an error message when I run this code in the curser.

Is there any way to run this code in a different way.

I'm trying to drop databases as well where database name is a paramerter, can I do so?





@DatabaseName varchar(30)




Table-valued parameter and DataTable from ADO.NET


I'm going to use TVP:s to enhance performance in my c# .net fw 4 application which uses stored procs in SQL Server 2008. My first test was very successful and I inserted a batch of rows from by using a TVP in a stored proc. So far so good. Now to my question: when looking for the performance profit with SQL Profiler I saw it was really fast, but the generated sql-code made me a little bit confused. My "table" (DataTable class) from the .net-app was "retabled" like this in sql:

declare @table MyTvpType;

insert @table values (1, 2, 3...); ... x number of times

exec MyProc @table;

This was quite surprising, but when examining my .net code, I think there should be som way to "import" my MyTvpType into .net code, and avoid the extra delaration and inserts done as it is now. I'm using this code in .net:

Table-valued parameter with ObjectDataSource


I'm trying to figure out if it's possible to use an ObjectDataSource Update method with a table-valued parameter.  Here's my ODS:

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
        SelectMethod="GetTestData" TypeName="TestProject.BLL.TestBLL"
            <asp:Parameter DefaultValue="65" Name="testId" Type="Int32" />

I bind this to a GridView but I'm not looking to edit row by row.  Instead my GridView has a bunch of TemplateFields with textboxes.  I also have a Button that when pressed, invokes the Update method of the ODS.  So then the "UpdateTestData" function in my TestBLL is called.  This looks like this:

T-SQL: is it possible to pass a table as parameter?


Can a table be passed as parameter to a T-SQL procedure or function?

One can define a temporary table within a procedure, and the system then manages its lifetime, keeps it separate from other instances executing the same procedure, etc: -

    CREATE PROCEDURE dbo.name (@Parameter1, @Parameter2)
        DECLARE @name TABLE
             (column list)

Perfect: but I need to be able to have another [recursive] procedure process this table.  How do I make it available to the second procedure?   If I write
    EXEC procedure @Name

an error message "Must declare the variable '@Name'" is produced.  Within the 2nd procedure, an attempt to name a table within the parameter list results in another error message, "Incorrect syntax near the keyword 'TABLE'".  

 If I can't pass it as argument/parameter, then how do you process a temporary table in another procedure?  Do I pass a cursor to it?  Or is it quite impossible?

Regards, Robert Barnes.


Create table Dynamicaly base on the parameter



I want to create an table base on the parameter value. I wrote below code, but it thow me error. How can I do that?


Error: Incorrect syntax near '@tableName'


ALTER PROCEDURE [dbo].[CreateTableDynamicaly]

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Insert value using Table Value Functions

a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

WPF / Silverlight tutorial: Visibility property and binding

Visibility property is a very powerful and yet often overlooked property available in both WPF and Silverlight. It enables you to set Visibility of certain UIElement objects to different states like: Visible, Collapsed and Hidden (not supported by Silverlight). This tutorial shows you how to use it and how to bind to Visibility property

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.

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


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