Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Thursday, March 29, 2012

Ho to make data source web method execute once per a report?

My report works with XMLDP data provider and obtains source data as a

result of a web method call. This memthod returns all data necessary

for the report. Thus, all of about 20 report datasets query the same

web method with the same parameters and then select appropriate data

with different ElementPath expressions. It's so inefficient and

time-consuming! I cant have respective web method for every dataset.

How can I configure SSRS to call web method only once while the report

is executing? Or how can I leverage the performance at all?I seem to have founed the solution. I've configured report datasource to execute in single transaction and extra marked the source web method with [WebMethod(CashDuration=%TIME)] attribute. Hence, the report datasets call the web method one after another and the method is actually executed only once if %TIME value is more than report processing time. That's what I need!

Ho to make data source web method execute once per a report?

My report works with XMLDP data provider and obtains source data as a

result of a web method call. This memthod returns all data necessary

for the report. Thus, all of about 20 report datasets query the same

web method with the same parameters and then select appropriate data

with different ElementPath expressions. It's so inefficient and

time-consuming! I cant have respective web method for every dataset.

How can I configure SSRS to call web method only once while the report

is executing? Or how can I leverage the performance at all?I seem to have founed the solution. I've configured report datasource to execute in single transaction and extra marked the source web method with [WebMethod(CashDuration=%TIME)] attribute. Hence, the report datasets call the web method one after another and the method is actually executed only once if %TIME value is more than report processing time. That's what I need!

Wednesday, March 7, 2012

Hierarchy

Hi to All!

Is there a perfect method to implement a hierarchy structure with different types as a table in Sql server 2005? Currently I am thinking of this way:

[Node | ParentId | ParentType | ChildId | ChildType]

But there is this nagging little voice saying it can be better

Cheers!

Nele

? Can you share some additional information? What do the "types" represent? Most of the time when I see the need for typing, it means that a table for that type should be created, and through key relationships this forms a natural hierarchy. In your system can the type hierarchy change? -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Eburon@.discussions.microsoft.com> wrote in message news:f4c76476-0e56-4c53-939b-ffb7750ab228@.discussions.microsoft.com... Hi to All! Is there a perfect method to implement a hierarchy structure with different types as a table in Sql server 2005? Currently I am thinking of this way: [Node | ParentId | ParentType | ChildId | ChildType] But there is this nagging little voice saying it can be better Cheers! Nele|||

[same author as Eburon]

It is indeed a natural hierarchy. I assume that the type hierarchy cannot change, but a type can be absent. More in detail there are three types, t1, t2, t3:

t1 is always the root [level 1],|||? I would model this as three tables. T2 and T3 would both have self-referencing keys (i.e., "parent" keys)... CREATE TABLE T1 ( T1Id INT NOT NULL UNIQUE, ... //other attributes, including natural PK ) GO CREATE TABLE T2 ( T1id INT NULL REFERENCES T1 (T1id), T2id INT NOT NULL UNIQUE, parentT2id INT NULL REFERENCES T2 (T2id), ...//other attributes, PK, etc CONSTRAINT CheckIDsNOTNULL CHECK (COALESCE(T1id, T2id) IS NOT NULL) ) GO CREATE TABLE T3 ( T2id INT NULL REFERENCES T3 (T13id), T3id INT NOT NULL UNIQUE, parentT3id INT NULL REFERENCES T2 (T3id), ...//other attributes, PK, etc CONSTRAINT CheckIDsNOTNULL CHECK (COALESCE(T2id, T3id) IS NOT NULL) ) GO -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Nele@.discussions.microsoft..com> wrote in message news:27029b28-63cc-419f-8340-5be221c78682@.discussions.microsoft.com... [same author as Eburon] It is indeed a natural hierarchy. I assume that the type hierarchy cannot change, but a type can be absent. More in detail there are three types, t1, t2, t3: t1 is always the root [level 1], t2 may be added to go lower down the hierarchy [level 1.1 -> level 1 ... 1], and t3 may be added as a child [level 1 ... 1.1]. Is that sufficient additional information?|||I had not thought of that solution. Thank you!

Sunday, February 26, 2012

Hiding Reports in Sharepoint Integration Mode

I'm setting the Hidden property to True and then creating the report using the CreateReport method from the ReportingService2006 class. When I check the reportserver database Hidden is set to true. But when I call the GetProperties method it shows Hidden as being false. And in the document library the reports are visable.

I tried calling the SetProperties method after I created the report but it still didn't work.

Here's how I create the report.

Dim props(0) As ReportServer.Property

Dim SetProp As New ReportServer.Property

SetProp.Name = "Hidden"

SetProp.Value = "True"

props(0) = SetProp

rs.CreateReport(Path.GetFileName(fileName), Folder, True, bytes, props, warnings)

Any idea?

Thanks,

-Somsong

The Hidden property isn't respected by SharePoint document libraries. We would have had to make code changes in SharePoint itself in order to get document libraries to respect RS's Hidden property, and we didn't pursue that.|||

So we would have to set up a default view and set a filter on it so that certain items can be hidden right? I can create a column in the document library and call it hidden, if the value in here is 'Yes' I could hide it. Do you know if I can set this value when I use the CreateReport method from the Reporting Services 2006 Web Service by passing in properties? I'm guessing this won't work cause those properties are probably just for the Report Server Database. I would probably have to use the Sharepoint Object Model to edit that column value right?

Thanks,

-Somsong