RS 2005 - Reporting Services - Custom Code Box
Aug 30, 2007Does anyone know if this box will accept VB.Net code or just VB code (old style) .... nothing indicated within the applicaiton IDE ....
Thanks ...
Does anyone know if this box will accept VB.Net code or just VB code (old style) .... nothing indicated within the applicaiton IDE ....
Thanks ...
I created a class library which uses a web reference
My SSRS report uses the class through its custom code
I copied the dll & dll.config of the class library to the VS2005 private assembllies and the report works
I copied the dll & dd.config to the reportserver bin and gave the assembly full trust by adding the necessary code group
I even added a code group the give the dll.config file full trust as well
Yet on Repost server, the report does not work
Any ideas
I suspect it is a permission problem
Can we call custom code in parent report, which written in the subreport.
View 5 Replies View RelatedBelow is code I am using to create a heatmap in SSRS. THe code seems to be working well except for one glitch. Sometimes numbers in the "middle of the pack" are white. Obviously they should be one the of colors listed below. Why numbers would be white when I declared only white for IsNothing.Â
 Public Function GetHeatmapColor(ByVal textBoxValue, ByVal minDataSetValue, ByVal maxDataSetValue) As String
    Dim colours As String() = New String() {"White","DarkGreen","Green","ForestGreen","LimeGreen","YellowGreen","Yellow","Gold","Orange","DarkOrange","OrangeRed","Red"}
        If IsNothing(textBoxValue) = True Then
      Return colours(0)
[Code] ....
Is Custom code of Sql Reporting services will only support VB Coding? Can't we use Java Script coding into the custom code of SQL Reporting services?
I've made a Report porting from SS2008 to SS2008.
In a textbox I use a:
Number -> Custom Format
like these:
=Code.FormatString(Fields!NumDecRpt.Value)
but gives me the "Unrecognized identifier" red squiggle.
My FormatString function (in the rdl file) is this:
Public Shared Function FormatString(ByVal Decimals as object) As String
 dim format = "N0"
 if not (Decimals is nothing or Decimals is System.DBNull.Value) then
   dim decs as integer
   decs = Convert.ToInt32(Decimals)
   if decs>0 then
     format = "N"+decs.ToString()
   end if
 end if
 return format
