Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Friday, March 30, 2012

Icons for Custom Tasks won't show up.

All aspects of my custom task work well except for the icon!

I have included the .ico in the assembly as an "Embedded Resource" and the icon has both 16X16 and 32X32 images. I have edited the IconResource property of the DtsTask attribute as follows:

IconResource="MyNamespace.MyDLLName.MyIconName.ico",

Where the output assembly is called "MyNamespace.MyDLLName.dll".

Has anybody got this working before? The Icon just never shows (I get the default blue square task icon).

Thanks in advance.

IconResource=”SSIS2K5.Samples.Tasks.CryptoTask.TaskIcon.ico”,

The IconResource parameter points

to the icon to be used in the Toolbox. It is not required. If not provided, the designer uses

a default icon. However, if you do provide this, the name of the resource must be

“TaskIcon” and you must provide the fully qualified name.

Have you named the icon "TaskIcon.ico"?

Kirk Haselden
Author "SQL Server Integration Services"

|||

Thanks Kirk,

Exactly what I needed!

I didn't see anything in the documentation about the "TaskIcon.ico" name requirement, but I imagine it must be there somewhere... so thanks again

Actually, I just thought of something - I have two custom tasks (and both their UIs) in the same Assembly. I am guessing that this means that both of the tasks will need to have the same icon. Can you think of any reason, other than modular deployment / maintenance advantages, for keeping the tasks in separate Assemblies?

|||

The restriction is that the filename and the default namespace must match the IconResource string, it does not have to be the literal TaskIcon.ico

The most likely cause is that the two do not match up correctly. Try this article-

