.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

Best method for hiding a tablix when no data exists

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :Sql Server
Hello, I am using SSRS 2008. We currently have a number of reports which often have several tables stacked one above the other. In many cases the data supplying one or more of these individual tables returns no rows. Rather than inform the user of this using the no rows message options we simply hide the table since there is no reason for displaying the column and field labels with empty data as this is a waste of space depending on the report in question. In our SSRS2005 reports we often checked the primary key of the tables dataset by comparing it to NOTHING, example: Visability: Hidden = IIF(primary_key = NOTHING, True, False) But when we converted these reports from 2005 to 2008 this became unstable. Sometimes it works, sometimes it does not. What I am hoping to find out is the most stable, if not Microsoft-recommended, method for hiding a tablix(table, matrix or rectangle) if there is no data? I have seen the use of the rowcount option, but I would like to determine if this is the preferred practice before implementing it accross the board on our reports. All help is appreciated. Thanks.

View Complete Post

More Related Resource Links

Hiding rows/columns completely in SSRS tablix even when they have data

I have several columns and rows in my tablix.  I don't want to see all of them at once.  I am using a parameter that controls the visibility of the columns or rows of the tablix.  The issue is that it hides but the white space is left.  How do i take out that white space?

Sys.Data.DataContext.saveChanges method doesn't send update to server after DataServiceException ex

