Tuesday, March 27, 2012
Customize the reporting services interface display reports.
We are using the reporting services interface to display reports. By using
the security we restricted some access and everything works fine.
Now we would like to change the way the parameters prompt works.
Is there any way of applying styles to the pages rendered by the reporting
server?
Thanks,
Daniel Bello.You can modify the RSReportServer.config file to specify a custom style
sheet for HTML Viewer. The <HTMLViewerStyleSheet> setting is not included in
the file by default. You must type it into the <Configuration> selection of
the RSReportServer.config file and then specify the style sheet you want to
use. Do not include the .css file extension when specifying the style sheet.
The following example provides an illustration of how to specify the style
sheet:
<Configuration>
...
<HTMLViewerStyleSheet>MyStyleSheet</HTMLViewerStyleSheet>
...Read the full article at:
http://msdn2.microsoft.com/en-us/library/ms345247.aspxThanks,Daniel Bello
Urizarri.
Customize dimension attributes in SSAS
I have a time dimension table with an integer column "Quarter". In the SSAS Dimension I would like to display this as "Q 1" etc. instead of just "1".
I could easily add a column in the root table, but would prefer to format the column in the SSAS dimension. Can't find a "Format" property for an attribute. Is there a way to do this?
The most simple way to do this is to add a named calculation(a new column) in the data source view for the dimension table.
Add this attribute to the dimension or use is as the name column for the quarter attribute/column.
Add: 'Q' + ' ' + Cast(Quarter as Char(1))
HTH
Thomas Ivarsson
|||if u have choosen "typical" time dimension in analysis services, u would get "Quarter" in the display.Thursday, March 22, 2012
Custom Y Axis Labels
I have data that is bit data type. I'd like the Y axis to display "Yes" for
1, "No" for Zero or Negative one.
How can this be accomplished? Thanks in advance.
--
Tim Heuer
heuert at Comcast dot netThe closest you can get is to use a bar chart (and therefore the x-axis
becomes the y-axis) with two static series - one for "Yes" and one for "No".
The aggregate functions would look similar to this:
Yes: =Sum( iif(Fields!BitField.Value = 1, 1, 0))
No: =Sum( iif(Fields!BitField.Value <> 1, 1, 0))
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tim Heuer" <heuert at Comcast dot net> wrote in message
news:4BB4D6A1-693D-4292-986B-DB66E6C17669@.microsoft.com...
> Greetings.
> I have data that is bit data type. I'd like the Y axis to display "Yes"
for
> 1, "No" for Zero or Negative one.
> How can this be accomplished? Thanks in advance.
> --
> Tim Heuer
> heuert at Comcast dot net
custom web app for reportviewer
Hi,
I am trying to develop a custom web page to display and generate our company reports.
It shoud have a login page, and then a general window with 2 or 3 frames (top frame with general info, left frame with a
dynamic list of all existing reports (eventually categorized by a certain word in the report title), and a center frame
that has initialy the company logo and after selecting a specific report displays the parameters and afterwards the
generated report).
Does anybody has some pointers or links on the web where some of this is a little bit documented.
I have dev skills in vb.net and know how to work with ssrs.
My web dev skills are intermediate.
All info, tips, hints are very welcome ...
Greetings
Vinnie
If ou want logic i can provide you that..
code you need to write..
I think you can create login page and list of report..
For the 3rd frame.
keep 3 control there
1 image
2 panel with all the controls thath you need for parameter
3 reportviewer control (property visible = false and size (min that you want)
for 1 - you can initially keep image visible.
on click on list of report make it invicible and make the panel for parameter visible.
2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.
( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte
then parameter would be PatientName,last date.
in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..
So for each parameter I hav one control.
So it would be easy to make them visible as per report name.
After that you need to set report to report viewer
than pass parameter values to report
than database login to report( if needed)
than make report viewer visible.
RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
string ReportPath = "";
ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ;
if (File.Exists(ReportPath))
{
RptViewer.LocalReport.ReportPath = ReportPath;
//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
//RptViewer.ZoomPercent = 100;
RptViewer.LocalReport.DataSources.Clear();
SetReportParameter(weekdate);
RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));
RptViewer.RefreshReport();
}
private void SetReportParameter(DateTime weekenddate)
{
Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;
Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;
ParInfo = RptViewer.LocalReport.GetParameters();
RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];
for (int j = 0; j < ParInfo.Count; j++)
{
switch (ParInfo[j].Name.ToLower())
{
case "centername":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);
break;
case "pweekstartdate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());
break;
case "pweekenddate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());
break;
}
}
RptViewer.LocalReport.SetParameters(RepParameter);
}
private void SetDBLogonForReport(string ReportTitle)
{
Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];
crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();
crd[0].Name = ReportTitle;
crd[0].UserId = User;
crd[0].Password = Pwd;
RptViewer.LocalReport.SetDataSourceCredentials(crd);
}
Hope it helps.. all the best..
|||If ou want logic i can provide you that..
code you need to write..
I think you can create login page and list of report..
For the 3rd frame.
keep 3 control there
1 image
2 panel with all the controls thath you need for parameter
3 reportviewer control (property visible = false and size (min that you want)
for 1 - you can initially keep image visible.
on click on list of report make it invicible and make the panel for parameter visible.
2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.
( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte
then parameter would be PatientName,last date.
in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..
So for each parameter I hav one control.
So it would be easy to make them visible as per report name.
After that you need to set report to report viewer
than pass parameter values to report
than database login to report( if needed)
than make report viewer visible.
RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
string ReportPath = "";
ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ConfigurationManager.AppSettings.GetValues("RSReportpath")[0].ToString() + ReportName; // @."c:\code\slimcommon\reporting service reports\rs report\" + ReportTitle + ".rdl";// Application.StartupPath;
if (File.Exists(ReportPath))
{
RptViewer.LocalReport.ReportPath = ReportPath;
//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
//RptViewer.ZoomPercent = 100;
RptViewer.LocalReport.DataSources.Clear();
SetReportParameter(weekdate);
RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));
RptViewer.RefreshReport();
}
private void SetReportParameter(DateTime weekenddate)
{
Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;
Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;
ParInfo = RptViewer.LocalReport.GetParameters();
RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];
for (int j = 0; j < ParInfo.Count; j++)
{
switch (ParInfo[j].Name.ToLower())
{
case "centername":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);
break;
case "pweekstartdate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());
break;
case "pweekenddate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());
break;
}
}
RptViewer.LocalReport.SetParameters(RepParameter);
}
private void SetDBLogonForReport(string ReportTitle)
{
Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];
crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();
crd[0].Name = ReportTitle;
crd[0].UserId = User;
crd[0].Password = Pwd;
RptViewer.LocalReport.SetDataSourceCredentials(crd);
}
Hope it helps.. all the best..
sqlTuesday, March 20, 2012
Custom Sort
I want to be able to display in say the following order
Product A
Product C
Product B
id's wont work as they are numbered all over the place.
Thanks in advanceOn Sep 11, 7:20 pm, Tango <Ta...@.discussions.microsoft.com> wrote:
> Is it possible to use an expression to manage a sort.
> I want to be able to display in say the following order
> Product A
> Product C
> Product B
> id's wont work as they are numbered all over the place.
> Thanks in advance
Sure that shouldn't be a problem. You will want to right-click the
table/matrix control -> select Properties -> select the Sorting tab ->
select <Expression...> -> below the Expression column, enter the
desired expression. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||thank you
i was more looking for what the expression would be
"EMartinez" wrote:
> On Sep 11, 7:20 pm, Tango <Ta...@.discussions.microsoft.com> wrote:
> > Is it possible to use an expression to manage a sort.
> > I want to be able to display in say the following order
> > Product A
> > Product C
> > Product B
> >
> > id's wont work as they are numbered all over the place.
> > Thanks in advance
>
> Sure that shouldn't be a problem. You will want to right-click the
> table/matrix control -> select Properties -> select the Sorting tab ->
> select <Expression...> -> below the Expression column, enter the
> desired expression. Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>sql
Monday, March 19, 2012
Custom Report Item: Textbox
If it is possible, how I can extend the Textbox item with a DataSet
property. In order to display a field from multiple rows, with a separator ?
Example:
a dataset with 10 rows (and 1 field "Name")
and I want to display in the Textbox
"Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Name10"
ThanksI'm sure this is possible, just to give you a point in one possible
direction...
From a Database side of things, you could pivot the data in your SQL
statement. SQL Server 2005 has new SQL commands called PIVOT and UNPIVOT...
Once your rows values are pivotted to columns in a single row, then you
could specify them easily enough in the text box.
Hope that helps.
Dan.
"gbouzebra" <gbouzebra@.discussions.microsoft.com> wrote in message
news:D8959BBA-3778-4129-9E3F-AB4443A58C5F@.microsoft.com...
> Hi all,
> If it is possible, how I can extend the Textbox item with a DataSet
> property. In order to display a field from multiple rows, with a separator
> ?
> Example:
> a dataset with 10 rows (and 1 field "Name")
> and I want to display in the Textbox
> "Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Name10"
> Thanks
Custom Rendering
I want to "create" a renderer for RS (2000). I read some articles on
this topic, and i found this technical sample for RS 2005 :
Display Your Data Your Way with Custom Renderers for Reporting Services
:
http://msdn.microsoft.com/msdnmag/issues/05/02/CustomRenderers/default.aspx
I've read int this newsgroup the way to implement the rendreing is the
same in RS 2000.
I can compile my customized renderer, but when i look at my reports, i
don't see my renderer in the ouputs dropdownlist... I have modified the
"RSReportServer.config" and "rssrvpolicy.config" files, as its written
in the article. I tried IISRESET, and I even restart the server, but no
changes.
Does this sample really work in RS 2000 ?
If yes, do you have any suggestion to resolve my problem ?I'm back to give more information about my problem.
Here's what i found in the report server log file (sorrry, some words
are French) :
w3wp!extensionfactory!ca0!06/07/2005-15:52:05:: e ERROR: Exception
caught instantiating report server extension:
System.Security.SecurityException: =C9chec de la demande pour une
autorisation de type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=3D1.0.5000.0, Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089.
at
XXX.ReportingServices.CustomHTMLRendering.CustomRenderer.SetConfiguration(S=tring
configuration)
at
Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.GetNewExtensi=onInstance(String
extensionName, String extensionType)
L'=E9tat de l'autorisation qui a =E9chou=E9 =E9tait :
<IPermission
class=3D"System.Security.Permissions.StrongNameIdentityPermission,
mscorlib, Version=3D1.0.5000.0, Culture=3Dneutral,
PublicKeyToken=3Db77a5c561934e089"
version=3D"1"
PublicKeyBlob=3D"0024000004800000940000000602000000240000525341310004000001=000100272736AD6E5F9586BAC2D531EABC3ACC666C2F8EC879FA94F8F7B0327D2FF2ED52344=8F83C3D5C5DD2DFC7BC99C5286B2C125117BF5CBE242B9D41750732B2BDFFE649C6EFB8E552=6D526FDD130095ECDB7BF210809C6CDAD8824FAA9AC0310AC3CBA2AA0523567B2DFA7FE250B=30FACBD62D4EC99B94AC47C7D3B28F1F6E4C8"/>
.
It seems that my assembly mscorlib can't be called, or that mscorlib
can't access something.
I don't understand really this error. Can somebody help me ?
Thanks.
Sunday, March 11, 2012
Custom Page Size
Is it possible to setup custom page size in crystal reports? I do have about 40 column and it is necessary to display and printing in report viewing. What I do now is I used A3 paper size & landscape. In report design, the page ruler at the top shows 23(inc / cm..not sure about this). Anyhow..can I adjust it to be more bigger than this? Currently the reports can generate the data as per requirement..but it look quite messy and bit cram. Kindly adviseYou need to install a printer driver for larger sized paper.
Bit of a pain when Crystal supports extract to Excel but won't let you design a report bigger than an installed printer driver size.|||Hi JaganEllis
Thanks for the response.
I did install the printer software. Adobe PDF creator..which is the software allowed me the option to choose A1 to A3 size. When I used A2 page size..it expand till 26 (page ruler) ..it look better than used a3 or A4 size. Unfortunatelly still quite messy.. so, I've changed to A1 size..and now I can resize the column and the data printing little bit nice. However..when tested it in report viewing..the error message come out 'Page too large' .. ayyo! Another problems come out.. hmmm what should I do? anybody can suggest me another printer software that can printing for larger size.
Out of idea already..kindly advise.
Crystal 2402
Wednesday, March 7, 2012
Custom Error Pages
I have created an asp.net application in which I use the report viewer
control to display my report. My problem is that if the report server
displays an error message then I want to trap that error and display my own
custom error page my company logo with the error message,
Is it possible to do this using Reporting Services ? I am not using the
render method but url access because I have the report viewer control on my
page
ThanksWhat you are trying to perform is not supported in RS 2000.
The RS Winforms/Webforms control available in Visual Studio 2005 will enable
handling certain error conditions in your application code.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"HelpSal" <HelpSal@.discussions.microsoft.com> wrote in message
news:477C457E-7407-480D-9F1C-7F9B9A18CBDB@.microsoft.com...
> Hi,
> I have created an asp.net application in which I use the report viewer
> control to display my report. My problem is that if the report server
> displays an error message then I want to trap that error and display my
> own
> custom error page my company logo with the error message,
> Is it possible to do this using Reporting Services ? I am not using the
> render method but url access because I have the report viewer control on
> my
> page
>
> Thanks
custom error page
Is there a a way to catch general errors on ssrs and display a custom error page to the user?
The goal is that if a user try to access a report when the ssrs is down, He won't see the RS general error but a custom notice from me.
Thanks.
If you are using report manager (which is an ASP.NET web application), I guess you can do that by configuring your custom error page in web.config file available in Program Files\Microsoft SQL Server\MSSQL.X\Reporting Services\ReportManager folder. Set mode="on" for customErrors tag and define the custom error page as you do for any other ASP.NET web application.
Shyam
|||More details on how to use custom error pages in a web application:
You can use defaultRedirect attribute of customErrors tag to tell the application to go to another custom web page by default if any error occurs. Also you can define error pages for specific types of errors like 401, 402 etc. and add them as error tags inside this customErrors tag. En example would look like this:
<customErrors mode="on" defaultRedirect="/error.html">
<error statusCode="403" redirect="/accessdenied.html" />
<error statusCode="404" redirect="/pagenotfound.html" />
</customErrors>
where error.html, accessdenied.html and pagenotfound.html are the files that you create and place in the appropriate folder on report manager virtual directory.
Shyam
|||Hi Sundar,Thats exctly what I did after I read your previus post
Hope it will work fine. I now have to do some tasting.
Thanks for the solution!
custom error page
Is there a a way to catch general errors on ssrs and display a custom
error page to the user?
The goal is that if a user try to access a report when the ssrs is
down, He won't see the RS general error but a custom notice from me.
Thanks.Absolutely possible as we have it implemented.
Absolutely no idea how it was achieved as I'm not a developer :(
Sorry
"nicknack" <roezohar@.gmail.com> wrote in message
news:1174999816.602638.279850@.y80g2000hsf.googlegroups.com...
> Hello,
> Is there a a way to catch general errors on ssrs and display a custom
> error page to the user?
> The goal is that if a user try to access a report when the ssrs is
> down, He won't see the RS general error but a custom notice from me.
> Thanks.
>
Friday, February 24, 2012
Custom Code accessing Dataset
Hello
my problem is this ...i pass a parameter from an asp page to open a report which works fine, however the display name for the text box in the header of the report should be the description of the parameter not the parameter id
i would like to create a function in the custom code that passes the parameter id and returns the parameter description as the possible description values are dynamic and there are over 400 hardcoding the code is not an option
thanks in advance for any advice
I'm not clear on what you are reffering to as "parameter description"? A report parameter will have three values accessible through either custom code or through a report expression: Value, Label, and IsMultiValue. If the "parameter description" is something defeined outside of the report you can access it in cusom code just as you could in any other .NET code.
Thanks, Jon
|||
You mean that you have a parameter which includes description as text and ID as value?
You should be able to query this in the way described here:
http://msdn2.microsoft.com/en-us/library/ms157274.aspx
The Parameters collection contains the report parameter objects within the report. Parameters can be passed to queries, used in filters, or used in other functions that alter the report appearance and content based on the parameter. When you define query parameters, they are automatically added to the report parameter collection. The following table describes the properties defined on a Parameter: Count, IsMultiValue, Value and Label.
Count
An integer that indicates the number of parameters in the collection.
IsMultiValue
A Boolean that identifies this parameter as having a set of values.
Value
The value for the parameter. For a multivalued parameter, Value returns an array of objects.
Label
A user-friendly label for the parameter. If no label is specified, the value of the Label property equals the Value property. If more than one Label is associated with the same Value, the first matching Label is used. For a multivalued parameter, Label returns an array of objects.
Parameters can be accessed through either the property syntax or the collection syntax. The following expression shows how to access every member of the Parameters collection and, when placed in a text box in a report item, displays the contents of the parameter ProductSubCategory.
So a proper expression for e.g. a parameter called Product would be:
Parameters!Product.Label
cheers,
Markus
Friday, February 17, 2012
Custom Assembly error
a textbox an a report. The parameters display through the previ
When I run my report through 'DebugLocal' mode.
it breaks here:
Public Class ParameterList
Public Shared Function GetParameterNames()
Dim rs As New ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim report As String = "/Commission Reports/Detailed Broker
Commission Bordereaux"
Dim forRendering As Boolean = False
Dim historyID As String = Nothing
Dim values As ParameterValue() = Nothing
Dim credentials As DataSourceCredentials() = Nothing
Dim strParam As String = ""
Dim Parameters() As ReportParameter
Parameters = rs.GetReportParameters(report, historyID, forRendering,
values, credentials)
If Not (Parameters Is Nothing) Then
Dim rp As ReportParameter
For Each rp In Parameters
strParam = rp.Prompt & strParam
Next rp
End If
Return strParam
End Function
End Class
break point : rs.Credentials = System.Net.CredentialCache.DefaultCredentials
The message reads :
"Request for the permission of type
'System.Security.Permissions.EnvironmentPermission,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed."
What can I do?
Any help would be appreciated.
ThanksOn Jun 29, 3:28 am, DylCole <DylC...@.discussions.microsoft.com> wrote:
> I have created a custom assembly to automatically display parameter names in
> a textbox an a report. The parameters display through the previ
> When I run my report through 'DebugLocal' mode.
> it breaks here:
> Public Class ParameterList
> Public Shared Function GetParameterNames()
> Dim rs As New ReportingService
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim report As String = "/Commission Reports/Detailed Broker
> Commission Bordereaux"
> Dim forRendering As Boolean = False
> Dim historyID As String = Nothing
> Dim values As ParameterValue() = Nothing
> Dim credentials As DataSourceCredentials() = Nothing
> Dim strParam As String = ""
> Dim Parameters() As ReportParameter
> Parameters = rs.GetReportParameters(report, historyID, forRendering,
> values, credentials)
> If Not (Parameters Is Nothing) Then
> Dim rp As ReportParameter
> For Each rp In Parameters
> strParam = rp.Prompt & strParam
> Next rp
> End If
> Return strParam
> End Function
> End Class
> break point : rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> The message reads :
> "Request for the permission of type
> 'System.Security.Permissions.EnvironmentPermission,
> mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> failed."
> What can I do?
> Any help would be appreciated.
> Thanks
This link might be helpful.
http://odetocode.com/Articles/216.aspx
Regards,
Enrique Martinez
Sr. Software Consultant|||"EMartinez" wrote:
> On Jun 29, 3:28 am, DylCole <DylC...@.discussions.microsoft.com> wrote:
> > I have created a custom assembly to automatically display parameter names in
> > a textbox an a report. The parameters display through the previ
> >
> > When I run my report through 'DebugLocal' mode.
> > it breaks here:
> >
> > Public Class ParameterList
> >
> > Public Shared Function GetParameterNames()
> > Dim rs As New ReportingService
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> > Dim report As String = "/Commission Reports/Detailed Broker
> > Commission Bordereaux"
> > Dim forRendering As Boolean = False
> > Dim historyID As String = Nothing
> > Dim values As ParameterValue() = Nothing
> > Dim credentials As DataSourceCredentials() = Nothing
> > Dim strParam As String = ""
> >
> > Dim Parameters() As ReportParameter
> > Parameters = rs.GetReportParameters(report, historyID, forRendering,
> > values, credentials)
> >
> > If Not (Parameters Is Nothing) Then
> > Dim rp As ReportParameter
> > For Each rp In Parameters
> > strParam = rp.Prompt & strParam
> > Next rp
> > End If
> > Return strParam
> > End Function
> >
> > End Class
> >
> > break point : rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> >
> > The message reads :
> >
> > "Request for the permission of type
> > 'System.Security.Permissions.EnvironmentPermission,
> > mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> > failed."
> >
> > What can I do?
> >
> > Any help would be appreciated.
> >
> > Thanks
>
> This link might be helpful.
> http://odetocode.com/Articles/216.aspx
> Regards,
> Enrique Martinez
> Sr. Software Consultant
> Thanks Enrique,
This helped (on my machine). However, when I try and put my assembly on
another machine, it doesnt work. Do you have another way to display the
parameter names on a report? if not I will figure it out eventually.
Thanks again
Custom Assembly Error
contents are in RTF format. My goal is to display this text in SSRS
reports. I have created a custom assembly to convert rtf formated text into
plain text.
Imports System.Windows.Forms
Public Class RichTextServices
Public Shared Function ConvertToPlainText(ByVal RTFText As String) As String
Dim m_rtb = New RichTextBox
m_rtb.Rtf = RTFText
Return m_rtb.Text
End Function
End Class
The assembly works great in preview mode. However, when I run the report
from my browser I get an error in the field containing the converted text.
I have copied my DLL to "C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\bin".
I have also added the attached code group to the "rssrvpolicy.config" and
"rsmgrpolicy.config" files. It still does not work.
What am I missing? Any suggestions would be greatly appreciated.
PS - If anyone knows a better way to handle RTF in SSRS that would also be
great to know. Especially if you can actually display the text with the
original formatting.
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCodeGroup"
Description="Code group for my data processing extension">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\myAssembly.dll"
/>
</CodeGroup>Hello Guess,
It seems the issue is caused by RichTextBox which is a com object. I wonder
if you also deploy the interop com assembly to the following folder:
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin
Also, I suggest that you refer to the following article to deploy your
custom assembly in reporting service.
Deploying a Custom Assembly
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/
rsp_prog_rdl_8mue.asp
Have a great day!
Best Regards,
Peter Yang
MCSE2000, MCSA, MCDBA
Microsoft Partner Online Support
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
| Reply-To: "Guess Nospam" <guess@.nospam.ha>
| From: "Guess Nospam" <guess@.nospam.ha>
| Subject: Custom Assembly Error
| Date: Mon, 25 Oct 2004 16:33:58 -0700
| Lines: 62
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <O2KcisuuEHA.3376@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: ftp.city.vancouver.bc.ca 199.175.219.1
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12