Showing posts with label built. Show all posts
Showing posts with label built. Show all posts

Thursday, March 22, 2012

Custom Task Properties

So I've built my own custom task and it has a selection of properties.
I drop it onto designer and can see the properties (VS Property Grid not custom UI ).

The properties window retracts and I decide to reopen the property window. My Properties have now disappeared (mine - not inherted). Never do they return for that instance of the task. add another task and we can see the second instance's properties but suffer the same fate as with #1 when we want to see them on > 1 occasion.

I can see the properties in Expressions which leads me to think the task is correct and it is a VS grid thing.

Jamie, Myself and Darren have experienced differing but similar issues with properties of various objects (variables/Tasks) and being able to see the values etc.

Is this an issue you are aware of internally?

Thanks

Allan

We've seen similar issues in the past. Since it's not happening with the stock tasks (or is it?) I would question if it's the grid...
Hard to say without having the task or some other repro of the problem.
Do you see this with other tasks besides your custom tasks?
K

|||Hey Kirk.

No this does not happen with the STOCK stuff. Are any of your Tasks managed code? I can post you the task if you want as it is driving me nuts.

Thanks

Allan|||Yes, many of the stock tasks are managed. So, sure, why don't you open a bug and put the code into the bug. We'll take a look.
Thanks,|||Here you go Kirk

842978484 on BetaPlace
Allan|||Did anyone discover any resolution to this? I am experiencing the exact same thing....sql

Sunday, March 11, 2012

Custom Query Designer

Hi,
I'm having some trouble with implementing my own Query Designer.
I have built a control that implements the IQueryDesigner Interface
and register it in the RSReportDesigner.config file.
However Visual Studio never calls it. When I click on the Generic Query
Designer Button to switch between the Generic Designer an my Custom Designer,
The Designer window simply Reads
"The Query could not be loaded."
"Verify your connection string and query string."
I have tried attaching the debugger and I can break on the other Data
Extension classes I have implemented. So it appears that Studio is erring
before it gets to loading my Control. Everything else works fine if I run it
through the generic query designer.
I have also tried uninstalling and reinstalling Reporting Services thinking
the Designer may be broken, but this hasn't helped.
Unless someone has a better Idea, I'm going to resort to reinstalling visual
studio.
Any Ideas?
Thanks
Adrian B.Testing the Query Designer Code on another machine has not helped. So
re-installing Visual Studio will pointless.
I am currently at a loss for where to go with this.
Does anyone have any ideas at all?
Adrian B.

Thursday, March 8, 2012

Custom Filter for .msg files