End Function
What's wrong with this?
I have a SSRS report that parses RTF to TXT and displays it in a report.  The report works fine and everything displays correctly.  The subscription email, however, contains a report with errors: Request for the permission of type 'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture= neutral,PublicKeyToken=b77a5c561934e089' failed.The report contains embedded code as well as references to System.Security and System. Windows. Forms.  I've updated .....Reporting ServicesReportServer ssrvpolicy.config and ....Reporting ServicesReportManager smgrpolicy.config to change permissions to FullTrust.
View 2 Replies View RelatedI 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.
View 4 Replies View RelatedCurrently we are using Custom Delivery Extension for SSRS 2008R2 We are planning to move it SSRS2012
My Question is: Whether we can use the same Code used for SSRS2008R2 to SSRS2012?
if not what code changes we should do?
Here:
http://msdn2.microsoft.com/en-us/library/ms160911.aspx
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?
Thank you!
I'm trying to add a custom report format to ssrs 2005 as per this [URL] I've added the code snippets in the example to three different ssrs 2005 server RSReportServer.config files but it does not work i.e do not show up in the export drop down when rendering report.
I've tried starting and stopping reporting services and it still does not works.
I've also modified the existing csv extension  with different options to see if it works but to no avail.However it works with SSRS2008 R2 . In fact it works right after I saved the config file, no restart needed.For SSRS2005 the file is in C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServer. I checked the registry setting  just to make sure I'm looking at the correct installation 'HKEY_LOCAL_MACHINE', 'SOFTWAREMicrosoftMicrosoft SQL Server90ToolsClientSetup', 'SQLPath' The three ssrs2005 instances are in three different physical servers and the problem is with all of them so it is not an isolated incident. I've dbowner rights to all three servers. The server versions are 9.0.4060, 9.0.4035 and 9.0.4053
Hi all.
I have a Application developed on VB2005 with the reports (processed local) from Microsoft Reporting Services 2005.
I would like to know how can i use the value of a variable to be displayed on a textbox on my report.
Thanks for the help.
Best regards.
dp
Hi,
I have a problem that seems impossible to resolve in RS but i need to be sure.
I'm creating an Embedded Code in VB of course, and i need to run a query within my code to be able to continue the rest of the code depending on the result of my query.
The problem is there is no adodb.recordset or adodb.connection like in normal VB.
So i created my query like as string:
Dim Sql as String
Sql="Select ..." into "from ........where...."
At this point if it was in normal VB,
i would do
MyConnection.Execute(SQL)
and then i will get the answer in my recordset.
I need to know if there is a way in RS to run my query since I cannot use use adodb ....
If it's not really possible, is there way to go around this problem????
Thanks for the Help
Mike
Hi, all experts here,
Thank you very much for your kind attention.
As we know the limited features on SQL Server 2005 Reporting Services, but we can build advanced features for it with coding on it. Would please any experts shed me any light on it in a summary like what advanced features could be added with coding on SQL Server 2005 Reporting Services?
Thanks a lot in advance for your kind help and advices. And I am looking forward to hearing from you.
With best regards,
Yours sincerely,
I have a requirement in which i have to create a custom .net class library for Ex:-I retrieve password(s) from a thrid party component. Below is what i am doing.
(1) Created a custom class library which reads a custom .xml file from a drive Ex:- "D:MyAppMYAppCofig.xml" and sets to my properties of my custom class library and inside it i created an instance of third party component's class and passed these values. Since i need to use this .net custom class library both in web and ssis/database side i am using this custom .xml file.
(2) After validating passed data (properties set in custom .net class library) the thrid party component instance object created in my custom .net class libraty returs a password to me own custom .net class libray.
(3) This password I use in my web app for connecting to database. This code is working fine.
(4) My question is how to execute a custom .net class library code through ssis and to use the my same custom .net class library and pass the password to my SSIS component / taks so that that code block also uses the returned password to connect and do any needed tasks? In other words how to use custom .net class library from SSIS.
My Environment is as follows:-
SQL Server is : 2008 R2
VS.NET 2013
Hi everyone,
I am testing reporting services custom assembly feature, but have problems.
I have referenced my dll, put my class name and instantiated it...
when i try and use a method within my instantiated class, it says "file or assembly name was not found".
Any ideas?
For custom authorization, I am overwriting the CheckAccess method.
But how do I know what I am trying to access in CheckAccess method? I need to know what report the check access method is trying to execute for our requirements.
How do I get that?
I need to implement custom security in reporting services. I have followed the standard example here:
http://technet.microsoft.com/en-us/library/ms160724.aspx
I got authentication to work without too many problems, and it authenticates by querying my custom table. I want to also maintain my authorizations in the same manner. I want to be able to define in my own tables that user test1 has permission to view reports 1, 3, 5, and 8. User test2 can view reports 1,3,5,8, and 9. User test3 can view 1, 2, and 4. Etc.
The authorization extension, contained in my version of Authorization.cs is where I expected to be able to do this. I wanted to be able to write code that queries my own tables and says, "does this user have permission to view this item?" Getting the this user portion is easy as is obvious in the many checkAccess methods. But being able to tell what item I am currently dealing with has proved impossible from the context of Authorization.cs, which implements IAuthorizationExtension. Knowing what type of item I am dealing with is obvious, but I need to know something that uniquely identifies the exact item I am dealing with.
How can I determine in checkAccess or any of the other available methods what "thing" they are looking at? What can I examine to determine that for instance this particular authorization request is against "Report 1"? It seems that if I was allowed to completely override Authentication to use my tables, I should be able to override Authorization to do the same. Is this possible or am I missing something?
Can anyone help? Thanks.
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)
{
int groupingValue = int.Parse(GroupingValue);
string[] colorPalette = {"Green", "Blue", "Red"};
if (groupingValue < colorPalette.Length)
{
return colorPalette.GetValue(groupingValue).ToString();
}
else
{
return "Black"; // if # of Series is more than defined - all undefined will be = Black color
}
}
}
}
I tried 2 different ways:
1.
Then I put a code into a Custom Code section of a report:
Code Snippet
Public Function GetColor(SeriesNumber as String)
Return CustomColorPalette.CustomPalette.GetColor(SeriesNumber)
End Function
And in the Chart Custom Color settings I put:
Code Snippet=Code.GetColor( Fields!SeriesNumber.Value )
And after compilation I get an error:
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:
Code Snippet
Dim X As CustomColorPalette.CustomPalette
Protected Overrides Sub OnInit()
X = new CustomColorPalette.CustomPalette()
End Sub
And in the Chart Custom Color I put:
Code Snippet=Code.X.GetColor( Fields!SeriesNumber.Value )
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
Thanks,
Alex
Hi,
I have problem with SQL Reporting Services, actually i want display the 3 parameters in a single line in a report i.e. in the while preview of the report and after deploying the report (by default it is showing 2 parameter per line). for example if have 6 parameters i wanted it display it in 2 rows and 3 columns format.
Please can any one help me in this regard.
Thanks
i am using Microsoft Sql Server 2008 Report buider 3.0. and i generated report and that report how to use custom variables.
View 2 Replies View RelatedI have an application that will ask a user about faults in a car. The info is stored in a database.
I want to create a report that will have a 'picture' of a car, as in the below; and will be highlighted depending on which part is faulty.
For example, if the bonnet is faulty, then it must be highlighted in a specific color.
I am working on SSRS report with project server 2013 and I want to add custom dll in SSRS report.I have create dll first then add into GAC Assembly After that i have add this dll in report project in SSRS.when i have try to deploy and build report...
.An error Occurred during local report processing.
Failed to load expression host assembly.
Details : Cannot Perform CAS Asserts in Security Transparent methods.
Hi all,
We are displaying an SQL Server 2005 Reporting Services report in our ASP.NET 1.1 application by accessing the report through URL and embedding the same in an iframe HTML web control. The user can export the report contents into CSV format by making use of the export functionality provided by Reporting Services.
Now we have been asked to display a warning mesage to the user when the no. of records in the report exceeds 1 million i.e. if the no. of records in the report exceeds 1 million and the user tries to export the report to CSV format by clicking on the "Exprot" link button, we need to display a warning message to the user.
My doubt is whether this can be done in Reporting Services. Are there any programmatic interfaces exposed by Reporting Services which might help us implement this requirement ?
Thanks,
CodeKracker.
I was trying to write a custom legend text for a chart that I have in SSRS. In the chart I have a Bar chart and a Line chart. I have two values coming from a dataset. One is a running value. All the series values are from year dataset.
I need to get a custom legend text for the three data series looking like this. "2013- Mth", "2014-Mth". Year should be dynamic and coming from the dataset.
I tried writing an expression in the series legend option as shown below.
But I don't get the required text for the chart. I only get the default series text for the legend. If I only write a text without the dynamic year taken from the dataset columns I get the custom text. But not when I concatenate the dynamic year series with the static text. Any property to enable/disable?
Is it possible to do custom sort for a Column Group?
i.e. if the columns are coming out as A Â B Â C, is it possible to change it B Â C Â A Â (or anything else).Â
Any One has implemented Custom Subscriptions of Reports(Reporting Services 05)
Hello,
I am trying to migrate my reports from SQL server 2000 reporting services 32bit to 2005 64bit. I am following the migration steps that MS specified.
Restored my Reportserver and ReportserverTempDB databases
Then I was using the configure Report services to upgrade these databases but I always end up getting the follwoing exception when I run the upgrade on the "Database Setup" configuration for 'ReportServerTempDB' database
System.Data.SqlClient.SqlException: Could not locate entry in sysdatabases for database 'ReportServerTempDBTempDB'. No entry found with that name. Make sure that the name is entered correctly.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(String connectionString, String script)
at ReportServicesConfigUI.SqlClientTools.SqlTools.ApplyScript(String connectionString, String script)
It's driving me crazy, why is it looking for 'ReportServerTempDBTempDB' in the catalog instead of 'ReportServerTempDB'?
Is it possible to migrate from 32bit to 64bit?
Any help is appreciated
I am not sure if this is possible or not, we have two datasets and each one has an additional calculated field which breaks the value JobBilledExVAT into three years.
So it reports for example how much we billed in May 2015, 2014 and 2013.
I have got the table to display this when reporting on one dataset by grouping by year
The datasets both look similar to thisÂ
SELECT
 Practice.ibvSalesByJob.JobBilledExVAT
 ,Practice.ibvSalesByJob.[Year]
