.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

SSRS Change field properties dependent on the render type

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

I've built a report that has background images with text over the top, which when rendered as Word or Excel the images don't show and because the client has requested the text is white against the image, the text isn't visible.

What I'd like to do is run code within the report that identifies the render type and if xls will change the text color through an expression.

Any ideas would be greatful.


View Complete Post

More Related Resource Links

SSRS 2008 R2 Dataset Field Value Property Data Type not numeric

We're building SSRS 2008 R2 reports using SSAS as data sources.  There are several occaissions where the data types of certain dataset field values that represent cube measures are not numeric.  As such, when these fields are used in an aggregate function they throw an error.  Is there a way to remedy this in the dataset? Thanks for your help.

SSRS 2005 Render Format Excel Issue with Time Field


I have a report that uses a datetime field but gets populated only with the time. So, in SQL db, it gets stored with a default date value of 1899-12-30 12:01:01 with the correct time filled in. Report in SSRS Preview mode displays the value just fine when I use the Time format in Layout mode. I build and deploy and able to view the report in a web browser with no problem displaying the time field. But when I subscribe to the report and choose Excel render format, when I open up the Excel file from the email that was sent, I get negative decimal values. I have tried every possible Time format in SSRS but I get the same result. I also tried just the default and still gives me negative decimal values that show up as ####### in Excel.

Any help will be greatly appreciated. Thanks

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.

Set Custom Properties for a custom field type within a content type feature



I have created a custom field type (derived from SPFieldText) and added a custom property "MyProperty". Now what I am looking for is, I need to use this field type in my Content Type feature.

How can I specity my custom property within a Content Type definition file, just like what we do with OOB field types?

I've seen a workaround here but it only solves only the problem of XSD validation. Site column is getting installed properly but the value that I specify in the feature is not set for the column after installing the feature.

Thank in advance


Arun D Gangadharan

option type field value shows ";#" in SSRS

I had created a one report in SSRS from the list in sharepoint.

In sharepoint list the column name status has values save,approved

When I see that status column in SSRS it shows "2;#approved"

How can I remove these 2;# from that column value in SSRS report?

Change data type of library field from Single Line Text to currency


I have an InfoPath 2010 form that has a field listing the amount of currency on a meter. It is a Decimal form in Infopath but publishes to SharePoint as a Single Line of Text.  It will not let me modify the column in SharePoint and it will not let me select the allow edit from the Publishing Wizard.  I need the column as a currency so my Excel Queries work.



custom field type works in view properties, but not in list view: 3 parent fields filter child list,


My situation:

A) odd thing is that no matter where I put a stop point in my custom field type, it is NEVER hit when the items are displayed in list view.  Event with <Field Name="CAMLRendering">TRUE</Field> which causes the list to error out, but again no stop point to help me know why.

B) the value of the column in question will be different for every user who views the list, I'm querying a secondary list based on the user's loginName, and two of the fields from the list we're in. 

C) the display is customized based on whether any records were returned and the current DateTime, so possible displays would be "", "! 12/1/2010", and "7/7/2011"

D) and the text displayed links over to a form for them to do their assignment. the link url would be a config setting url + "?[one of the fields form the list we're in]"

My questions:

1) Is it possible for fieldtype code to execute while a list view is being rendered?

2) If not, then should I chase down the path of a content query webpart?  Will it be able to filter on the current users login name?

3) If not on 1 or 2, can you think of any other way to do this beyond creating a custom application page? (need to having filtering and sorting on this page)

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

How to change text in columns in SSRS?


I need to create a complex report and export it to Excel. 

In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. Any ideas please. I am new to SSRS and tried out many ways but didn't get it.

Custom field type from LookupMulti only saves 1 value


hi, i'm having this problem:


i'm trying to create a custom field type that works like a multiple lookup, but when i select multiple values only one is ever saved. has any one else ever run into the same problem who might be able to point me in the right direction?

SSRS 2008 Graph Type?


Greetings -


I am required to plot the following graph in an SSRS report.


Sum of Total Credits to be shown on Positive side and total sum of Debits for a month on negative side. I have created a query which retrieves all the expenses for the month and sums them up before feeding the same to the graph for plotting. Both values returned are positive integers.


(Sorry for the diagram below, i tried to paste an image but it didn't work)

"The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not


I tried to convert a project from ASP.NET 1.1 to 2.0 and found one big problem which stops the whole process.

An .aspx page from the subfolder "admin" includes a user control from the subfolder "common". Both subfolders ("admin" and "common" are in the root).

- admin
-- aspx page
- common
-- user control

The page works well when started from Visual Studio, but when the project is precompiled for deployment, the next error occurs:

"The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

I tried to use "Reference" in the .aspx page, but that doesn't work.

Does anybody know any workaround for this?

Store XML in XML type field or using FILESTREAM

(Posted this in Database Design, but then thought I should post here as well)   Hi All,   I am trying to figure out what would be the best method for storing xml documents in the db...if we should use an XML type field or if we should use the newly introduced FILESTREAM? We would have a need to shred those documents for queries and possibly use the FULL TEXT SEARCH to allow for user defined searches on those documents.  Does anyone have any thoughts on either approach for SQL server 2008?    Always apprecaite the input I get on this forum...very helpful.   --B

Coloring sql reporting services report depending on the change of value of a certain field

Hey guys, I have an SSRS report that looks something like this: Column1 Column2 Row1 2 A Row2 2 B Row3 2 C Row4 6 A Row5 11 E How can I color the rows with the same value in Column1 with the same color? for example Row1 to Row3 would have one color, Row4 would have a different color, then I'd go back to Row1's color for Row5? note: I don't know in advance the numbers returned in Column1. I query for them and then I hide them from the user so Column1 shouldn't show on the report, but I want to use it for the coloring only.

Creating a custom drop down field type with SelectedIndexChanged Event

Hi All, I am trying to create a custom drop down field type and I was able to acheive that using the MS link http://msdn.microsoft.com/en-us/library/bb861799.aspx. As per the link, once the custom field is created we can override the "Validate" method to write the Validation logic and that works fine for me too. However I am facing a challenge even before going to Validate . Let me explain my actual requirements here. I need to build a custom drop down field and expose the field to the user in "Edit Properties " Page of a document library. Along with this field, I will be having some OOB site columns in the Edit Properties Page (Ex: Title, Subject etc)  . When user selects a value in the drop down, I need to hide/show few OOB site columns based on certain criteria.  I am facing a challenge of how to capture the "SelectedIndexChanged " event for the Custom drop down field in Sharepoint (Can we wire the SelectedIndexChanged event to a custom dropdown field type) ? Is this acheivable in SP 2010 Custom field type ? If so, how can I do it ? Can any of you kindly help me here?   Regards, Yesh

calculating field in ssrs

I have a dataset which brings in sales, transcast, transbilling, and cogs in by group. I want to calculate net spend as a percent to sales and gross spend as a percent to sales. but can't seem to figure it out since sales, cost, transbilling, and cogs are all in one column(entry_type)...   my dataset looks like this   group | entry_type| year | jan | feb | mar | apr | may | etc...

I need help with the syntax for passing a record field value from SSRS to an asp page

I have tried several variations without success.  Here is where I am now.  The goal is from inside Report Manager report, link to an asp page with a filed value. This is from the expression line of the Jump to URL entry. Also I am trying to open a new page http://www.whereever.com/CSSurvey01.asp?RecordID=" & Fields!respid.Value            
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