I have an app that is automatically storing e-mails from Outlook in an image
field in SQL 2000. I have found where certain types of files have built in
filter support for searching, but .msg is not included as one of these.
Is anyone aware of anyway to do searches on the .msg file type within SQL.
BOL references the ability to create custom filters, but I am unable to find
the reference.
TIA,
J. Clay
did you try the following?
open up hkey_classes_root, locate msg, add a sub key to .msg called
PersistentHandler, add a string value called (Default)
with the value {5645C8C2-E277-11CF-8FDA-00AA0X0A14F93}
this uses mimefilt.dll which should be on most modern os's - win2k and
above.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"J. Clay" <JClay@.NoSpam.nospam> wrote in message
news:ew8U6WNUFHA.628@.TK2MSFTNGP09.phx.gbl...
> I have an app that is automatically storing e-mails from Outlook in an
image
> field in SQL 2000. I have found where certain types of files have built
in
> filter support for searching, but .msg is not included as one of these.
> Is anyone aware of anyway to do searches on the .msg file type within SQL.
> BOL references the ability to create custom filters, but I am unable to
find
> the reference.
> TIA,
> J. Clay
>
>
|||No. (Wouldn't have known how!) I will give it a try though and report
back.
Thank you very much!
Jim
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:O$osm5NUFHA.3280@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> did you try the following?
> open up hkey_classes_root, locate msg, add a sub key to .msg called
> PersistentHandler, add a string value called (Default)
> with the value {5645C8C2-E277-11CF-8FDA-00AA0X0A14F93}
> this uses mimefilt.dll which should be on most modern os's - win2k and
> above.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "J. Clay" <JClay@.NoSpam.nospam> wrote in message
> news:ew8U6WNUFHA.628@.TK2MSFTNGP09.phx.gbl...
> image
> in
SQL.
> find
>
>
|||Actually MIME IFilter is capable of extracting text, but it does not deal
with attachments. In order to have full access to the information inside
..msg file I suggest using MSG IFilter, developed by Alna:
http://www.alna.com/vid.php4?mid=93&cat_id=4&prod_id=2.
Best regards,
Michailas
"J. Clay" <JClay@.NoSpam.nospam> wrote in message
news:OTUOX9NUFHA.3596@.TK2MSFTNGP14.phx.gbl...
> No. (Wouldn't have known how!) I will give it a try though and report
> back.
> Thank you very much!
> Jim
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:O$osm5NUFHA.3280@.TK2MSFTNGP09.phx.gbl...
> SQL.
>
>
|||Thanks Michailas - I think that is what I am looking for. I will make some
inquiries.
Regards,
Jim
"MT" <mtraubas@.alna.lt> wrote in message
news:%23E4qd1hUFHA.3716@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Actually MIME IFilter is capable of extracting text, but it does not deal
> with attachments. In order to have full access to the information inside
> .msg file I suggest using MSG IFilter, developed by Alna:
> http://www.alna.com/vid.php4?mid=93&cat_id=4&prod_id=2.
> Best regards,
> Michailas
>
> "J. Clay" <JClay@.NoSpam.nospam> wrote in message
> news:OTUOX9NUFHA.3596@.TK2MSFTNGP14.phx.gbl...
an[vbcol=seagreen]
these.[vbcol=seagreen]
to
>
>

Wednesday, March 7, 2012

Custom Destination Adapter

Hi All,

I have built a custom flat file destination adapter but it appears that the code is not working. When I debug the process I notice that the ProcessInput section is called multiple times. The first time it looks like everything is working, then it call it again and there is no inpout from the DTSInput90.

Why would it do this?

Thanks

Mike

Data moves down the pipeline in buffers. It is not one stream, or individual rows. Obviously buffers have a limited capacity, so you will get multiple buffers depending on the number of rows. The rows per buffer depends on the size of the row essentially.

So ProcessInput gets called once per buffer. This is why you cache buffer information in PreExecute, so that you get re-use. Querying the information can be quite expensive which is why it is cached to start with.

I'm not sure what you mean by "there is no inpout from the DTSInput90", can you explain?

|||Basically what I am saying is that the second time through there is no data. So if you want to capture all the data from the buffer and write it all out in a file how would you do that?|||

That doesn't sound particularly useful, but maybe how it works. Not sure I've ever stepped through to that degree. It should not cause you any problems however, but are you getting all the data you expect? Is there actually a problem?

|||

I figured it out. The detination component takes the input stream and creates a ZIP file with some delimiter that I have defined. I needed to create a global variable for the string and keep appending until then buffers were complete and then run through the ZIP code.

Thanks

Custom Destination Adapter

Hi All,

I have built a custom flat file destination adapter but it appears that the code is not working. When I debug the process I notice that the ProcessInput section is called multiple times. The first time it looks like everything is working, then it call it again and there is no inpout from the DTSInput90.

Why would it do this?

Thanks

Mike

Data moves down the pipeline in buffers. It is not one stream, or individual rows. Obviously buffers have a limited capacity, so you will get multiple buffers depending on the number of rows. The rows per buffer depends on the size of the row essentially.

So ProcessInput gets called once per buffer. This is why you cache buffer information in PreExecute, so that you get re-use. Querying the information can be quite expensive which is why it is cached to start with.

I'm not sure what you mean by "there is no inpout from the DTSInput90", can you explain?

|||Basically what I am saying is that the second time through there is no data. So if you want to capture all the data from the buffer and write it all out in a file how would you do that?|||

That doesn't sound particularly useful, but maybe how it works. Not sure I've ever stepped through to that degree. It should not cause you any problems however, but are you getting all the data you expect? Is there actually a problem?

|||

I figured it out. The detination component takes the input stream and creates a ZIP file with some delimiter that I have defined. I needed to create a global variable for the string and keep appending until then buffers were complete and then run through the ZIP code.

Thanks

Custom Dataflow Transform in Programmatically Built Package

I'm building packages programmatically and all is well. I have a new custom transform that I developed. It also works fine. Now I'm trying to add my new component to my packages when I programmatically build them, and I'm unable to do that.

Has anyone added their own custom components to a programmatically built package successfully?

I get a COM error on the line that calls ProvideComponentProperties. I've attempted various modifications including not overriding ProvideComponentProperties or just having it do nothing. I always get the same result. What I don't understand is that the custom transform works and handles ProvideComponentProperties fine when it is added to a package in BIDS.

Thanks.

'Add new dataflow task

combitronics = dataFlow.ComponentMetaDataCollection.New()

'Set assembly to my component

combitronics.ComponentClassID = "Ewrap.SSIS.Combitronics"

'Get instance of component

Dim instance As CManagedComponentWrapper = combitronics.Instantiate()

'Initialize component ***Error Occurs Here***

instance.ProvideComponentProperties()

...

Have you tried debugging your custom component. The only other thing I could suggest is where the component is deployed to.|||

Thanks for the response.

It looks like I'm using the wrong name for my assembly when calling it. I found I could specify the GUID instead of the Namespace.Name format and that solved the problem. I got the correct GUID by looking at the .dtsx file after renaming it to .xml so it's easily viewed in IE.

Saturday, February 25, 2012

Custom Data Extension problems

Hi all,
I'm trying to develop a custom data extension for a proprietary database we
use, and I'm running into problems. I've built a test harness for it and it
works fine; however when I try to use it with RS I get the following error
just after having entered my query and pressed Next in the New Report wizard:
"An error occurred while the query design method was being saved. Object
reference not set to an instance of an object"
When I step through my code, I can see that everything goes well until the
designer tries to call the Parameters property on the Command object. Because
my database doesn't support parameters I'm returning null here, something
I've seen in several code examples. As soon as I've exited the property I get
the error, with the debugger saying it originates from
Microsoft.ReportDesigner.Design.Query.HasParameters.
Other background information (in no particular order):
- Before I get to the Parameters property, I see that the GetName and
GetFieldType properties on my DataReader are called the same number of times
as there are columns in my resultset, and then the Dispose method is called
on the DataReader.
- My queries are in XML, and here's the sample I'm using for testing:
<DVAutoXMLFetch Database="C:\Program Files\IMS Health\DATA\DBPINT01.PRM">
<TimePeriods Count="4">
<TimePeriod>QTR/3/02</TimePeriod>
</TimePeriods>
<Variables Count="3">
<Variable>UN</Variable>
</Variables>
<Dimensions Count="16">
<Dimension Name="CTY" IsGroup="False" BaseDim="">
<Member>AUSTRIA</Member>
</Dimension>
</Dimensions>
<FetchDefinition>
<NumberPrecision ValColNumPrec="1000" ValColRndPrec="1" CalcColRndPrec="3"
/>
<AcrossMeasures Count="2">
<AcrossMeasure Index="1" DimName="TimePeriods" />
<AcrossMeasure Index="2" DimName="Variables" />
<Columns Count="1" Rank="0" CalcRank="0" />
</AcrossMeasures>
<DownMeasures Count="1">
<DownMeasure Index="1" DimName="CTY" />
</DownMeasures>
</FetchDefinition>
</DVAutoXMLFetch>
- I'm running RS SP1 on Windows 2000.
- I can post the source code if anyone wants...
Thanks in advance for any hints!
ChrisChris,
Don't return null. Instead, instantiate your ParameterCollection and return
it back although it will be emply.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> Hi all,
> I'm trying to develop a custom data extension for a proprietary database
we
> use, and I'm running into problems. I've built a test harness for it and
it
> works fine; however when I try to use it with RS I get the following error
> just after having entered my query and pressed Next in the New Report
wizard:
> "An error occurred while the query design method was being saved. Object
> reference not set to an instance of an object"
> When I step through my code, I can see that everything goes well until the
> designer tries to call the Parameters property on the Command object.
Because
> my database doesn't support parameters I'm returning null here, something
> I've seen in several code examples. As soon as I've exited the property I
get
> the error, with the debugger saying it originates from
> Microsoft.ReportDesigner.Design.Query.HasParameters.
> Other background information (in no particular order):
> - Before I get to the Parameters property, I see that the GetName and
> GetFieldType properties on my DataReader are called the same number of
times
> as there are columns in my resultset, and then the Dispose method is
called
> on the DataReader.
> - My queries are in XML, and here's the sample I'm using for testing:
> <DVAutoXMLFetch Database="C:\Program Files\IMS Health\DATA\DBPINT01.PRM">
> <TimePeriods Count="4">
> <TimePeriod>QTR/3/02</TimePeriod>
> </TimePeriods>
> <Variables Count="3">
> <Variable>UN</Variable>
> </Variables>
> <Dimensions Count="16">
> <Dimension Name="CTY" IsGroup="False" BaseDim="">
> <Member>AUSTRIA</Member>
> </Dimension>
> </Dimensions>
> <FetchDefinition>
> <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
CalcColRndPrec="3"
> />
> <AcrossMeasures Count="2">
> <AcrossMeasure Index="1" DimName="TimePeriods" />
> <AcrossMeasure Index="2" DimName="Variables" />
> <Columns Count="1" Rank="0" CalcRank="0" />
> </AcrossMeasures>
> <DownMeasures Count="1">
> <DownMeasure Index="1" DimName="CTY" />
> </DownMeasures>
> </FetchDefinition>
> </DVAutoXMLFetch>
> - I'm running RS SP1 on Windows 2000.
> - I can post the source code if anyone wants...
> Thanks in advance for any hints!
> Chris
>|||Hi Teo,
Thanks, that solved that problem. I've seen several code examples which
returned null for Parameters, which presumably must have worked at some
point; has the behaviour changed since beta 1?
Anyway, I have a new problem now - the report wizard almost, but I get a COM
Interop exception when I click Finish. The error originates from
Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseContainerManager.CreateDocumentObjectDictionary.
Once again the error is raised from outside my code. Any more ideas?
Thanks again,
Chris
"Teo Lachev" wrote:
> Chris,
> Don't return null. Instead, instantiate your ParameterCollection and return
> it back although it will be emply.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > Hi all,
> >
> > I'm trying to develop a custom data extension for a proprietary database
> we
> > use, and I'm running into problems. I've built a test harness for it and
> it
> > works fine; however when I try to use it with RS I get the following error
> > just after having entered my query and pressed Next in the New Report
> wizard:
> > "An error occurred while the query design method was being saved. Object
> > reference not set to an instance of an object"
> >
> > When I step through my code, I can see that everything goes well until the
> > designer tries to call the Parameters property on the Command object.
> Because
> > my database doesn't support parameters I'm returning null here, something
> > I've seen in several code examples. As soon as I've exited the property I
> get
> > the error, with the debugger saying it originates from
> > Microsoft.ReportDesigner.Design.Query.HasParameters.
> >
> > Other background information (in no particular order):
> > - Before I get to the Parameters property, I see that the GetName and
> > GetFieldType properties on my DataReader are called the same number of
> times
> > as there are columns in my resultset, and then the Dispose method is
> called
> > on the DataReader.
> > - My queries are in XML, and here's the sample I'm using for testing:
> > <DVAutoXMLFetch Database="C:\Program Files\IMS Health\DATA\DBPINT01.PRM">
> > <TimePeriods Count="4">
> > <TimePeriod>QTR/3/02</TimePeriod>
> > </TimePeriods>
> > <Variables Count="3">
> > <Variable>UN</Variable>
> > </Variables>
> > <Dimensions Count="16">
> > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > <Member>AUSTRIA</Member>
> > </Dimension>
> > </Dimensions>
> > <FetchDefinition>
> > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> CalcColRndPrec="3"
> > />
> > <AcrossMeasures Count="2">
> > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > <AcrossMeasure Index="2" DimName="Variables" />
> > <Columns Count="1" Rank="0" CalcRank="0" />
> > </AcrossMeasures>
> > <DownMeasures Count="1">
> > <DownMeasure Index="1" DimName="CTY" />
> > </DownMeasures>
> > </FetchDefinition>
> > </DVAutoXMLFetch>
> > - I'm running RS SP1 on Windows 2000.
> > - I can post the source code if anyone wants...
> >
> > Thanks in advance for any hints!
> >
> > Chris
> >
>
>|||Chris,
Not from the top of my head. Could you put breakpoints in all public methods
and see after which call the exception is thrown. There must be something
quirky in the data extension itself.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
news:987083A9-8CE5-4A99-A887-A32247FB8776@.microsoft.com...
> Hi Teo,
> Thanks, that solved that problem. I've seen several code examples which
> returned null for Parameters, which presumably must have worked at some
> point; has the behaviour changed since beta 1?
> Anyway, I have a new problem now - the report wizard almost, but I get a
COM
> Interop exception when I click Finish. The error originates from
>
Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseCo
ntainerManager.CreateDocumentObjectDictionary.
> Once again the error is raised from outside my code. Any more ideas?
> Thanks again,
> Chris
> "Teo Lachev" wrote:
> > Chris,
> >
> > Don't return null. Instead, instantiate your ParameterCollection and
return
> > it back although it will be emply.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> > news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > > Hi all,
> > >
> > > I'm trying to develop a custom data extension for a proprietary
database
> > we
> > > use, and I'm running into problems. I've built a test harness for it
and
> > it
> > > works fine; however when I try to use it with RS I get the following
error
> > > just after having entered my query and pressed Next in the New Report
> > wizard:
> > > "An error occurred while the query design method was being saved.
Object
> > > reference not set to an instance of an object"
> > >
> > > When I step through my code, I can see that everything goes well until
the
> > > designer tries to call the Parameters property on the Command object.
> > Because
> > > my database doesn't support parameters I'm returning null here,
something
> > > I've seen in several code examples. As soon as I've exited the
property I
> > get
> > > the error, with the debugger saying it originates from
> > > Microsoft.ReportDesigner.Design.Query.HasParameters.
> > >
> > > Other background information (in no particular order):
> > > - Before I get to the Parameters property, I see that the GetName and
> > > GetFieldType properties on my DataReader are called the same number of
> > times
> > > as there are columns in my resultset, and then the Dispose method is
> > called
> > > on the DataReader.
> > > - My queries are in XML, and here's the sample I'm using for testing:
> > > <DVAutoXMLFetch Database="C:\Program Files\IMS
Health\DATA\DBPINT01.PRM">
> > > <TimePeriods Count="4">
> > > <TimePeriod>QTR/3/02</TimePeriod>
> > > </TimePeriods>
> > > <Variables Count="3">
> > > <Variable>UN</Variable>
> > > </Variables>
> > > <Dimensions Count="16">
> > > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > > <Member>AUSTRIA</Member>
> > > </Dimension>
> > > </Dimensions>
> > > <FetchDefinition>
> > > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> > CalcColRndPrec="3"
> > > />
> > > <AcrossMeasures Count="2">
> > > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > > <AcrossMeasure Index="2" DimName="Variables" />
> > > <Columns Count="1" Rank="0" CalcRank="0" />
> > > </AcrossMeasures>
> > > <DownMeasures Count="1">
> > > <DownMeasure Index="1" DimName="CTY" />
> > > </DownMeasures>
> > > </FetchDefinition>
> > > </DVAutoXMLFetch>
> > > - I'm running RS SP1 on Windows 2000.
> > > - I can post the source code if anyone wants...
> > >
> > > Thanks in advance for any hints!
> > >
> > > Chris
> > >
> >
> >
> >|||Teo,
I did that and still had no luck - and then saw the bug by accident and
fixed it. Everything now seems to run fine, but it did make me wonder - I was
debugging the devenv.exe process, but when you run a report in preview
(rather than build it) does it spawn a new process? That might explain my
problems debugging it, no?
Thanks for all your help,
Chris
"Teo Lachev" wrote:
> Chris,
> Not from the top of my head. Could you put breakpoints in all public methods
> and see after which call the exception is thrown. There must be something
> quirky in the data extension itself.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> news:987083A9-8CE5-4A99-A887-A32247FB8776@.microsoft.com...
> > Hi Teo,
> >
> > Thanks, that solved that problem. I've seen several code examples which
> > returned null for Parameters, which presumably must have worked at some
> > point; has the behaviour changed since beta 1?
> >
> > Anyway, I have a new problem now - the report wizard almost, but I get a
> COM
> > Interop exception when I click Finish. The error originates from
> >
> Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseCo
> ntainerManager.CreateDocumentObjectDictionary.
> > Once again the error is raised from outside my code. Any more ideas?
> >
> > Thanks again,
> >
> > Chris
> >
> > "Teo Lachev" wrote:
> >
> > > Chris,
> > >
> > > Don't return null. Instead, instantiate your ParameterCollection and
> return
> > > it back although it will be emply.
> > >
> > > --
> > > Hope this helps.
> > >
> > > ----
> > > Teo Lachev, MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > Publisher website: http://www.manning.com/lachev
> > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > Home page and blog: http://www.prologika.com/
> > > ----
> > >
> > > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> > > news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > > > Hi all,
> > > >
> > > > I'm trying to develop a custom data extension for a proprietary
> database
> > > we
> > > > use, and I'm running into problems. I've built a test harness for it
> and
> > > it
> > > > works fine; however when I try to use it with RS I get the following
> error
> > > > just after having entered my query and pressed Next in the New Report
> > > wizard:
> > > > "An error occurred while the query design method was being saved.
> Object
> > > > reference not set to an instance of an object"
> > > >
> > > > When I step through my code, I can see that everything goes well until
> the
> > > > designer tries to call the Parameters property on the Command object.
> > > Because
> > > > my database doesn't support parameters I'm returning null here,
> something
> > > > I've seen in several code examples. As soon as I've exited the
> property I
> > > get
> > > > the error, with the debugger saying it originates from
> > > > Microsoft.ReportDesigner.Design.Query.HasParameters.
> > > >
> > > > Other background information (in no particular order):
> > > > - Before I get to the Parameters property, I see that the GetName and
> > > > GetFieldType properties on my DataReader are called the same number of
> > > times
> > > > as there are columns in my resultset, and then the Dispose method is
> > > called
> > > > on the DataReader.
> > > > - My queries are in XML, and here's the sample I'm using for testing:
> > > > <DVAutoXMLFetch Database="C:\Program Files\IMS
> Health\DATA\DBPINT01.PRM">
> > > > <TimePeriods Count="4">
> > > > <TimePeriod>QTR/3/02</TimePeriod>
> > > > </TimePeriods>
> > > > <Variables Count="3">
> > > > <Variable>UN</Variable>
> > > > </Variables>
> > > > <Dimensions Count="16">
> > > > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > > > <Member>AUSTRIA</Member>
> > > > </Dimension>
> > > > </Dimensions>
> > > > <FetchDefinition>
> > > > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> > > CalcColRndPrec="3"
> > > > />
> > > > <AcrossMeasures Count="2">
> > > > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > > > <AcrossMeasure Index="2" DimName="Variables" />
> > > > <Columns Count="1" Rank="0" CalcRank="0" />
> > > > </AcrossMeasures>
> > > > <DownMeasures Count="1">
> > > > <DownMeasure Index="1" DimName="CTY" />
> > > > </DownMeasures>
> > > > </FetchDefinition>
> > > > </DVAutoXMLFetch>
> > > > - I'm running RS SP1 on Windows 2000.
> > > > - I can post the source code if anyone wants...
> > > >
> > > > Thanks in advance for any hints!
> > > >
> > > > Chris
> > > >
> > >
> > >
> > >
>
>|||It may be if the issue was security related. The idea behind the ReportHost
(F5), is to allow the report author to simulate the Report Server
(production) environment by applying the security settings from the
rspreviewpolicy.config.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
news:44823615-9F6C-4477-A3DD-ECDCF43BE81A@.microsoft.com...
> Teo,
> I did that and still had no luck - and then saw the bug by accident and
> fixed it. Everything now seems to run fine, but it did make me wonder - I
was
> debugging the devenv.exe process, but when you run a report in preview
> (rather than build it) does it spawn a new process? That might explain my
> problems debugging it, no?
> Thanks for all your help,
> Chris
> "Teo Lachev" wrote:
> > Chris,
> >
> > Not from the top of my head. Could you put breakpoints in all public
methods
> > and see after which call the exception is thrown. There must be
something
> > quirky in the data extension itself.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> > news:987083A9-8CE5-4A99-A887-A32247FB8776@.microsoft.com...
> > > Hi Teo,
> > >
> > > Thanks, that solved that problem. I've seen several code examples
which
> > > returned null for Parameters, which presumably must have worked at
some
> > > point; has the behaviour changed since beta 1?
> > >
> > > Anyway, I have a new problem now - the report wizard almost, but I get
a
> > COM
> > > Interop exception when I click Finish. The error originates from
> > >
> >
Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseCo
> > ntainerManager.CreateDocumentObjectDictionary.
> > > Once again the error is raised from outside my code. Any more ideas?
> > >
> > > Thanks again,
> > >
> > > Chris
> > >
> > > "Teo Lachev" wrote:
> > >
> > > > Chris,
> > > >
> > > > Don't return null. Instead, instantiate your ParameterCollection and
> > return
> > > > it back although it will be emply.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in
message
> > > > news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > > > > Hi all,
> > > > >
> > > > > I'm trying to develop a custom data extension for a proprietary
> > database
> > > > we
> > > > > use, and I'm running into problems. I've built a test harness for
it
> > and
> > > > it
> > > > > works fine; however when I try to use it with RS I get the
following
> > error
> > > > > just after having entered my query and pressed Next in the New
Report
> > > > wizard:
> > > > > "An error occurred while the query design method was being saved.
> > Object
> > > > > reference not set to an instance of an object"
> > > > >
> > > > > When I step through my code, I can see that everything goes well
until
> > the
> > > > > designer tries to call the Parameters property on the Command
object.
> > > > Because
> > > > > my database doesn't support parameters I'm returning null here,
> > something
> > > > > I've seen in several code examples. As soon as I've exited the
> > property I
> > > > get
> > > > > the error, with the debugger saying it originates from
> > > > > Microsoft.ReportDesigner.Design.Query.HasParameters.
> > > > >
> > > > > Other background information (in no particular order):
> > > > > - Before I get to the Parameters property, I see that the GetName
and
> > > > > GetFieldType properties on my DataReader are called the same
number of
> > > > times
> > > > > as there are columns in my resultset, and then the Dispose method
is
> > > > called
> > > > > on the DataReader.
> > > > > - My queries are in XML, and here's the sample I'm using for
testing:
> > > > > <DVAutoXMLFetch Database="C:\Program Files\IMS
> > Health\DATA\DBPINT01.PRM">
> > > > > <TimePeriods Count="4">
> > > > > <TimePeriod>QTR/3/02</TimePeriod>
> > > > > </TimePeriods>
> > > > > <Variables Count="3">
> > > > > <Variable>UN</Variable>
> > > > > </Variables>
> > > > > <Dimensions Count="16">
> > > > > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > > > > <Member>AUSTRIA</Member>
> > > > > </Dimension>
> > > > > </Dimensions>
> > > > > <FetchDefinition>
> > > > > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> > > > CalcColRndPrec="3"
> > > > > />
> > > > > <AcrossMeasures Count="2">
> > > > > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > > > > <AcrossMeasure Index="2" DimName="Variables" />
> > > > > <Columns Count="1" Rank="0" CalcRank="0" />
> > > > > </AcrossMeasures>
> > > > > <DownMeasures Count="1">
> > > > > <DownMeasure Index="1" DimName="CTY" />
> > > > > </DownMeasures>
> > > > > </FetchDefinition>
> > > > > </DVAutoXMLFetch>
> > > > > - I'm running RS SP1 on Windows 2000.
> > > > > - I can post the source code if anyone wants...
> > > > >
> > > > > Thanks in advance for any hints!
> > > > >
> > > > > Chris
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >|||Using Custom data Extensions , i am able to pass a dataset to my report. All goes fine as long as i dont need a parameter to pass to my stored procedure which i execute from my CDE. But i now need to pass a parameter to it for it to return a dataset.Please help.I have spend lots of time over this but have not yet goy the soluion
From http://www.developmentnow.com/g/115_2004_9_0_0_450456/Custom-Data-Extension-problems.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

Sunday, February 19, 2012

Custom Assembly Problems: System.Drawing

Hi,
I built a Custom Assembly to allow me to use external image files in
my report. I deployed the DLL and configured the security policy
config files.
Everything worked great, i got the image coming through to my report
in both Designer Preview mode and when deployed.
I decided to extend the custom assembly to return the dimensions of
the image as well by adding some code that utilizes System.Drawing.DLL
//ok now, lets get the width and height
//FileIOPermission permission = new FileIOPermission
Image myImage = Image.FromFile(pPath);
g_lastHeight = myImage.Height;
g_lastWidth = myImage.Width;
myImage.Dispose();
myImage=null;
After rebuilding and deploying the DLL, my report no longer has any
images when deployed.
However, the images do show up in Designer preview mode, and the DLL
performs correctly returning the image dimensions upon request,
implying a security policy issue'
So my question is what security policy type things do i need to do in
order to utilize System.Drawing.dll in my DLL.
Any help would be greatly appreciated.
Thanks
DerekI believe the correct permission is UIPermission. Please see the following for why it only works in
preview and how to configure the server:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp?frame=true
Thanks.
Donovan R. Smith
Software Test Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
"Derek W" <derek@.brokerbuilders.com> wrote in message
news:a5df538d.0408161409.6d219516@.posting.google.com...
> Hi,
> I built a Custom Assembly to allow me to use external image files in
> my report. I deployed the DLL and configured the security policy
> config files.
> Everything worked great, i got the image coming through to my report
> in both Designer Preview mode and when deployed.
> I decided to extend the custom assembly to return the dimensions of
> the image as well by adding some code that utilizes System.Drawing.DLL
> //ok now, lets get the width and height
> //FileIOPermission permission = new FileIOPermission
> Image myImage = Image.FromFile(pPath);
> g_lastHeight = myImage.Height;
> g_lastWidth = myImage.Width;
> myImage.Dispose();
> myImage=null;
> After rebuilding and deploying the DLL, my report no longer has any
> images when deployed.
> However, the images do show up in Designer preview mode, and the DLL
> performs correctly returning the image dimensions upon request,
> implying a security policy issue'
> So my question is what security policy type things do i need to do in
> order to utilize System.Drawing.dll in my DLL.
> Any help would be greatly appreciated.
> Thanks
> Derek

Friday, February 17, 2012

custom assemblies problem

I have built a custom assembly, I copied it to the right folders and wrote
some code to call the component.
It works fine in preview mode, but when I deploy the report to another
server I get the error:
"error while loading code module 'x', version='x' ..."
I feel I tried everything, copying the dll myself to the server's
reportserver\bin folder, giving read & execute permissions, creating the xml
nodes in the RSReportServer.config on the server etc.
Always that error.
Is there some description on what to do if you deploy your reports with
custom assemblies to another server?This is a multi-part message in MIME format.
--=_NextPart_000_005C_01C5078D.1745CA00
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
might be a code access security problem
to diagnose (do not do this on a production server) please find =rssrvpolicy.config file in ReportServer folder and modify the following:
old:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"Nothing">
new:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"FullTrust">
Restart iis and see if it runs the report, let me know the results. If =it runs - it's a security problem, I will let you know further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; Xml; =SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...
> I have built a custom assembly, I copied it to the right folders and =wrote
> some code to call the component.
> It works fine in preview mode, but when I deploy the report to another
> server I get the error:
> "error while loading code module 'x', version=3D'x' ..."
> > I feel I tried everything, copying the dll myself to the server's
> reportserver\bin folder, giving read & execute permissions, creating =the xml
> nodes in the RSReportServer.config on the server etc.
> > Always that error.
> > Is there some description on what to do if you deploy your reports =with
> custom assemblies to another server?
> >
--=_NextPart_000_005C_01C5078D.1745CA00
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

might be a code access security problem
to diagnose (do not do this on a production server) =please find rssrvpolicy.config file in ReportServer folder and modify the following:
old:
&nbs=p; new:
&nbs=p;
Restart iis and see if it runs the report, let me =know the results. If it runs - it's a security problem, I will let you know =further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex MineevSoftware Design Engineer. =Report expressions; Code Access Security; Xml; SQE.
This posting is provided "AS IS" with no warranties, =and confers no rights
"Serv=E9 La" wrote in =message news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...> I have built a custom =assembly, I copied it to the right folders and wrote> some code to call the component.> It works fine in preview mode, but when I deploy the =report to another> server I get the error:> "error while loading =code module 'x', version=3D'x' ..."> > I feel I tried =everything, copying the dll myself to the server's> reportserver\bin folder, giving =read & execute permissions, creating the xml> nodes in the RSReportServer.config on the server etc.> > Always that error.> > Is there some description on what to do if you =deploy your reports with> custom assemblies to another server?> =>

--=_NextPart_000_005C_01C5078D.1745CA00--|||This is a multi-part message in MIME format.
--=_NextPart_000_0013_01C50905.46797AA0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Thank you for answering. The problem was solved, it was a stupid mistake =of mine.
The good news is that the FullTrust setting did help me later when I =needed to load assemblies from report code :)
"Alexandre Mineev [MSFT]" <almineev@.microsoft.com> schreef in bericht =news:eAOfmA9BFHA.1260@.TK2MSFTNGP12.phx.gbl...
might be a code access security problem
to diagnose (do not do this on a production server) please find =rssrvpolicy.config file in ReportServer folder and modify the following:
old:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"Nothing">
new:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"FullTrust">
Restart iis and see if it runs the report, let me know the results. If =it runs - it's a security problem, I will let you know further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; =Xml; SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...
> I have built a custom assembly, I copied it to the right folders and =wrote
> some code to call the component.
> It works fine in preview mode, but when I deploy the report to =another
> server I get the error:
> "error while loading code module 'x', version=3D'x' ..."
> > I feel I tried everything, copying the dll myself to the server's
> reportserver\bin folder, giving read & execute permissions, creating =the xml
> nodes in the RSReportServer.config on the server etc.
> > Always that error.
> > Is there some description on what to do if you deploy your reports =with
> custom assemblies to another server?
> >
--=_NextPart_000_0013_01C50905.46797AA0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Thank you for answering. The problem =was solved, it was a stupid mistake of mine.
The good news is that the FullTrust =setting did help me later when I needed to load assemblies from report code :)
"Alexandre Mineev [MSFT]" =schreef in bericht news:eAOfmA9BFHA.1260=@.TK2MSFTNGP12.phx.gbl...
might be a code access security =problem
to diagnose (do not do this on a production =server) please find rssrvpolicy.config file in ReportServer folder and modify the following:
old:
&nbs=p; new:
&nbs=p;
Restart iis and see if it runs the report, let me =know the results. If it runs - it's a security problem, I will let you know =further steps.