How to add an icon to your component
(http://www.sqlis.com/default.aspx?22)

|||For tasks, I believe it does need to be the name "TaskIcon.ico" for it to show correctly in the toolbox unless something's changed in the code.|||

Someone changed it. I updated the IncrementTask sample to include an icon.

1 - Open project and select Add Existing Item, select any icon you have.

2 - Set Icon file name, I chose MyIcon.ico

3 - Set properties of icon file, changing the Build Action to Embedded Resource

4 - Add the IconResource property to the existing DtsTask attribute in the code file-

DtsTask
(
DisplayName = "IncrementTaskCS",
Description = "IncrementTask Sample",
IconResource = "Microsoft.Samples.SqlServer.Dts.MyIcon.ico",

Sample project here - http://www.sqlis.com/download/IncrementTaskWithMyIcon.zip

Icons for Custom Tasks won't show up.

All aspects of my custom task work well except for the icon!

I have included the .ico in the assembly as an "Embedded Resource" and the icon has both 16X16 and 32X32 images. I have edited the IconResource property of the DtsTask attribute as follows:

IconResource="MyNamespace.MyDLLName.MyIconName.ico",

Where the output assembly is called "MyNamespace.MyDLLName.dll".

Has anybody got this working before? The Icon just never shows (I get the default blue square task icon).

Thanks in advance.

IconResource=”SSIS2K5.Samples.Tasks.CryptoTask.TaskIcon.ico”,

The IconResource parameter points

to the icon to be used in the Toolbox. It is not required. If not provided, the designer uses

a default icon. However, if you do provide this, the name of the resource must be

“TaskIcon” and you must provide the fully qualified name.

Have you named the icon "TaskIcon.ico"?

Kirk Haselden
Author "SQL Server Integration Services"

|||

Thanks Kirk,

Exactly what I needed!

I didn't see anything in the documentation about the "TaskIcon.ico" name requirement, but I imagine it must be there somewhere... so thanks again

Actually, I just thought of something - I have two custom tasks (and both their UIs) in the same Assembly. I am guessing that this means that both of the tasks will need to have the same icon. Can you think of any reason, other than modular deployment / maintenance advantages, for keeping the tasks in separate Assemblies?

|||

The restriction is that the filename and the default namespace must match the IconResource string, it does not have to be the literal TaskIcon.ico

The most likely cause is that the two do not match up correctly. Try this article-

How to add an icon to your component
(http://www.sqlis.com/default.aspx?22)

|||For tasks, I believe it does need to be the name "TaskIcon.ico" for it to show correctly in the toolbox unless something's changed in the code.|||

Someone changed it. I updated the IncrementTask sample to include an icon.

1 - Open project and select Add Existing Item, select any icon you have.

2 - Set Icon file name, I chose MyIcon.ico

3 - Set properties of icon file, changing the Build Action to Embedded Resource

4 - Add the IconResource property to the existing DtsTask attribute in the code file-

DtsTask
(
DisplayName = "IncrementTaskCS",
Description = "IncrementTask Sample",
IconResource = "Microsoft.Samples.SqlServer.Dts.MyIcon.ico",

Sample project here - http://www.sqlis.com/download/IncrementTaskWithMyIcon.zip

Icon not displayed correctly for custom component

So i finally figured out how to create custom transform and add an icon to it. However - when i added the component to toolbox it appears as a file icon (when i didnt have icon it appeared as a blue box) - in the data flow designer it appears as the correct image.

From BOL wrote:

"The Data Flow toolbox uses the 16x16, 16-color image type, while

the design surface of the data flow tab uses the 32x32, 16-color image

type. Both are default image types for icons created using Microsoft

Visual Studio 2005."


I assume this has something to do with it - my ico is default 32x32 - however, what would be the way to fix it?

hi,

i think this this is

the same as my problem before.

Your Integration service is running on limited permission

close visual studion

run services.msc

change the logon with a more privelege user

and the restartn the services

regards,

joey

|||

Make sure you have both sized icons in the icon file, one is 64x64, and the other is 16x16, sounds like you're missing the 16x16 one.

|||

I have created a test icon with a range of sizes and color depths, which will help identify the requirements. You could use to test the issue, as different sized icons can clearly be identified. For example 16x6 will show green and 32x32 will be mauve. This way you can prove what sizes are required.

Icon Color Size Tester http://www.sqldts.com/redir.aspx?1304

Personally I use 16 and 32 sized frames in my icons, normally at 256 and 32bit color depths.

|||

KirkHaselden wrote:

Make sure you have both sized icons in the icon file, one is 64x64, and the other is 16x16, sounds like you're missing the 16x16 one.

Yup - i was missing the 16x16x - (actually it was created as default my VS) - so I had to Right click the icon in the layout window and go to "Current Icon Image Types".

Thankssql

IAuthorizationExtension and RoleProvider

We have developed a custom asp.net 2.0 RoleProvider to Authorize access to
different areas of our web app so that administrators of our application
could control access rather than IT staff. The custom RoleProvider reads
user and role information from a SQLServer 2005 Database. We are not using a
custom MembershipProvider. We are now trying to integrate Reporting Services
2005 with the Web App. I want the Roles used to authorize access to reports
be the same roles that are used to authorize access to the pages in my web
app. I would like to have reporting services use my custom RoleProvider. It
is my understanding that I need to create a class that implements
IAuthorizationExtension to do this.
I have the example from the Teo Lachev book. Not exacly what i needed, but
of figre if I could get that one running, I could modify it to call my custom
RoleProvider. When I implemented the sample from the book, I get an
exceiption when it calls the BinaryFormatter Deserialize method to
deserialize SecDesc item that was passed to GetAccess. The error message i
get is 'The input stream is not in a valid binary format. The starting
contents (in bytes) are :06-05-00-9c...'
Can anyone how a custom Authorization Extension is supposed to use the
Security descriptors it gets from RS?
Has anyone managed to use asp.net 2.0 RoleProviders with RS2005? Is there
any good documentation on how to implement and deploy an
IAuthorizationExtension? Should I be taking another approach?
It Seems to me that there ought to be [supplied by microsoft] an
implementation of the IAuthorizationExtension that calls a RoleProvider to
determine what groups a user is in, but I have not been able to find it.
Without this ability, the RoleProvider functionality is useless, because IT
staff would need to maintain AD Groups to control access to reports while an
Application Administrator would need to maintain RoleProvider Groups that
control access to my pages. It sounds like if someone wants to use
Reporting services, the should not be using a custom RoleProvider.Just in case anyone else experiences this problem in the future , I thought
I'd document what I've figured out so far. This is probably all buried in
some documentation somewhere, but I've been unable to find it.
When writing my pervious post, I had installed RS2005 and then installed a
custom Authorization Extension and was getting an error saying 'The
input stream is not in a valid binary format...'. when trying to access the
root folder of the report server. I had copied much of the code from the
Lachev book.
The root folder of the report server was created at the time I installed
RS2005. My custom Authorization Extension was not in place at the time the
root folder was created , so the ACL for the folder was created serialized
using the CreateSecurityDescriptor method of the default Authorization
Extension that comes with RS2005 (i.e. the one that works with AD groups).
I could browse to the root folder of the report server at this time with no
problem.
After I installed my custom Authorization Extension and browsed to the root
folder, RS Passed the ACL created and serialized by the default
Authorization Extension to my custom Authorization Extension. This caused
the issue. The CreateSecurityDescriptor and the CheckAccess methods work
hand-in-hand. The ACL create by CreateSecurityDescriptor of the default
Authorization Extension could not be deserialized by the GetAccess method of
my Custom Authorization Extension.
Afterwards, I created a new folder. Because this new folder was created
with my extension in place, the ACL was serialized by my own
CreateSecurityDescriptor method, and thus could be deserialized by my own
GetAccess method with no problem.
I just can't access the root folder after having installedmy extension,
because the security extension was not created by my code!.
"gover" <gover@.discussions.microsoft.com> wrote in message
news:03E811C4-6811-45EB-A071-0CAF14771C28@.microsoft.com...
> We have developed a custom asp.net 2.0 RoleProvider to Authorize access
> to
> different areas of our web app so that administrators of our application
> could control access rather than IT staff. The custom RoleProvider reads
> user and role information from a SQLServer 2005 Database. We are not using
> a
> custom MembershipProvider. We are now trying to integrate Reporting
> Services
> 2005 with the Web App. I want the Roles used to authorize access to
> reports
> be the same roles that are used to authorize access to the pages in my web
> app. I would like to have reporting services use my custom RoleProvider.
> It
> is my understanding that I need to create a class that implements
> IAuthorizationExtension to do this.
> I have the example from the Teo Lachev book. Not exacly what i needed, but
> of figre if I could get that one running, I could modify it to call my
> custom
> RoleProvider. When I implemented the sample from the book, I get an
> exceiption when it calls the BinaryFormatter Deserialize method to
> deserialize SecDesc item that was passed to GetAccess. The error message
> i
> get is 'The input stream is not in a valid binary format. The starting
> contents (in bytes) are :06-05-00-9c...'
> Can anyone how a custom Authorization Extension is supposed to use the
> Security descriptors it gets from RS?
> Has anyone managed to use asp.net 2.0 RoleProviders with RS2005? Is
> there
> any good documentation on how to implement and deploy an
> IAuthorizationExtension? Should I be taking another approach?
>
> It Seems to me that there ought to be [supplied by microsoft] an
> implementation of the IAuthorizationExtension that calls a RoleProvider
> to
> determine what groups a user is in, but I have not been able to find it.
> Without this ability, the RoleProvider functionality is useless, because
> IT
> staff would need to maintain AD Groups to control access to reports while
> an
> Application Administrator would need to maintain RoleProvider Groups that
> control access to my pages. It sounds like if someone wants to use
> Reporting services, the should not be using a custom RoleProvider.
>
>|||Did you ever figure out how to cleare the old security descriptor ?
"gover" wrote:
> Just in case anyone else experiences this problem in the future , I thought
> I'd document what I've figured out so far. This is probably all buried in
> some documentation somewhere, but I've been unable to find it.
> When writing my pervious post, I had installed RS2005 and then installed a
> custom Authorization Extension and was getting an error saying 'The
> input stream is not in a valid binary format...'. when trying to access the
> root folder of the report server. I had copied much of the code from the
> Lachev book.
> The root folder of the report server was created at the time I installed
> RS2005. My custom Authorization Extension was not in place at the time the
> root folder was created , so the ACL for the folder was created serialized
> using the CreateSecurityDescriptor method of the default Authorization
> Extension that comes with RS2005 (i.e. the one that works with AD groups).
> I could browse to the root folder of the report server at this time with no
> problem.
> After I installed my custom Authorization Extension and browsed to the root
> folder, RS Passed the ACL created and serialized by the default
> Authorization Extension to my custom Authorization Extension. This caused
> the issue. The CreateSecurityDescriptor and the CheckAccess methods work
> hand-in-hand. The ACL create by CreateSecurityDescriptor of the default
> Authorization Extension could not be deserialized by the GetAccess method of
> my Custom Authorization Extension.
> Afterwards, I created a new folder. Because this new folder was created
> with my extension in place, the ACL was serialized by my own
> CreateSecurityDescriptor method, and thus could be deserialized by my own
> GetAccess method with no problem.
> I just can't access the root folder after having installedmy extension,
> because the security extension was not created by my code!.
>
> "gover" <gover@.discussions.microsoft.com> wrote in message
> news:03E811C4-6811-45EB-A071-0CAF14771C28@.microsoft.com...
> > We have developed a custom asp.net 2.0 RoleProvider to Authorize access
> > to
> > different areas of our web app so that administrators of our application
> > could control access rather than IT staff. The custom RoleProvider reads
> > user and role information from a SQLServer 2005 Database. We are not using
> > a
> > custom MembershipProvider. We are now trying to integrate Reporting
> > Services
> > 2005 with the Web App. I want the Roles used to authorize access to
> > reports
> > be the same roles that are used to authorize access to the pages in my web
> > app. I would like to have reporting services use my custom RoleProvider.
> > It
> > is my understanding that I need to create a class that implements
> > IAuthorizationExtension to do this.
> >
> > I have the example from the Teo Lachev book. Not exacly what i needed, but
> > of figre if I could get that one running, I could modify it to call my
> > custom
> > RoleProvider. When I implemented the sample from the book, I get an
> > exceiption when it calls the BinaryFormatter Deserialize method to
> > deserialize SecDesc item that was passed to GetAccess. The error message
> > i
> > get is 'The input stream is not in a valid binary format. The starting
> > contents (in bytes) are :06-05-00-9c...'
> >
> > Can anyone how a custom Authorization Extension is supposed to use the
> > Security descriptors it gets from RS?
> >
> > Has anyone managed to use asp.net 2.0 RoleProviders with RS2005? Is
> > there
> > any good documentation on how to implement and deploy an
> > IAuthorizationExtension? Should I be taking another approach?
> >
> >
> > It Seems to me that there ought to be [supplied by microsoft] an
> > implementation of the IAuthorizationExtension that calls a RoleProvider
> > to
> > determine what groups a user is in, but I have not been able to find it.
> > Without this ability, the RoleProvider functionality is useless, because
> > IT
> > staff would need to maintain AD Groups to control access to reports while
> > an
> > Application Administrator would need to maintain RoleProvider Groups that
> > control access to my pages. It sounds like if someone wants to use
> > Reporting services, the should not be using a custom RoleProvider.
> >
> >
> >
> >
>
>

Monday, March 19, 2012

I want my custom SQL errors to display on the RS Page

Dear Anyone,

We have custom raise error messages embedded in our stored procedures. I've noticed that using Business Intelligence Dev, when these errors are invoked, they actually display on the RS report. But unfortunately, when I tried it on a deployed report, I always get the error below.

Is there a way to display custom SQL errors from my stored proc to the RS page? Where do I enable the remote errors?

Thanks,

Joseph

  • An error has occurred during report processing.
  • Cannot create a connection to data source 'AdventureWorks'.
  • For more information about this error navigate to the report server on the local server machine, or enable remote errors.
  • Regarding remote errors:

    You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table. Alternatively, you can use the SetSystemProperties SOAP call:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_63le.asp

    Here is an example for a .rss script that will turn it on:

    Public Sub Main()
    Dim P As New [Property]()
    P.Name = "EnableRemoteErrors"
    P.Value = True
    Dim Properties(0) As [Property]
    Properties(0) = P
    Try
    rs.SetSystemProperties(Properties)
    Console.WriteLine("Remote errors enabled.")
    Catch SE As SoapException
    Console.WriteLine(SE.Detail.OuterXml)
    End Try
    End Sub

    Then run the .rss script by using the rs.exe command line utility:

    rs -i EnableRemoteErrors.rss -s http://Server/ReportServer

    Once remote errors are enabled, you could throw a specific exeception with a informative error string in the stored procedure. That message should then be shown as inner message.

    -- Robert

  •