Hello,I have a page with a simple form that updates a single record in a table in my database.The database is accessed via WCF Data Services. To load and save data from/to the server, I usethe Sys.Data.DataContext object provided by the ASP.NET AJAX library. When the "save" button on theform is clicked, I use the saveChanges method of the Sys.Data.DataContext object to send all changes to the server.Also, at the server side, I use an interceptor that checks the "Price" fields of the record, and throws a DataServiceException exception when the contents of the field is a negative number.Both the JavaScript and the interceptor (in C#) are copied below.Here is the interesting thing:When I enter a negative price in the form, the interceptor throws the exception and my form shows an error message. Good.However, if I then make one of the other fields in the form a bit shorter (for example from "abcd" to "abc"),the saveChanges method doesn't send the data to the server. But it does call the success callback that I passed in to saveChanges, creating the impressionthat the data has been saved. This happens while the Price field is still negative. I used Fiddler to make sure thatno message is sent to the server. Also, the interceptor doesn't get executed.The weird thing is that if I make one of the fields a bit longer instead (for example &q

Different number of data in Report after using Render method.

Hello All, I have CRM4 report that i execute from outside the CRM system, using the ReportExecutionService2005.asmx web service, i get the report exported directly by calling the Render method of the webservice, but when i compare the data of the Report outside the CRM is less then the data in the report executed from within CRM system. I have tested the same report with same user in CRM and outside CRM but data is different. can someone guide me what is going wrong in the Render method.BharatKumar Bambhaniya Software Developer.

Data in a web method block

[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]   public static string[] GetCompletionList(string prefixText, int count, string contextKey) {       // Create array of movies       string[] movies = {"Star Wars", "Star Trek", "Superman", "Memento", "Shrek", "Shrek II"};          // Return matching movies       return (from m in movies where m.StartsWith(prefixText,StringComparison.CurrentCultureIgnoreCase) select m).Take(count).ToArray();   }  Disclaimer: I'm totally new to all this.Problem: The above code works great for me in getting the Autocomplete AJAX control to work. However, what I need is to define the string[] variable outside of the above block. What I'm looking for is the way to define such a variable as a global, or whatever the technical term in asp.net is for a variable that is persistent and recognized wherever it is used in the code-behind.Is this possible, without massive amounts of technical wizardry?

Calling a method with a class object as parameter data type.

   [WebMethod]    public string GetInfo(Customer inCust)    {        // Code in here    } I have a web service that resides on a remote server. I want to call a public method of theweb service named  "GetInfo". The method is shown above. The web service method expects a class object oftype "Customer". What I did to create a Customer object was to define in my asp.net project my own class named "Customer" which is exactlythe same as the class that belongs to the web service project on the remote server. I then created an instance of Customerand tried to call the web service passing in an object of type customer : my.Service ws = new my.Service(); // Get web service connectionCustomer aCustomer = new Customer();aCustomer.Initialize();ws.GetInfo(aCustomer) // call web service passing in a Customer object The problem is that the compiler gives me the following error: Value of type '_Default.Customer' cannot be converted to 'ws.Class1'. Here Default is refering to my Default.aspx.cs code. Why is this? Do I need to Cast my "aCustomer" class object to a type ofws.Customer ? How do I do that?

jQuery & WCF Data Service - PUT Update - Rejected with 405 Method Not Allowed

I am writing a sample jQuery/WCF Data Service app to utilize OData, however I am getting a status code 405 - Method not allowed when I attempt to update an entity with a PUT Http method. I have configured my WCF Data Service as follows: public static void InitializeService(DataServiceConfiguration config) { config.SetEntitySetAccessRule("jCredentials_PINs", EntitySetRights.All); config.SetEntitySetAccessRule("jCredentials_PINTree", EntitySetRights.All); //config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } I am attempting to update the jCredentials_PINs table. My jQuery call to update the WCF Data Service is as follows:function UpdatePIN(selectedTreeNode, updateObj) { var url = dataService + "/jCredentials_PINs(guid'" + selectedTreeNode.get_value() + "')"; var json = JSON.stringify(updateObj); $.ajax({ url: url, data: json, type: "PUT", contentType: "application/json; charset=utf-8", timeout: 10000, dataType: "json", success: AjaxPINUpdateSuccess, error: AjaxPINUpdateFailure }); } function AjaxPINUpdateSu

Programatically Send and receive data using Post Method

Hi,I wish to make a script which programatically send the POST data to one server and then the other server receive the POST message and retrieve the information. How should make this work? I already successfully write the sender site, the code as follow:string postData = "id=0&co=5";ASCIIEncoding encode = new ASCIIEncoding();         //data encoding         byte[] dataEncode = encode.GetBytes(postData);         //end ascii encoding scheme         string url = "http://localhost:51711/Handler1.ashx"; //         //web request         HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);         req.Method = "POST";         req.ContentType = "application/x-www-form-urlencoded";         req.ContentLength = dataEncode.Length;         //send data                Stream st = req.GetRequestStream();         st.Write(dataEncode, 0, dataEncode.Length);         st.Close();ASCIIEncoding encode = new ASCIIEncoding();byte[] dataEncode = encode.GetBytes(postData);stri

Only send report if data exists


I am trying to solve a problem where the people set up to get subscriptions only want the report emailed if it contains data.  Currently if whatever report it is does not have any data matching the report criteria they are still emailed an empty report.  I know I could add logic that basically runs the same query as the report and if @@ROWCOUNT > 0 then I could put some logic in the actually run the report and send the subscription but as a DBA that does not make sense as that is vbasically like hitting the database twice to run the same report.


Any help would be greatly appreciated

SharePoint Designer 2010 External Content Types Data Source Already Exists in Business Data Connecti


I used the Secure Store to create connection in SharePoint 2010 Designer External Content Types Data Source Explorer.  Later I changed some column names in the table.  I deleted the connection from Data Source Explorer and recreated it. I right clicked on the table and selected Create All Operations. When I clicked the Finish button, I got "The system definition with the same name as this data source already exists in the Business Data Connectivity Metadata Store and it refers to a different data source.  Cannot complete operation generation.  Add a connection to this data source with a different name and try again." 

I re-created the Secure Store using a different name in SharePoint 2010 Central Administration.  I didn't find the option to choose the connection name in SharePoint 2010 Designer. After I clicked Add Connection, I entered the Database Server and the Database Name, selected Connect with Impersonated Window Identity, entered Secure Store name, and clicked OK. The connection created with the database name as before.

No applicable aggregate method 'Sum' exists


 I am getting the subject error when using the sum in a LinkDataSource .  I can substitute the max(    and the groupby works ok.  Following is the LinkDataSource.  The environment is VS2008, SQL server 2008 on a Vista machine.

Thanks for any help.

<asp:LinqDataSource ContextTypeName="VogasSQLDataContext"    TableName="TenKeys" GroupBy="new(checkNo,Purchaser,Property)"
                It As TenKeyEntrys,
                Sum(Entry) As PropertyEntry)" 


Best Data Access Method


I am going to making asp.net 4.0 for first time. I was making my all application in asp.net 2.0 where I was using DAL and BLL method. In that DAL I was making Table Adapter.

Now I am going to make application in asp.net 4.0 and I am thing that my application will become more complex and huge data. Can somebody guide me about stable and fast method for data manipulate like insert, update, and delete also complex query.

I also appreciate if some tutorial for the same.

Kindly advice on which you have own experience.  

TCP Client/Server communication: NetworkStream.Write() send partial data unless close() method is re

Hi to all,
I wrote a simple client-server application that comunicate through NetworkStream class. The problems comes when stream.close() and client.close() methods are called. It look like only the first 10415 bytes are sent once those methods are called. So, if the data to send is more than this size, it is automatically truncated.

If I  remove both stream/client close() methods from the code, the data is fully received whatever the size is. I tried various alternative solutions (the ones marked as comments in the sample code), but none of them works.
The only thing that seems to work is adding a manual delay before the close() methods execute with something like that:

For Counter as integer = 0 to 10

The problem is that after delay I still don't know if all the data has been transfered or not. In addition to that, I will have to wait 10 seconds before sending another request, even if the response is just a few bytes of data. I could change at runtime the number of seconds to wait according to the size of the data to send, but I still think that delay is not a solution and will cause adverse effects.

So, for now the only working solution is to remove both Stream/Client Close() methods from

How to include column in resultset when data exists


Hi All,

I have a table with 4 columns as mentioned below. 

EmpName Desig Commission Perks
Tom CEO 29 0
Bill CIO 15 7
Wolf Manager 0 null
Sam Dev 8 4


I would be firing a query with where condition as "Commission = 0" now the Perks column should appear if there is any value in that, otherwise it should not appear.

FYI, at any given time, i would get only one record / one row as result set. I might be interested to know the name and designation along with Perks if it is NOT NULL

Any clue?

Thanks for reading

Every thing is perfect as long as you share

difference between data protection & data hiding



Hello all forum Members,

This is my question related to object oriented programming concept. I can't find a place for it to post.

I think it is the related place for it.

so that, i am posting it here.

I have a doubt in mind related to object oriented programming concept called as "Data Protection".

Can you tell me the difference beteween Data Hiding & Data Protection ? Are they same or is there any difference between them?

If there is any difference, can you explain it to me?

I know Data Hiding concept.

It means that data is concealed within a class, so that it can't be accessed by functions outsid e the class even by mistake.

I want your views on above issue.

Please give your reply.

Thanks in advance.

Does the 2008 R2 Data Alignment in the columns (Domain Scope) work with multiple tablix's


Does the 2008 R2 Data Alignment in the columns (Domain Scope) work with multiple tablix's or only with one Tablix with different groups?


I have been trying to use it for a report that has 3 tablixs (the same dataset and same format) but it doesnt seem to work. All the examples i find are for a single tablix.

Anyone know?

Will it be a good practice to submit form data through web service method?



I am trying to submit my form's data to database using asmx Web Service method(Through AJAX extension methods i.e., Script callback method). My form contains lot of data, though only text data.This will be a very fast process,but still i want to get some advice from you expert persons that should i processd in the same way ?Or should i submit form data in the traditional way ?

Please give proper reason for your answer.

Hiding data on each row.



In my SSRS report, I need to hide duplicate data in each row except the first row.

there are some fields i should show and some fields i should hide in the duplicate row depending on the condtion.


Thank you.

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