! Please undo the change of =rssrvpolicy.config afterwards...!
-- Alex MineevSoftware Design =Engineer. Report expressions; Code Access Security; Xml; SQE.

This posting is provided "AS IS" with no =warranties, and confers no rights
"Serv=E9 La" wrote in =message news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...> I have built a custom =assembly, I copied it to the right folders and wrote> some code to call the = component.> It works fine in preview mode, but when I deploy =the report to another> server I get the error:> "error while =loading code module 'x', version=3D'x' ..."> > I feel I tried =everything, copying the dll myself to the server's> reportserver\bin =folder, giving read & execute permissions, creating the xml> nodes in the RSReportServer.config on the server etc.> > Always that error.> > Is there some description on what to do if you =deploy your reports with> custom assemblies to another server?> = >

--=_NextPart_000_0013_01C50905.46797AA0--|||This is a multi-part message in MIME format.
--=_NextPart_000_000F_01C50916.FB775740
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Please do not use FullTrust in production environment. It ultimately =opens RS for attacks.
The use of FullTrust was needed for diagnostics only.
This article describe what needs to be done for custom assemblies if =they do not work by default: =http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/RSPROG=
/htm/rsp_prog_rdl_8mue.asp
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; Xml; =SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:uSURmzPCFHA.3492@.TK2MSFTNGP12.phx.gbl...
Thank you for answering. The problem was solved, it was a stupid =mistake of mine.
The good news is that the FullTrust setting did help me later when I =needed to load assemblies from report code :)
"Alexandre Mineev [MSFT]" <almineev@.microsoft.com> schreef in =bericht news:eAOfmA9BFHA.1260@.TK2MSFTNGP12.phx.gbl...
might be a code access security problem
to diagnose (do not do this on a production server) please find =rssrvpolicy.config file in ReportServer folder and modify the following:
old:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"Nothing">
new:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"FullTrust">
Restart iis and see if it runs the report, let me know the results. =If it runs - it's a security problem, I will let you know further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; =Xml; SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...
> I have built a custom assembly, I copied it to the right folders =and wrote
> some code to call the component.
> It works fine in preview mode, but when I deploy the report to =another
> server I get the error:
> "error while loading code module 'x', version=3D'x' ..."
> > I feel I tried everything, copying the dll myself to the server's
> reportserver\bin folder, giving read & execute permissions, =creating the xml
> nodes in the RSReportServer.config on the server etc.
> > Always that error.
> > Is there some description on what to do if you deploy your reports =with
> custom assemblies to another server?
> >
--=_NextPart_000_000F_01C50916.FB775740
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Please do not use FullTrust in production =environment. It ultimately opens RS for attacks.
The use of FullTrust was needed for diagnostics only.
This article describe what needs to be done for =custom assemblies if they do not work by default: http://msdn.microsoft.com/library/def=ault.asp?url=3D/library/en-us/RSPROG/htm/rsp_prog_rdl_8mue.asp=-- Alex MineevSoftware Design =Engineer. Report expressions; Code Access Security; Xml; SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" =wrote in message news:uSURmzPCFHA.3492=@.TK2MSFTNGP12.phx.gbl...
Thank you for answering. The problem =was solved, it was a stupid mistake of mine.
The good news is that the FullTrust =setting did help me later when I needed to load assemblies from report code :)


