Getting The Foreground,Background Colors In The Report Item Dynamically Using Custom Code
Oct 25, 2007
Hi All,
I want to get the Font,Background colors of the report item(Textbox) changed in Runtime,According to the value in the Textbox. The idea is to get this done by using the Same Custom code for getting both the Foreground,Background colors, I thought to implement this with flag, But I dont know how to do this..
Reporting experts ..please help me with this issue.Thanks in Advance
I have 3 SSRS 2014 (Dev, UAT and Prod). I would like to change background colors of each environment and customize the title 'SQL Server Reporting Services' to ' SSRS Development'.
I prefer to implement both, a background color change and a title change. The reason for this is to clarify to end users which environment they are working with.
Where can I make those minimal changes in SSRS 2014.
I have a co-worker who applied build 3161 to SQL Server 2005. The original problem was that the print preview was showing up as black.This is a documented issue with Microsoft here:
http://support.microsoft.com/kb/935436
Now, when she goes into expression builder, the foreground AND background color for what you type in there appears to be white... so everything shows up as invisible. You can highlight the text you type and it shows up but otherwise it is obviously invisible.
I have developed a custom report item that works fine in design and preview mode while in Visual Studio. I cannot get it to show up on my deployed reports. Here's what I have done so far:
1. Deployed the report using Visual Studio
2. updated the rsreportserver.config file with the following entry:
I've also tried using the StrongNameMembershipCondition with no better results.
4. The dll and its dependencies are copied to the bin directory of the report server.
5. When I load a report with this custom report item on it, the report loads fine with no errors or warnings in the log file (even with verbose tracing). The area where the custom item should be is just white. It's almost like Reporting Services isn't registering the item correctly.
This is particularly frustrating because the report works fine in Visual Studio - apparently I configured that correctly. Any suggestions would be greatly appreciated. I'm stumped.
How would one go about setting the height of a custom report item programmatically?
I have a custom report item that renders back an image of indeterminate height. I cannot simply set RenderItem.Sizing = Image.Sizings.AutoSize; As the image is being rendered back at 300 dpi and will require being set to FitProportional. Therefore I need to set the height to a scale height. I've tried setting CRI.Height to a ReportSize value, but it tells me that I cannot because of the current state of the item.
I'm developing a Custom Report Item that generates a BarCode.
I developed all control functionality but now the problem resides on the Deploy Process.
For the fisrt time I followed 2 steps to deploy component on Visual Studio:
1) Copy the dll on " Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies " 2) Configure the control in "Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesRSReportDesigner.config"
On the other Hand I configured SQL Server Reporting services doing that:
3) Copy the dll on " Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServerin " 4) Configure the control in "Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServer sreportserver.config"
We are developing a custom report item but we cannot find a way to get the report parameters. In Vb examples there is mentioning of globals but these do not seem to be present in the c# enviroment.
Could anyone give a solution on how to get to the report parameter collection in run-time.
I'm looking at creating a custom report item which will allow me to input data into a textbox on the rendered report and dynamically update a textbox or another custom report item once I leave focus of that initial textbox. Is there a way to accomplish this? I have read that you can only create CRIs which use "graphic elements and images". Is that a true statement?
The reason why I don't want to have the initial value as a parameter is becuase the client doesn't want to have to click "View Report" everytime they want to see an updated value.
I am having a problem with deploying a CRI. On my local machine the CRI works fine, only at the development machine it doens't works. I did the following steps:
copy the .dll to the C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies
copy the .dll to the C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesReportServerin
put this code in rsreportserver.config: <ReportItems> <ReportItem Name="BusinessConnectDiagram" type="LogicaCMG.BusinessConnect.DiagrammingCRI.GenerateDiagramRenderer,LogicaCMG.BCDiagramming"/></ReportItems>
put this code in rssrvpolicy.config: <CodeGroup class="UnionCodeGroup" Version="1" PermissionSetName="FullTrust" Name="BusinessConnectCodeGroup" Description="Code group for the Business connect diagrammer"> <IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="002400000480000094000000060200000024000052534131000400000100010051C346CB2A79947C83804E550CF1561729DB2B5C7DEFF93758E419F16390A295DF4906ADD8FD9A29559D5E3C8BFA73D8D21B64724B1B0E688091C1541FD54D5290D6968C73E9ACA842B1E42AB3DE369F7B545933C8E101A737BB7D22F937921E7F02E00C5121D1DC312DBE96154E5A4E47BD7F489A655A09CF08EABCFB6AB7C1" /></CodeGroup>
put this code in rsreportdesigner.config <ReportItems> <ReportItem Name="BusinessConnectDiagram" type="LogicaCMG.BusinessConnect.DiagrammingCRI.GenerateDiagramRenderer,LogicaCMG.BCDiagramming"/> </ReportItems> <ReportItemDesigner> <ReportItem Name="BusinessConnectDiagram" Type="LogicaCMG.BusinessConnect.DiagrammingCRI.GenerateDiagramDesigner,LogicaCMG.BCDiagramming" /></ReportItemDesigner I get the following error message: Could not load file or assembly 'ReportingServicesWebServer,
Also when i stop Reporting Services it won't start again. I get a timeout.
I have developed a renderer that renders the xml to paint a rectangle with textboxes in all the right places based on the data retrieved off the database. When i render the a complete report to the reportviewer i have no problem.
I need however to render the rectangle into a custom report item for reusability and different scenarios. This just seem to be impossible since it seems like I cant use anything other than an imagemap to render custom report items. Is this true?
To make sure you understand....in other words....
Is there a way to develop a Microsoft.ReportingServices.ReportRendering.IRenderingExtension that renders the required xml like rectangles/textboxes etc. and then migrate this to a custom toolbox item. It just seems like this should be a very easy thing to do and something regularly needed. For example when you want to use textboxes in certain positions within a rectangle to draw a organisational chart.
I read that this sample is included, however when I install the samples the other three are in the "Extension Samples" directory but the "Custom Report Item Sample" is missing. Can anybody please tell me where I can find it?
I'm developing a Custom Report Item and would like to fill my properties dialog in design mode with real data. I have the name of the data source and the command text for the corresponding report dataset, read from the report design.
Is it possible to create an ado.net dataset so that I can display and use real data in my properties dialog box? First problem I have is to get the connection string from the data source string. I found no docs for that, especially the Microsoft.ReportingServices.DataExtensions.ReportDataSource class is not documented. Am I on the right way with that?
I am using RGB HEX #s in my report for some colors. It shows up fine when rendering to a browser, however when exporting to Excel my custom colors don't come over. I've tried creating a report.xlt file with my custom colors in it, but when I export to Excel it uses the standard Excel palette instead of the custom palette in my report.xlt.
Any ideas on how to retain my custom colors when exporting to Excel?
I need some help regarding Custom Colors implementation for Charts in the Reporting Services.
What we are trying to do is to make every color for every Series(see example below) to be a customized Corporate color.
For example each of the series on the Chart should be in specific Custom Color:
Series 1 - "LightBlue" Series 2 - "LightYellow"
Series 3 - "DarkBrown"
All I found from MSDN is how to do it in the Chart Properties in a Code section (right click on the report outside the chart -> Properties -> Code tab -> paste the Custom Code ).
And then to use it in the Chart color definition as:
Code Snippet=Code.GetColor( Series# )
But we are trying to do it in a separate C# class that would be updated only in one place, instead of changing 30 reports each time something is changed. So that it could be generic.
The C# class:
Code Snippet
namespace CustomColorPalette
{
public class CustomPalette
{
public CustomPalette()
{
}
public static string GetColor(string GroupingValue)
Error 303 [rsCompilerErrorInCode] There is an error on line 2 of custom code: [BC30451] Name 'CustomColorPalette' is not declared. c:developmentvoyagerreportsvoyager convert reports.rootvoyager convert reportsReport_007D.rdl 0 0
2.
Second way I tried:
Then I put a code into a Custom Code section of a report:
And after compilation I am getting an error like this:
Error 302 [rsCompilerErrorInExpression] The BackgroundColor expression for the chart €˜chart2€™ contains an error: [BC30456] 'X' is not a member of 'ReportExprHostImpl.CustomCodeProxy'. c:developmentvoyagerreportsvoyager convert reports.rootvoyager convert reportsReport_007D.rdl 0 0
Is there any workaround? Or all I can do is to make the Custom Colors manually in each report, and if something need to be changed - I will need to change it in each report separately
I'd like to use Globals!ReportName and User!Language in custom code like this:
Function Localize(ByVal key As String) As String Return ReportUtil.Localizer.Localize(Globals!ReportName, key, User!Language) End Function
If I preview the report I get an error message saying that there is error on line 2 of custom code. Is it possible to reach report variables in custom code?
When I run my report from within visual studio 2005 it generates just fine.
However, when I run the report from the reporting services local web site I get the following error. What do I need to do to fix this (temporarily turning off .net security uusing caspol didn't work).
An error occurred while executing OnInit: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
I have a balance sheet report developed and working. What I need to do is add the ability to click (or double-click) on a number and have a separate report (drill-down) open with the detail that makes up that number. I've researched drill-through reports, sub reports, etc. but can't find a way to do what I want.
I'm now thinking that I need to add custom code in the report properties, code window to do this. I'm hoping that there is a VB method I can use to call this report and pass a parameter. Pseudo-code for this function would look something like this: RunReport("DrillDownReport", "Parameter").
This seems like it should be pretty easy but I don't know what the function is in VB for running an SSRS report (if there is one).
Is this possible or am I barking up the wrong code tree?
I am trying to use the custom code in the report but I don't think I am understanding how this is being used.
I have a function to get starting months for a report parameter. The function is below:-
-------------------------------------------------------------- Shared Function GetStartingMonths() as String dim strDefault as string dim CurrentMonth as String Dim SqlString as String
'strDefault = Month(Now) & "/1/" & Year(Now) CurrentMonth = "5/1/2002" Do While CDate(CurrentMonth) <= Now SqlString = SqlString + "Select " & CurrentMonth & " as value, " & MonthName(Month(CurrentMonth)) & " " & Year(CurrentMonth) & " as MonthYear" CurrentMonth = dateadd("m",1,CDate(CurrentMonth))
if Cdate(CurrentMonth) = Now then Exit Do else sqlString = SqlString & " Union " end if
Loop
return SqlString
End Function --------------------------------------------------------------- what i am trying to do here, and hopefully produce a sql string that would fill my dataset of dates and their representation.
In the dataset, I had put the following expression =Code.GetStartingMonths()
However, I can't seem to get the parameter to display the dates. shows up as disabled in my report.
Am I doing something wrong here or is there a better way to doing this ?
Additionally, I was wondering whether there is a better SQL code that would achieve the same thing I am doing ?
I wrong a custom code in my report - Public shared Function Myfunc and in the header textbox - I tried to reference this code = Code.Myfunc.... the Myfunc gives an error Unrecognized identifier.The code is written in the report properties = Code Tab.
I've been using Konesan's FileWatcher control-flow item successfully in design-mode on my PC, which runs the package on a remote server.
I have installed the Konesan's FileWatcher on the remote SQLServer machine. I then imported the package to the server (Files System folder). I then select the package, right-click 'Run Package', then Execute, and receive the error:
"Error: The task 'File Watcher Task' cannot run on this edition of Integration Services. It requires a higher level edition"
..in the 'Package Execution Progeress' dialog. All other validation seem to be ok.
(Note, I'm executing the above steps using SQLServer Mgt Studio from my PC ; I'm not doing it from the SQLServer machine itself...not sure if this matters or not.)
The SSIS version installed on the server is 9.0.3054. It shouldn't be an "SSIS version issue", as it is the same SQLServer that I used (successfully) from my PC in design mode...
Is there any SQL code which displays one item if there is mutiple entry of same item. For example: in one columan I have many entry of one item, but I want to display only one item and also I want to display other column as well connecting with that item number.
I am facing some issue in rendering my SSRS report(2012 version) to excel sheet with color codes. i am using conditional formatting to display the colors. So what is happening is ,take the below expression as an example, for the id  = 0, we are not getting white back ground, we are getting some other colors. But the same thing is working fine in SSRS 2008R2.Â
We mark cells in  a report using color names like red, pink, and transparent in the fill expression. In the browser it works correctly. When exported to Excel the colors go to the wrong cells. This worked correctly in SSRS 2008.Â
I am new to programming and sqlserver 2000. i use sql2000 as my database server...
I have a problem on auto-generating medicine codes. and i hope someone would help me with my script.
as you noticed i declared two variables (@id and @code). I am having a problem in generating @code... i would just like to create an autogenerated medicines_code from another field from another table (hosp_counter.counter_id)
here is how my medicines_code should look like ('MEDS34') "where 34 is from a counter_id in hosp_counter table...
but it only creates a medicines_code = 'M' (below is the result)
34(this is from counter_id)M(this is the autogenerated code)AUTOGENERATE11111010110012110010000000018/29/2007 11:29:46 AM1/1/19001/1/1900
here is my script in autogenerating medicine code...
Hello, I'd like to use a background picture in my report and I have some problems with its resolution. When it is 72 dpi the quality of printed background picture is very bad and when the resolution is 300 dpi a picture does not hold in one sheet of report. Help me please.
Have you ever tried the following: change the background color of your body to any other color than white and deploy it. You will see that that body background color is still white.
I'm working on a dashboard which is black so I really need to get this working.
I have a Matrix report in SSRS and have added the subtotal in the report. Now I would like to change the color of the subtotal to a different color than the matrix report cells. However when I change the color, only the subtotal cell changes color and not the whole row which includes the summarised total. Is it possible to color the entire row in the matrix report?
I have a background image I'm using as a form within my report. the problem is that I needed to reduce the resolution of the image to 96 dpi in order to work with it and line things up within the ssrs/vs2005 report editor. However because the image is only 96 dpi, it looks awful when I go to print. Is there a way I can make it use a different higher resolution version of this image for printing.. or what would someone suggest I do in order to get around this problem..