.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

Expression in Report Column

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :Sql Server
Hi Guys, One of the column got expression and pointing out to other subreport using iff . However, it throwing me following error message.      An error occurred during client rendering. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index I am using below expression  =iif(fields!Banner_Type_ID.Value  ="FWR","","Click To Show Business Owners") and underneath the field name red squally line appearing, when you move the cursor on that line it stats unknown collection member. But  that field name does exist in the dataset. Not sure why it appearing in red.  Can anyone shed some light please, thanks, D  

View Complete Post

More Related Resource Links

Alternating row background for first column of a report


is there a way to make the first column of a report use the an alternating background color? 

I have the background color set for the entire row however it does not work for the first column if the color is set to an expression.  If I just set it to a color i.e. red it works just fine. If I insert a dummy column to the left it works just fine (but the dummy column does not work, presumably because it is first??).

In the file below only the textbox for part number does not show an alternating background.  All others work correctly.

                    <Textbox Name="PartNumber">

Trouble importing strange column format report from Excel 2007 to SQL 08

Hi, I'm not sure whether this belongs in this section or the SSIS one so hopefully I've got it right!  Hoping someone will be able to help with a problem I'm having importing a report with header and detail rows from our antiquated POS system into SQL 2008 tables.  The reports export in Excel 2007 format and for each header row there can be one or more detail rows starting from column B.  As such I've tried several things such as openrowset, an Access 12.0 OLE DB source in SSIS and even COM automation of Excel to try and write a conditional split which will hold the header details in variables then write them to rows alongside the detail rows.  I've pasted a small sample of the data here as I wasn't able to attach it: 01/07/2010 @ 11:18 Page: 1 RECEIVING: Voucher Journal Sort: VC|Str|Vou Date|Vou #|Document SID Filter: Voucher Date: 01/06/2010@12:00a..30/06/2010@11:59p Include Item detail: DCS|Item#|Desc1|Attr|Material|Size|Qty VC Str Vou Date Vou # Qty ABC 001 15/06/2010 12345 38 E NN 66 200148 XXXXXXXX RED SHAD E NN 66 200149 YYYYYYYYY BLACK GO E PP 60 200154 ZZZZZZZZZ BLACK CDE 002 16/06/2010 13839 8 F SA 35 217500 XXXXXXXX Natural F SA FL 218674 YYYYYYYYY Chalk F SA WE 221462 ZZZZZZZZZ White FGH 001 21/06/2010 13905 3 F SH 85 126260 XXXXXXXX Navy IJK 001 23/06/2010 13914 3 E AA 61 250005 YYYYYY

Dynamic or Expression-based Report Page Properties

Hello, I have a tablix(table) with column grouping making the number of columns dynamic. Although our customers have been warned that this could lead to the columns going beyond the edge of the normal landscape 8.5x11 inch page, they have asked for alternate solutions. Beyond rotating the column labels and reducing fontsizes, the issue is not so much that it goes off the page, but the fact that in print preview mode the data is broken up requiring that you go to the next page to get the remaining data. What I am investigating is whether the Page Properties of the report body, either the pagesize property and/or the interactivesize property, can be manipulated at run time? This way if a user, based on their experience with the parameters they usually select and pass into the report, knows that the results will span the length of the page onto a second page, could choose a new parameter such as pagesize/interactivesize so that it changes from 8.5/11 to perhaps the next standard page size of 8.5/14 inches? This does not mean the contents would change during the course of rendering the report, just a new input that could decide at run time what paper size to use in print preview mode.   Thanks.

report expression for month and year

Hi , Can anyone help me how to write a report expression to get the following out put? Actually this value is the month of previous month. I want to set default month name of the parameter to previous month. This is sep.So it should display like this; Aug - 10 Thanks shamen

is it possible to make 2 column name badges with Report Builder 2.0?

I am starting the process of moving reports from Crystal to SSRS and I am trying to build what I beleive should be a simple two, column (Avery 74461) name badge report.. It should look like this...       NAME                           NAME FULL NAME                   FULL NAME  COMPANY                    COMPANY Yet I cannot find anything in the forums or help system... Basically it is a 4 up by 2 wide name badge page.. i need different names on each badge.. Is this something it can do or no? and if so can I have some type of example on page layout field system to use? (ie: matrix, text boxes, etc)   Thanks!  

SSRS BUG? When a FontStyle expression is used in a report, the Browser Text Size setting overrides t

I have created a report that has the same font size for all the sections in the report. Some sections' fields use a FontStyle expression that changes the FontStyle between Normal and Italics conditionally. I run the report through the reportserver interface and the report looks fine. I run the report through the ReportViewer control and the the fields which use the FontStyle formula are overridden by the Browser's Page Text Size. Also, when I look at the inline HTML Style that's generated, the fields with the formula don't have a style, they are blank, while the fields with without a FontStyle expression have an inline HTML Style generated. And this is probably why the browser text size setting can override. This seems like a ReportViewer HTML render bug... Or is there a way around it??

