Friday, March 23, 2012
External Class Exception
Exception I would like to catch the exception in my call to the RS Web
Service method RenderReport.
Is this possible. Or is it always caught by the report?Report server will always catch and wrap your exception.
In some cases report server will stop report processing (for example if
exception occured in grouping or filter expression); in other cases (text
box value) it will result in #Error and report execution will be continued.
If report processing was stopped Render will return error information.
If report was processed with #Errors then Render will return collection of
warnings
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dlloyd" <Dlloyd@.discussions.microsoft.com> wrote in message
news:8F3A380B-1E43-43D7-8C72-B0E68FCCFB78@.microsoft.com...
> I am calling a custom assembly from within my RDL. If that class raises an
> Exception I would like to catch the exception in my call to the RS Web
> Service method RenderReport.
> Is this possible. Or is it always caught by the report?|||Thank you for the response Alexandre...
The problem is I don't want the exception to end up in an #error in the
textbox. I want the exception rasied up to the software that made the call to
render that report.
With an exception that occurs in a textbox is there a way to throw the
exception back up again?
Dave
"Alexandre Mineev" wrote:
> Report server will always catch and wrap your exception.
> In some cases report server will stop report processing (for example if
> exception occured in grouping or filter expression); in other cases (text
> box value) it will result in #Error and report execution will be continued.
> If report processing was stopped Render will return error information.
> If report was processed with #Errors then Render will return collection of
> warnings
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Dlloyd" <Dlloyd@.discussions.microsoft.com> wrote in message
> news:8F3A380B-1E43-43D7-8C72-B0E68FCCFB78@.microsoft.com...
> > I am calling a custom assembly from within my RDL. If that class raises an
> > Exception I would like to catch the exception in my call to the RS Web
> > Service method RenderReport.
> >
> > Is this possible. Or is it always caught by the report?
>
>|||There is no clean way to prop exceptions, but you can analyze report
execution warnings and if you see traces of your exception then you can
re-throw it.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dlloyd" <Dlloyd@.discussions.microsoft.com> wrote in message
news:0CD7FA30-69AB-4CA1-A838-985DA6220EFE@.microsoft.com...
> Thank you for the response Alexandre...
> The problem is I don't want the exception to end up in an #error in the
> textbox. I want the exception rasied up to the software that made the call
to
> render that report.
> With an exception that occurs in a textbox is there a way to throw the
> exception back up again?
> Dave
> "Alexandre Mineev" wrote:
> > Report server will always catch and wrap your exception.
> > In some cases report server will stop report processing (for example if
> > exception occured in grouping or filter expression); in other cases
(text
> > box value) it will result in #Error and report execution will be
continued.
> >
> > If report processing was stopped Render will return error information.
> > If report was processed with #Errors then Render will return collection
of
> > warnings
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Dlloyd" <Dlloyd@.discussions.microsoft.com> wrote in message
> > news:8F3A380B-1E43-43D7-8C72-B0E68FCCFB78@.microsoft.com...
> > > I am calling a custom assembly from within my RDL. If that class
raises an
> > > Exception I would like to catch the exception in my call to the RS Web
> > > Service method RenderReport.
> > >
> > > Is this possible. Or is it always caught by the report?
> >
> >
> >sql
Extending RS
extend RS, for example, create my custom controls for use in reports.
--
Eduardo FonsecaThis should help:
http://msdn2.microsoft.com/en-us/library/ms345231(SQL.90).aspx
--
Francisco Padron
www.chartfx.com
Extending native components
Thanks.I don't beleive this is possible. Whilst I am looking at the managed interfaces, not native code, they are all documented as sealed or not inheritable.
Wednesday, March 21, 2012
Extending BI studio
I need to add a custom menu option say under the Tools menu in the BI studio for SSIS projects. Is it possible to extend BU studio using Visual studio addins, or Visual Studio SDK (VSIP).
The Visual studio addin works fine; however I want my custom menu option to show up only when I have a SSIS project open so that I can perfom my custom step whenever the user selects the menu option
Thanks,
-SuriYou can extend BIDS with standard Visual Studio 2005 add-ins, because it is Visual Studio 2005. If you look at the Help menu, About, you will see it is the full VS IDE. The "Installed Products" list just shows different items depending on if you have installed through SQL Server tools only, VS only, or both SQL & VS together.|||Hi Darren,
The real problem I am facing is that the Visual Studio 2005 addin wizard allows you to specify the contextGUIDS which are defined in the vsContextGuids class. This class has guids defined only for Visual Basic, C# and J# type projects. I am not sure how I can specify a SSIS project using the vsContextGuids class.
-Suri|||Sorry, haven't got that far myself yet, but I look forward to someone else answering as I'm sure I'll need to know.
Just out of interest what does your SSIS specific add-in do?|||In the custom action, I need to load the package, parse it for some specific information, and write that information to a xml file (basically filtered package information) which can be then read and processed by another app we have.
Thanks|||
I'm not positive if this is what you're after, but I have an SSIS deployment add-in that we use to allow developers to deploy packages to a server. We use the following code to determine what packages are in the current solution, it may help? This sample builds nodes on a treeview for each project/package found in the current solution.
Private Const ssisProjectKind As String = "{d183a3d8-5fd8-494b-b014-37f57b35e655}"
If _applicationObject.Solution.Count = 0 Then
Return "Not valid without an open solution"
End If
Dim prjCount As Integer = 0
Dim pkgCount As Integer = 0
For Each proj As Project In _applicationObject.Solution.Projects
If Not proj.Kind = ssisProjectKind Then
Continue For
End If
prjCount += 1
Dim prjNode As TreeNode = Me.tvPackages.Nodes.Add(proj.Name)
For Each pi As ProjectItem In proj.ProjectItems
If pi.Name.EndsWith(".dtsx") Then
Dim pkgNode As TreeNode = prjNode.Nodes.Add(pi.Name)
pkgNode.Tag = pi.FileNames(0)
pkgCount += 1
End If
Next
Next
If prjCount = 0 Then
Return "No SSIS Projects were found in this solution"
End If
If pkgCount = 0 Then
Return "No SSIS Packages were found in this solution"
End If
Thanks!
Harry
Extending BI studio
I need to add a custom menu option say under the Tools menu in the BI studio for SSIS projects. Is it possible to extend BU studio using Visual studio addins, or Visual Studio SDK (VSIP).
The Visual studio addin works fine; however I want my custom menu option to show up only when I have a SSIS project open so that I can perfom my custom step whenever the user selects the menu option
Thanks,
-SuriYou can extend BIDS with standard Visual Studio 2005 add-ins, because it is Visual Studio 2005. If you look at the Help menu, About, you will see it is the full VS IDE. The "Installed Products" list just shows different items depending on if you have installed through SQL Server tools only, VS only, or both SQL & VS together.|||Hi Darren,
The real problem I am facing is that the Visual Studio 2005 addin wizard allows you to specify the contextGUIDS which are defined in the vsContextGuids class. This class has guids defined only for Visual Basic, C# and J# type projects. I am not sure how I can specify a SSIS project using the vsContextGuids class.
-Suri
|||Sorry, haven't got that far myself yet, but I look forward to someone else answering as I'm sure I'll need to know.
Just out of interest what does your SSIS specific add-in do?|||In the custom action, I need to load the package, parse it for some specific information, and write that information to a xml file (basically filtered package information) which can be then read and processed by another app we have.
Thanks
|||
I'm not positive if this is what you're after, but I have an SSIS deployment add-in that we use to allow developers to deploy packages to a server. We use the following code to determine what packages are in the current solution, it may help? This sample builds nodes on a treeview for each project/package found in the current solution.
Private Const ssisProjectKind As String = "{d183a3d8-5fd8-494b-b014-37f57b35e655}"
If _applicationObject.Solution.Count = 0 Then
Return "Not valid without an open solution"
End If
Dim prjCount As Integer = 0
Dim pkgCount As Integer = 0
For Each proj As Project In _applicationObject.Solution.Projects
If Not proj.Kind = ssisProjectKind Then
Continue For
End If
prjCount += 1
Dim prjNode As TreeNode = Me.tvPackages.Nodes.Add(proj.Name)
For Each pi As ProjectItem In proj.ProjectItems
If pi.Name.EndsWith(".dtsx") Then
Dim pkgNode As TreeNode = prjNode.Nodes.Add(pi.Name)
pkgNode.Tag = pi.FileNames(0)
pkgCount += 1
End If
Next
Next
If prjCount = 0 Then
Return "No SSIS Projects were found in this solution"
End If
If pkgCount = 0 Then
Return "No SSIS Packages were found in this solution"
End If
Thanks!
Harry
Monday, March 12, 2012
extended connection managers for data flow destinations?
It looks like you can only extended connection managers for data flow sources.
Is there anyway to develop a custom connection manager for the SQL destination in the data flow destinations?
I can’t use hardcoded connection strings.I can’t use configurations because they are not encrypted.I already have managed code that will give the corrected connection string.I already have a custom connection manager that I use from the data flow sources.I just need one for data flow destinations but I can’t see a way to extend into the OLE DB?
The OLEDB Destination is just like the OLEDB source and can use the same connection managers. However, you are using the SQL destination and that is a special destination and needs the specific connection manager that it supports. If you want to use your custom connection manager then switch to using the OLEDB destination instead and it should just work.
HTH,
Matt
|||oledb destinations only support the special destinations as well. there is no way I can see to use a custom connection manger in any of the destinations.
except for the script component and in that you can do whatever you want.
|||Actually they support anything they see as an OLEDB connection. I can create different types of OLEDB connections and the OLEDB destination will support them (e.g. excel, sql (sqlncli), sql (sqloledb), etc). It does indeed have to be an OLEDB type connection though.
Matt
|||ok so I think you might have answered my question.
If I develop a custom connection mgr derived from connectionmanagerbase I can't use that custom connection mgr with any of the stock data flow destinations.
because only OLEDB connections can be used and there is no way to create a custom OLEDB connection.
so there is no way to do what I wanted to do.
except the script componet can do what I want but I have to override the correct portions....
|||Well there are ways to create custom OLEDB connections but you would have to write your own OLEDB provider, which not many would want to do so I guess in your case a script would probably be the best alternative.
Matt
Friday, March 9, 2012
Expression issue with Custom Data Flow Component and Custom property
Hi,
I'm trying to enable Expression for a custom property in my custom data flow component.
Here is the code I wrote to declare the custom property:
public override void ProvideComponentProperties()
{
ComponentMetaData.RuntimeConnectionCollection.RemoveAll();
RemoveAllInputsOutputsAndCustomProperties();
IDTSCustomProperty90 prop = ComponentMetaData.CustomPropertyCollection.New();
prop.Name = "MyProperty";
prop.Description = "My property description";
prop.Value = string.Empty;
prop.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;
...
}
In design mode, I can assign an expression to my custom property, but it get evaluated in design mode and not in runtime
Here is my expression (a file name based on a date contained in a user variable):
"DB" + (DT_WSTR, 4)YEAR( @.[User::varCurrentDate] ) + RIGHT( "0" + (DT_WSTR, 2)MONTH( @.[User::varCurrentDate] ), 2 ) + "\\" + (DT_WSTR, 4)YEAR( @.[User::varCurrentDate] ) + RIGHT( "0" + (DT_WSTR, 2)MONTH( @.[User::varCurrentDate] ), 2 ) + ".VER"
@.[User::varCurrentDate] is a DateTime variable and is assign to 0 at design time
So the expression is evaluated as: "DB189912\189912.VER".
My package contains 2 data flow.
At runtime,
The first one is responsible to set a valid date in @.[User::varCurrentDate] variable. (the date is 2007-01-15)
The second one contains my custom data flow component with my custom property that was set to an expression at design time
When my component get executed, my custom property value is still "DB189912\189912.VER" and I expected "DB200701\200701.VER"
Any idea ?
Are you certain that the data flows are being executed in the order you expect?
What is the scope of your variable?
I tried a test case with 2 data flows connected to each other in the control flow. In the first, I had a row count transform populate a variable (of package scope). In the second, I set a dataflow property expression to use the variable, and confirmed that it did use the value set by the Row Count, so it seems your scenario should work...
Mark
|||Sorry,
You're right.
I was confused because even in debug mode (when execution is interupted with a DataViewer), the property value was "DB189912\189912.VER"
So I have added a ComponentMetaData.FireInformation with the property value, and the value was "DB200701\200701.VER"
Next time, I will start with the ComponentMetaData.FireInformation... ;-)
Sorry again
Thanks a lot
|||No problem, glad to hear you have it working!Wednesday, March 7, 2012
Expression editor on Custom Properties on Custom Data Flow Component
Hi,
I've created a Custom Data Flow Component and added some Custom Properties.
I want the user to set the contents using an expression. I did some research and come up with the folowing:
Code Snippet
IDTSCustomProperty90 SourceTableProperty = ComponentMetaData.CustomPropertyCollection.New();
SourceTableProperty.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;
SourceTableProperty.Name = "SourceTable";
But it doesn't work, if I enter @.[System:ackageName] in the field. It comes out "@.[System:
ackageName]" instead of the actual package name.
I'm also unable to find how I can tell the designer to show the Expression editor. I would like to see the elipses (...) next to my field.
Any help would be greatly appreciated!
Thank you
The expression for a component's property is held at the task level. If a property is marked as CPET_NOTIFY, it notifies the task (the data flow which parent's the component), which tells it to generate a new property on which can be set an expression. So to see the expression in the designer look at the properties grid for the data flow task, not the component.
|||Hello Darren,Thank you for the quick response. But the expression editor doesn't show in the propertiesgrid either.
Could I be missing anything?|||
Are you looking at the properties grid of the DATA FLOW component or at your custom data flow component? Also, did you set the flag darren mentioned above so that the data flow component will know to include this property in it's properties expression list?
|||Ah, yes, I see it now. But it is not what I'm looking for.Is there now way to set the expresison builder on the component itself? When the expression builder is used on the parent task, I cannot access the incomming rows.
Thank you kindly|||
Why do you think your component will have features over and above that available to Microsoft themselves?
Property expressions are ONLY available at the task level, because they are provided in the task framework.
You have created a property expression, so your mention of incoming rows does not make sense. Property expressions are just that, for the property, but not the value itself, the result will override the value. Just look how they work in the rest of SSIS.
A property that holds a text string that could be parsed as an expression is something different and maybe what you want? Perhaps the Derived Column transform may be easier?
expression
help.=iif(code.FunctionName(...)=...,TrueResult,FalseResult)
Charles Kangai, MCT, MCDBA
"Sandy" wrote:
> How to call a custom function from an expression under iif.can anybody please
> help.|||It is not working.It is given an error expression expected.Please help
"Charles Kangai" wrote:
> =iif(code.FunctionName(...)=...,TrueResult,FalseResult)
> Charles Kangai, MCT, MCDBA
> "Sandy" wrote:
> > How to call a custom function from an expression under iif.can anybody please
> > help.