"Alexandre Mineev [MSFT]" =schreef in bericht news:eAOfmA9BFHA.1260=@.TK2MSFTNGP12.phx.gbl...
might be a code access security =problem
to diagnose (do not do this on a production =server) please find rssrvpolicy.config file in ReportServer folder and modify the following:
old:
&nbs=p; new:
&nbs=p;
Restart iis and see if it runs the report, let =me know the results. If it runs - it's a security problem, I will let you know =further steps.

! Please undo the change of =rssrvpolicy.config afterwards...!
-- Alex MineevSoftware Design =Engineer. Report expressions; Code Access Security; Xml; SQE.

This posting is provided "AS IS" with no =warranties, and confers no rights
"Serv=E9 La" wrote =in message news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...> I have built a custom =assembly, I copied it to the right folders and wrote> some code to call =the component.> It works fine in preview mode, but when I deploy =the report to another> server I get the error:> "error =while loading code module 'x', version=3D'x' ..."> > I feel =I tried everything, copying the dll myself to the server's> =reportserver\bin folder, giving read & execute permissions, creating the =xml> nodes in the RSReportServer.config on the server etc.> => Always that error.> > Is there some description on =what to do if you deploy your reports with> custom assemblies to another = server?> > =

--=_NextPart_000_000F_01C50916.FB775740--