FROM
 Practice.ibvSalesByJob
 INNER JOIN Practice.idvJobType
[Code] ...
The calculated field isÂ
=Switch(Fields!Year.Value = Parameters!Year.Value ,"15", Fields!Year.Value = Parameters!Pre1Year.Value ,"14", Fields!Year.Value = Parameters!Pre2Year.Value ,"13")
The field I am looking to add together is below
=Sum(Fields!JobBilledExVAT.Value)
If I do the below on the dataset associated with the matrix it displays the sum for each year correctly, I would however like to add the Sum(Fields!JobBilledExVAT.Value) from a different dataset (ABS1M) for the relevant year.
I tried this
=Sum(Fields!JobBilledExVAT.Value) + Sum(Fields!JobBilledExVAT.Value, "ABS1M")
However this adds 2015, 14 and 13 from ABS1M and doesn't add them individually if that makes sense? With the calculated field it only shows Year under the main dataset heading not 15, 14 and 13 separately.
I was think of using LOOKUP however I don't know how this would work as 15, 14 and 13 are not displayed under the dataset.
This is a subject that has been brought up before but I have not seen a definitive answer/solution.
We have implemented a custom authentication extension (forms authentication) for reporting services and it has been working just fine under "normal" conditions; "normal" being users logging in, viewing reports, and then moving on.
Recently some reports were created by our report group and they contain Dundas gauge controls for "dashboard" style reports. These reports are meant to be up all day and they post back every few seconds because the data they present is mission critical.
This of course exposed the inability of the reportviewer control to stay in the context of Report Manager when it comes to the cookie exchange and authentication thus resulting in the following error:
<html><head><title>Object moved</title></head><body>
<h2>Object
moved to <a
href="/ReportServer/logon.aspx?ReturnUrl=%2freportserver%2fReportExecution2005.asmx">here</a>.</h2>
</body></html>
I created a quick ASP.NET web application and added the reportviewer to it, implemented IReportServerCredentials and the report came up as expected but behaved the same way as it did in Report Manager. Same with a Windows Forms application.
Increasing the cookie timeout in the forms authentication tag is an option, but not an attractive one. Extending the reportviewer control is also an option, but I don't know if that is a good candidate right now because I don't see anything extensible yet.
Is this just the nature of RS with custom authentication or is there a viable solution out there right now?
Any and all answers are much appreciated and I thank you in advance.
Hi,
I'm getting the below mentioned error when i tried to open the sample reporting services code in Visual studio 2005
The application for project 'C:Program FilesMicrosoft SQL Server90SamplesReporting ServicesApplication SamplesFindRenderSave SamplecsFindRenderSaveFindRenderSaveCS.csproj' is not installed.
Make sure the application for the project type (.csproj) is installed.
In the Project types in Visual stuido i dont have Visual Basic projects or Visual c# projects.Please let me know how to install these projects types on the existing Visual studio and pls give me the link for downloading these project types.
Regards,
Prabhanjana
I have a SSRS report that uses a custom library. The custom library returns a string values, and I have tested this with a windows application.In the SSRS report. I have set the expression value for a text box as  =CodeReportingLibrary.CodeReportingFunctions.GetImage(1232)
However, when i preview the report the text box value shows as #ERROR. I checked the error list and I get a warning message : Warning 1 [rsRuntime ErrorIn Expression] The Value expression for the textrun ‘Textbox5.Paragraphs[0].TextRuns[0]’ contains an error: Attempt by security transparent method 'CodeReportingLibrary.CodeReportingFunctions.GetReferenceImage(Int32)' to access security critical method 'Microsoft. TeamFoundation. Client. TfsTeamProjectCollection..ctor(System.Uri)' failed.  Assembly 'CodeReportingLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself.  In order to access security critical code, this assembly must be fully trusted.
I have updated the rssrvpolicy.config in ReportServer folder, to include my custom dll.
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="CoDeMagSample"
Description="CoDe Magazine Sample. ">
[code]....
I am creating a SSRS report which would be executed by User manually through ReportServer URL.User would be generating the SSRS report for different Customer ID based on ad-hoc basis.
I am passing CustomerID as input parameter to the report. Is there any way to get the manually generated SSRS report name as 'Report_CustomerID_TodayDate.xls'.
E.g.If User is generating report for Customer ID 123 today then report name should be 'Report_123_07092013.xls'