How to change row value of column before rendering on to the report

I have a detail section in report. I am perfectly able to retrieve all the data from the Sharepoint List into datatable and bind it, to generate reports inside the details section.
All the columns and related row data are getting displayed as reports in to the detail section.
But, my issue is, I want to change the row data for a particular column before rendering on to the report.

for instance, if column named Product has some values, I would like to display these values with different string name based on a switch condition. How do I achieve this?

report is stuck after addition of description to code column


Hey everybody

This is rather odd and anoying..

I have a simple report with one table and some 4-5 fields in its columns.

No groups,sorts or filterring.

Every thing goes well until i add another column to report with some desccription (lets say area name).

This addition makes the report stuck..

Running the data set alone in reports data section is fine as well.

Have anyone seen this odd behavior?

Any idea what mite cause it or how should i debugg it??

Data set contains some 10,000 rows.

Thanks alot for your attention



Hide static Column in matrix report


I created one matrix report. i have 2 static columns and some dynamic (PIVOT) coulmns.

I have one boolean variable. If it is true need to hide first column else hide second column.

For matrix report Column visibilty property is disabled.

How to do this?

kindly help me.

Report Builder 2.0 Strange column when using model

Hi, We have build a simple dsv and model and are writing reports in report builder. Every time we add in a linked table we are getting a column appearing with strange values e.g. "AH.gEAAA=" these appear to come from no where and have a column name the same as the table, Can anyone please explain what they are and how to get rid of them please.

Report Viewer column width too small when viewing in IE 8, works in IE 8 compatibility view and Fire


IE 8 Version 8.0.7600.16385 64-Bit Edition
Report Viewer

The web page is just the report viewer control (see code below).  

When the report is rendered in Report Viewer   (IE 8), the width of the first column is much smaller than it should be. 
When the report is rendered in Report Manager (IE 8), the width of the first column is normal size.  
When the report is rendered in Report Viewer (Firefox or IE 7 compatibility view), the width of the first column is normal size.


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
<%@ Regi

#Error when building an IIF expression for a column label




This is a report based on two different hierarchy. PCA and CCA hierarchy.

The @hierarchy parameter will determine which hierarchy to use and that will drive what is displayed on the row names.

When I write the following expression, all I get is #Error.

Parameters!hierarchy.Value = "PCA",


If I change the expression to

Parameters!hierarchy.Value = "PCA",

The the PCA Hierarchy names appear but when I switch to the CCA on the @hierarchy, I get the #Error message again.


Can any one help?




add viewable column lables to a tablix report

I need to create viewable names/lables to the left of the details to label items in my tablix report  how do you do this?

SSRS report export to CSV showing column headers always in English inspite of the selected locale.


We are encoutering an issue with SSRS report export to CSV showing column headers always in English, regardless of locale.


We are using SSRS to display report results in a report viewer window launched from an ASP.net page.


When the report viewer is lauched in fr-CA locale, the report viewer window content is in French. However, when the results are exported to CSV, all the column header labels inside the CSV are always in English.


Cant put report item more than 1 in 1 expression, in footer


Help, this is emergency.

been developing too much with rs. cant turn my back now. too late. but im stuck. damn.

issue is in master report contain subreport.

since i cant get subreport footer to show up in master. i find tricky way by using summary dataset in master report.
but there is one problem, i need to display function display number as words. should have 2 parameters, money, and the currency, got this from report item.
the problem is one expression cant contain more than 1 report item. and when i try in custom code, cant do that also since i cant access report item there.
i cant use parameter since I really have to access report item. the report item is field in dataset of list in master table that group accounts and display their banking account statement.
i think its stupid, why in the world i couldnt use more than 1 report item in one expression.


What is the Expression for calculating Sum of percentages in SSRS report.


Hi All,

I want to calculate Sum of percentages in my SSRS report.

I have two fields :

Field1   Field2

For Field1 I am using the following formula --- Fields!suminsured/Sum(Fields!no.ofRisks) * 100

The  Field1  formula is working correctly....

Now I want to calculate Field2 from  Field1 ....

My Field2 Formula is Sum(Fields!suminsured/Sum(Fields!no.ofRisks)*100) --- But when I am doing this way its giving error...

Can any body let me know how to acheive Field2 ....??

Field2 is nothing but Sum(Field1) ....But for Field1 I am using Percentage Forumula....So field2 should be Sum(Field1) percentages....

Any ideas in this regard will be appreciated...

Waiting for the responses..




problems column width after deploying the report



I have created a report using SSRS 2008. Report has two tables. They are almost identical(columns and rows.but data comes from two different data sets).

After deploying the report, it works fine when it is viewed on IE7. But after installing IE8, There is a problem with column width.

Width of the columns of the second table is much wider, although column width of both tables are set to a one value(1.20).

Can any one tell me how to fix this pls?



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