Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Thursday, March 29, 2012

Getting the Model's (Decision tree) PMML

Hi

Can anyone tell me the steps involved in retrieving a model's (decision tree) pmml and use the model content to devleop a web based interface. I am using SQL Server 2005.

Thanks,

Nathan

To get the PMML is relatively easy. Just execute a query like:

SELECT MODEL_PMML FROM <model>.PMML

This query will return the PMML rendering of the model content, as long as:

- the model contains a single predictable variable (asingle tree)

- the model does not include a date time column

Both these limitations derived from limitations of the PMML 2.1 standard which is supported by Analysis Services 2005.

Now, to use the content for a web interface -- not sure whether PMML is the best path. You can, of course, traverse the PMML using an XML reader and render the content in any form you like. You can do the same thing and get rid of the limitations above by issuing content queries against Analysis Services

E.g. SELECT * FROM <model>.CONTENT

Also, SQL Server 2005 provides a sample called Data mining Web Controls which include a web rendering for decision trees (again, without the limitations above). The sample includes source code.

You can try the sample at this location: http://www.sqlserverdatamining.com/MovieSurveyDemo

Just expand the Forests node and click on a tree (say, Demographic Forest)

|||You had mentioned that the sample includes source code...but I did not find any...can you tell me specifically where it is...|||

The source code is included in the samples coming with SQL Server.

It was also recently uploaded on the web at http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Data%20Mining%20Web%20Controls%20Library&referringTitle=Home

Getting the Model's (Decision tree) PMML

Hi

Can anyone tell me the steps involved in retrieving a model's (decision tree) pmml and use the model content to devleop a web based interface. I am using SQL Server 2005.

Thanks,

Nathan

To get the PMML is relatively easy. Just execute a query like:

SELECT MODEL_PMML FROM <model>.PMML

This query will return the PMML rendering of the model content, as long as:

- the model contains a single predictable variable (asingle tree)

- the model does not include a date time column

Both these limitations derived from limitations of the PMML 2.1 standard which is supported by Analysis Services 2005.

Now, to use the content for a web interface -- not sure whether PMML is the best path. You can, of course, traverse the PMML using an XML reader and render the content in any form you like. You can do the same thing and get rid of the limitations above by issuing content queries against Analysis Services

E.g. SELECT * FROM <model>.CONTENT

Also, SQL Server 2005 provides a sample called Data mining Web Controls which include a web rendering for decision trees (again, without the limitations above). The sample includes source code.

You can try the sample at this location: http://www.sqlserverdatamining.com/MovieSurveyDemo

Just expand the Forests node and click on a tree (say, Demographic Forest)

|||You had mentioned that the sample includes source code...but I did not find any...can you tell me specifically where it is...|||

The source code is included in the samples coming with SQL Server.

It was also recently uploaded on the web at http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Data%20Mining%20Web%20Controls%20Library&referringTitle=Home

getting the list of connection strings to display in the SqlDataSource Wizard

I've added an SqlDataSource control to my web page and selected "Configure Data Source" on it. This brings up a "Choose Your Data Connection" wizard, and it asks you to select from a dropdown list of presumably pre-existing connection strings in my web.config file. However none of my connection strings will display in that dropdown list. The only thing i can do is hit the "Create New Connection" button and this adds yet another connection string to my web.config file.

I've already ran through the wizard once, created a new connection string, but when i run through the wizard again, even the new connection string - the one created by the last wizard will not appear in the dropdown list.

Any suggestions?

Jason

Hi Jason,

Are the connection strings actually appearing in the web.config file? Are they actually working - that is, if you call one of the connection strings, does it actually do what you expect? I can't offer any actual solutions to this one, but have you tried creating a new web.config file and checking if this fixes the problem? Personally, I would set up a new application just to test this, and if it works OK in the new application then perhaps something in your current application has caused the issue.

Hope this helps.

Paul

|||

Hi Paul - yes i've tried your suggestions before but nothing works. In fact, even after already running "Choose Your Data Connection" wizard (and selecting the new datasource option) to let it generate a datasource for me, and then running the wizard again to see if the previously created datasource will appear, and it doesn't.

Not a big deal i guess but a bit of a pain. I wonder if its a bug...

Jason

|||

Hi Jason,

Please be sure that you have saved the string (a checkbox for you to select) the first time you use it.

Thanks.

sql

Tuesday, March 27, 2012

Getting the format bar while using SSRS Web Service

Hi,

I am using the URL method to call reports where you get all the look and feel and report format and export options on the report page itself. When I tried to use the Web Service I couldn't find those options. I can render the reports only one format at a time. Is there anyway to view the reports as in URL methos using web service with all the formatting options? Thank You.

Regards,

Das.

The report toolbar is available only with URL addressability. If you need to use the Web Service, why don't use the Report Viewer controls? Behind the scenes, they call down to the Web service APIs.

Monday, March 26, 2012

Getting started with sql 2000 Reporting Services??

Hi all,

I've been developing using MS Web Developer 2005 (Express Edition) and now need to create reports. I've installed MS SQL 2000 Reporting Services on the applicable SQL 2000 server and am now stuck on how to create reports from MS Web Developer 2005. Do i need MS Web Developer 2005 Pro or alternatively Visual Studio .NET 2003 to create dynamic web based reports? If not could someone throw me some pointers please :) as im really having problems getting started on this.

Cheers,

Ryan

Hi,

You can use SQL Server 2005 Express Edition with Advanced Services, which includes Reporting Services.

Check the linkhttp://www.kodyaz.com/content/sqlserver2005servicepack1.aspx for download links.

Eralper

|||

ryanchopps:

Hi all,

I've been developing using MS Web Developer 2005 (Express Edition) and now need to create reports. I've installed MS SQL 2000 Reporting Services on the applicable SQL 2000 server and am now stuck on how to create reports from MS Web Developer 2005. Do i need MS Web Developer 2005 Pro or alternatively Visual Studio .NET 2003 to create dynamic web based reports? If not could someone throw me some pointers please :) as im really having problems getting started on this.

Cheers,

Ryan

Reporting Serverice 2000 can be installed to have the report designer, which works on .Net 2003. So, Visual Studio .Net 2003 can be used to develop the reports.

Getting started with reporting services SQL Server 2005...help

Hi, I'm building a Web aplication which will feed a SQL 2005 reporting service to send information on a report. I've used the SQL Server 2005 Business Intelligence tool but I've created a simple report with no interaction with the web aplication. The serious question is, is there any tutorial or web site with good step by step how to feed a sql server 2005 reporting service from a ASP.Net web application?This is to be made quickly, it may be quite simple, but I'm quite lost into it too!Thanks for helping!

I read from below site, it helps me to understand.

http://www.odetocode.com/Articles/128.aspx

http://www.odetocode.com/Articles/156.aspx

Anyway, if you have any questions about it please let me know. I will help you as much as i can.

Friday, March 23, 2012

Getting Started

Hi
I have created a basic report.
Now I am looking for options to send in some parameters to the report as
in a url to call from a web application, which can be applied on the query.
Also rendering in pdf format.
Any help would be appreciable.
Thanks!
SandyEverything you need to know:
http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_urlaccess_374y.asp?frame=true
Kulgan.

Getting startec with Integration Services

I am having trouble starting an Integrated Services Project.

I have just installed Visual Studio 2005 in order to use ASP 2.0 for web development, but my new web hosting package includes SQL Server 2005, rather than SQL 2000, which I have been using. I need DTS to upload a database to the production server, and I think I now need an Integration Services Project.


I have installed the Developer version of SQL Server 2005, and the install program says that Integration Servives are installed. However, when I open the SQL Server Business Intelligence Studio, I seem to get Visual Studio without Intregration Services. When I open a new project, there is no template for an Integration Services project. Can anyone help?

The Integration Services project template should be there, look for it under Business Intelligence Projects folder.|||

Many thanks. I have managed to create a new project now

David

sql

Getting SSIS running on Web Server

I need to be able to run SSIS packages form an asp.net (win 2k3) web server. Wrox has a book out "Professional SQL Server 2005 Integration Services" where they call the dtsx package directly using the following vb.net snipette:

Imports Microsoft.SqlServer.Dts.DtsClient

Dim ssisConn As New DtsConnection
ssisConn.ConnectionString = String.Format("-f ""{0}""", strMyFilePath)
ssisConn.Open()

As you would expect this works great on a workstation that has BIDS installed on it but does not work on a web server where sql client tools are not installed. Without install sql tools on the server what needs to be done to get this functioning as coded? How about calling packages that are installed on the server?

If anyone knows of any sites or books that cover this in detail I would appreciate the info. I only seem to be able to find bits and pieces.

thanks in advance

You can't. To my knowledge, you'll need the SSIS client tools installed. The packages are executed using dtexec (or a variant, I suppose).|||Searching turned this up.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=172501&SiteID=1|||

I figured it wouldn't be possible to run packages from a web server w/out having ssis installed. I wanted to make sure that some combonation of dll's copied to the bin directory wouldn't get me what I needed. I opted to expose a web service on the sql server and consume the service from the web box. The following kb article describes how to do it via a job and a web service.

http://msdn2.microsoft.com/de-de/library/ms403355.aspx

Getting SSIS running on Web Server

I need to be able to run SSIS packages form an asp.net (win 2k3) web server. Wrox has a book out "Professional SQL Server 2005 Integration Services" where they call the dtsx package directly using the following vb.net snipette:

Imports Microsoft.SqlServer.Dts.DtsClient

Dim ssisConn As New DtsConnection
ssisConn.ConnectionString = String.Format("-f ""{0}""", strMyFilePath)
ssisConn.Open()

As you would expect this works great on a workstation that has BIDS installed on it but does not work on a web server where sql client tools are not installed. Without install sql tools on the server what needs to be done to get this functioning as coded? How about calling packages that are installed on the server?

If anyone knows of any sites or books that cover this in detail I would appreciate the info. I only seem to be able to find bits and pieces.

thanks in advance

You can't. To my knowledge, you'll need the SSIS client tools installed. The packages are executed using dtexec (or a variant, I suppose).|||Searching turned this up.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=172501&SiteID=1|||

I figured it wouldn't be possible to run packages from a web server w/out having ssis installed. I wanted to make sure that some combonation of dll's copied to the bin directory wouldn't get me what I needed. I opted to expose a web service on the sql server and consume the service from the web box. The following kb article describes how to do it via a job and a web service.

http://msdn2.microsoft.com/de-de/library/ms403355.aspx

Wednesday, March 21, 2012

Getting Schedule assoicated with Subscription

I know this is probably an obvious question...
Using the Web Services API for RS2000, how can I find the non-shared
schedule that is assoicated with a specific SubscriptionID?
ThanksThe schedule comes back as matchdata when calling GetSubscriptionProperties.
It is xml and can be serialized to the ScheduleDefinition object.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"billd" <billd@.discussions.microsoft.com> wrote in message
news:055E485C-1081-49B0-8A39-0581914F2523@.microsoft.com...
>I know this is probably an obvious question...
> Using the Web Services API for RS2000, how can I find the non-shared
> schedule that is assoicated with a specific SubscriptionID?
> Thanks|||Thanks. The GetExecutionOptions() was throwing me off. The docs made it seem
that it would return a schedule ... but it always returns NULL.
"Daniel Reib [MSFT]" wrote:
> The schedule comes back as matchdata when calling GetSubscriptionProperties.
> It is xml and can be serialized to the ScheduleDefinition object.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "billd" <billd@.discussions.microsoft.com> wrote in message
> news:055E485C-1081-49B0-8A39-0581914F2523@.microsoft.com...
> >I know this is probably an obvious question...
> >
> > Using the Web Services API for RS2000, how can I find the non-shared
> > schedule that is assoicated with a specific SubscriptionID?
> >
> > Thanks
>
>|||It will for a report that is scheduled (for cache or snapshot execution),
not for any subscriptions that are associated with it.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"billd" <billd@.discussions.microsoft.com> wrote in message
news:411FF0BF-D495-4609-B2DD-B7745A143BBE@.microsoft.com...
> Thanks. The GetExecutionOptions() was throwing me off. The docs made it
> seem
> that it would return a schedule ... but it always returns NULL.
> "Daniel Reib [MSFT]" wrote:
>> The schedule comes back as matchdata when calling
>> GetSubscriptionProperties.
>> It is xml and can be serialized to the ScheduleDefinition object.
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "billd" <billd@.discussions.microsoft.com> wrote in message
>> news:055E485C-1081-49B0-8A39-0581914F2523@.microsoft.com...
>> >I know this is probably an obvious question...
>> >
>> > Using the Web Services API for RS2000, how can I find the non-shared
>> > schedule that is assoicated with a specific SubscriptionID?
>> >
>> > Thanks
>>

Monday, March 19, 2012

Getting report chart images from reports with parameters...not wor

I've been rendering chart images successfully for a report using the
ReportingService web services for a few weeks now. Today I had to add a
parameter to the report and now after I call my render method and loop
through the returned streamId's to get the images, I get the exception:
"rsStreamNotFound The stream cannot be found. The stream identifier that is
provided to an operation cannot be located in the report server database."
Why would this be happening?! I'm looping through the very streamId's that
the render method just returned to me!
Thanks in advance, Brian ParkerI figured out how to get around this. If the report you render has
parameters, you just take the parameterUsed collection and pass it into the
parameters argument of the renderStream method! The documentation for the
render method states "This parameter returns a value only if the report being
rendered is a report history snapshot.". Well this is not true..the
documentation should be changed and the renderStream method documentation
should state that you can pass the parametersUsed collection into the
parmeters argument.
Here's a snippet that works for me...
<snip>
// Render the report to HTML4.0
result = rs.Render(ConfigurationSettings.AppSettings["ReportSrc"],
"HTML4.0", null,
"<DeviceInfo><StreamRoot>" +
ConfigurationSettings.AppSettings["ImageDir"] +
ConfigurationSettings.AppSettings["ImagePrefix"] +
"</StreamRoot></DeviceInfo>",
parameters, null, null, out optionalString, out optionalString,
out optionalParams,
out optionalWarnings, out streamIDs);
// For each image stream returned by the call to render,
// render the stream and save it to the specified folder
foreach (string streamID in streamIDs)
{
image =rs.RenderStream(ConfigurationSettings.AppSettings["ReportSrc"], "HTML4.0",
streamID,
null ,null, optionalParams, out optionalString, out
optionalString);
// do something with the returned image...
}
</snip>
"Brian Parker" wrote:
> I've been rendering chart images successfully for a report using the
> ReportingService web services for a few weeks now. Today I had to add a
> parameter to the report and now after I call my render method and loop
> through the returned streamId's to get the images, I get the exception:
> "rsStreamNotFound The stream cannot be found. The stream identifier that is
> provided to an operation cannot be located in the report server database."
> Why would this be happening?! I'm looping through the very streamId's that
> the render method just returned to me!
> Thanks in advance, Brian Parker
>|||After reading my second post, I don't know if I was clear enough about what
was wrong with the documentation.
1) On ReportServices.render method, the argument called 'parameterUsed' does
not only return a value if the rendered report is a snapshot, as the
documentation states.
2) On the ReportServices.renderStream method, the argument called Parameters
is manditory if you want to pull in an image from a report that has
parameters. When you leave this argument null and try to use the Stream
array returned from the render method, you will get an exception. If you use
the streamid in conjunction with passing the parameters argument in, you'll
be good to go.
Perhaps this is a bug that will be fixed and this solution will no longer be
necessary. Could someone at microsoft please verify this?

Monday, March 12, 2012

Getting Parameter Values - Need Perspective

Have several server reports (RDLs, not RDLCs) that use report parameters (text boxes, dropdowns, etc). Is it possible to view these reports in web pages using the report viewer control and use the report parameters as they were originally intended?

From what I've experienced so far, reports behave as if parameter data was not entered. I've tried to extract parameter values, but only know how to find the parameter metadata.

Do I need to hide the report parameters and substitute them with visible web controls instead? I know how to programmatically set the report parameters, just don't know the best, if not the only way to extract user input.

See Bill Vaughn's reply in MSDN Forums >> Visual Studio >> Visual Studio Report Controls >> Getting Parameter Values - Need Perspective.

Wednesday, March 7, 2012

getting login id in trigger

I have a web application which connects to Microsoft SQL Server 2000 through
JDBC-ODBC Driver. The application server is JBoss and I am using connection
pooling.
When the application connects to the database it provides userid and
password which are 'sa' and 'password' respectively. They are constants for
all users. The user also type in his/her own login id which I stored in the
HTTPSession.
Problem is my triggers wants to get that login id. Is it possible?
Thanks
RizwanHi
You should not be using 'sa' as the login to SQL Server as this may be too
privileged.
The users login id is only used as authentication mechanism, therefore you
will either need to pass it as part of each call to the query/stored
procedures or possibly generate some kind of session token and pass that and
then use the session token as a link to the login.
John
"Rizwan" <hussains@.pendylum.com> wrote in message
news:5Ozce.14173$gA5.818174@.news20.bellglobal.com...
>I have a web application which connects to Microsoft SQL Server 2000
>through
> JDBC-ODBC Driver. The application server is JBoss and I am using
> connection
> pooling.
> When the application connects to the database it provides userid and
> password which are 'sa' and 'password' respectively. They are constants
> for
> all users. The user also type in his/her own login id which I stored in
> the
> HTTPSession.
> Problem is my triggers wants to get that login id. Is it possible?
>
> Thanks
> Rizwan
>|||> possibly generate some kind of session token and pass that and
> then use the session token as a link to the login.
can you explain this solution a bit more about what is session token?
thanks
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:uNfEUWWTFHA.3176@.TK2MSFTNGP09.phx.gbl...
> Hi
> You should not be using 'sa' as the login to SQL Server as this may be too
> privileged.
> The users login id is only used as authentication mechanism, therefore you
> will either need to pass it as part of each call to the query/stored
> procedures or possibly generate some kind of session token and pass that
and
> then use the session token as a link to the login.
> John
>
> "Rizwan" <hussains@.pendylum.com> wrote in message
> news:5Ozce.14173$gA5.818174@.news20.bellglobal.com...
>|||Hi
The easiest way is to store and pass the user_id that the person
authenticated with within you code. You than pass this value to each
procedure that is called e.g.
EXEC myProc @.user_id = 'John'
If you want to access the user_id in a trigger you would have to add a
user_id column to each table (say last_modified_by) and set 'John' as the
value. This way you can see who changed it by accessing the last_modified_by
in the inserted table in your trigger. Alternatively you can do the work
that the trigger would have done in the stored procedure and you would not
need the extra column.
A token would be a means of relating the session to the user, if you have a
users table it may be stored in there. That way you are not passing
something that is clearly a username, but you can get the username by
selecting the appropriate record from the users table.
HTH
John
"Rizwan" <hussains@.pendylum.com> wrote in message
news:9srde.1176$3U.240756@.news20.bellglobal.com...
> can you explain this solution a bit more about what is session token?
> thanks
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:uNfEUWWTFHA.3176@.TK2MSFTNGP09.phx.gbl...
> and
>

Sunday, February 26, 2012

Getting Images to render in HTML using Web Service (SOAP)

I have created a web app that uses the reporting services Web Service to
pull reports from the SQL Server.
The web server is on one machine, SQL Server on another and I use the web
service to get the reports. I do not use URLs in any way in order to keep as
much information hidden as possible.
I have been able to list all reports, select a report, get back the
parameters required, set the parameter values and render reports using
ReportingService.Render
HOWEVER...
The reports that work do not include charts (graphics). When I render a
report using my app, if it has no chart I can view it in HTML, PDF, TIF,
Excel and MHTML. If it has a chart then for PDF, Excel and TIF all is fine.
If I try to use HTML or MHTML I get a big empty space where my charts should
be.
In reading the BOL under ReportingService.Render Method
I found this: "StreamIds
[out] The stream identifiers. These IDs are passed to the RenderStream
method. You can use them to render the external resources (images, etc.)
that are associated with a given report. "
I have found this topic:
ms-help://MS.RSBOL80.1033/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.htm
ReportingService.RenderStream Method
I read the code, and I have tried to implement it as in the BOL. I am able
to write the images onto the web-server hard-drive, and the image place
holder properties no longer point to my SQL server (which they did at first)
but I still don't get an image.
For example, my image is actually at:
http://sandy.murdocks.on.ca/1/reports/temp/C_79_S
It is there and it works. Now my report opens in a new window since I do the
final call to open it like this:
Response.AddHeader("Content-Disposition", "attachment; filename=" &
fileName)
Response.BinaryWrite(data)
When I right click on the image place holder I get this:
file:///C:/Documents%20and%20Settings/Administrator/Local%20Settings/Temporary%20Internet%20Files/Content.IE5/QPIH2VE9/1/Reports/Temp/C_79_S
The images don't seem to get from being written on the drive, to being
picked up for display.
My code for writing the images looks like this:
If format = "HTML4.0" Then
For Each streamid In streamIDs
image = rs.RenderStream(strpath, "HTML4.0", streamid,
Nothing, Nothing, parameters, Nothing, Nothing)
Dim stream As System.IO.FileStream = _
System.IO.File.OpenWrite(Application("TempReports") &
streamid)
stream.Write(image, 0, CInt(image.Length))
stream.Close()
Next
End If
Sandy Murdock MCPlook at my previuos post:
http://www.microsoft.com/sql/community/newsgroups/dgbrowser/en-us/default.mspx?&query=rome&lang=en&cr=US&guid=&dg=microsoft.public.sqlserver.reportingsvcs&p=1&tid=a830cc14-9b06-496b-b1f4-e55ab3611f0b
Antonio
"Roger Twomey" wrote:
> I have created a web app that uses the reporting services Web Service to
> pull reports from the SQL Server.
> The web server is on one machine, SQL Server on another and I use the web
> service to get the reports. I do not use URLs in any way in order to keep as
> much information hidden as possible.
> I have been able to list all reports, select a report, get back the
> parameters required, set the parameter values and render reports using
> ReportingService.Render
> HOWEVER...
> The reports that work do not include charts (graphics). When I render a
> report using my app, if it has no chart I can view it in HTML, PDF, TIF,
> Excel and MHTML. If it has a chart then for PDF, Excel and TIF all is fine.
> If I try to use HTML or MHTML I get a big empty space where my charts should
> be.
> In reading the BOL under ReportingService.Render Method
> I found this: "StreamIds
> [out] The stream identifiers. These IDs are passed to the RenderStream
> method. You can use them to render the external resources (images, etc.)
> that are associated with a given report. "
> I have found this topic:
> ms-help://MS.RSBOL80.1033/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.htm
> ReportingService.RenderStream Method
> I read the code, and I have tried to implement it as in the BOL. I am able
> to write the images onto the web-server hard-drive, and the image place
> holder properties no longer point to my SQL server (which they did at first)
> but I still don't get an image.
> For example, my image is actually at:
> http://sandy.murdocks.on.ca/1/reports/temp/C_79_S
> It is there and it works. Now my report opens in a new window since I do the
> final call to open it like this:
> Response.AddHeader("Content-Disposition", "attachment; filename=" &
> fileName)
> Response.BinaryWrite(data)
> When I right click on the image place holder I get this:
> file:///C:/Documents%20and%20Settings/Administrator/Local%20Settings/Temporary%20Internet%20Files/Content.IE5/QPIH2VE9/1/Reports/Temp/C_79_S
> The images don't seem to get from being written on the drive, to being
> picked up for display.
> My code for writing the images looks like this:
> If format = "HTML4.0" Then
> For Each streamid In streamIDs
> image = rs.RenderStream(strpath, "HTML4.0", streamid,
> Nothing, Nothing, parameters, Nothing, Nothing)
> Dim stream As System.IO.FileStream = _
> System.IO.File.OpenWrite(Application("TempReports") &
> streamid)
> stream.Write(image, 0, CInt(image.Length))
> stream.Close()
> Next
> End If
>
> Sandy Murdock MCP
>
>|||Thank you!
I was able to take your solution and from it build one that works for me. I
was stuck.
Thanks.
"Antonio Rome" <AntonioRome@.discussions.microsoft.com> wrote in message
news:61BF34C8-98DB-4388-8E06-F5F8C1F22BBE@.microsoft.com...
> look at my previuos post:
>
http://www.microsoft.com/sql/community/newsgroups/dgbrowser/en-us/default.mspx?&query=rome&lang=en&cr=US&guid=&dg=microsoft.public.sqlserver.reportingsvcs&p=1&tid=a830cc14-9b06-496b-b1f4-e55ab3611f0b
> Antonio
>
> "Roger Twomey" wrote:
> > I have created a web app that uses the reporting services Web Service to
> > pull reports from the SQL Server.
> >
> > The web server is on one machine, SQL Server on another and I use the
web
> > service to get the reports. I do not use URLs in any way in order to
keep as
> > much information hidden as possible.
> >
> > I have been able to list all reports, select a report, get back the
> > parameters required, set the parameter values and render reports using
> > ReportingService.Render
> >
> > HOWEVER...
> >
> > The reports that work do not include charts (graphics). When I render a
> > report using my app, if it has no chart I can view it in HTML, PDF, TIF,
> > Excel and MHTML. If it has a chart then for PDF, Excel and TIF all is
fine.
> > If I try to use HTML or MHTML I get a big empty space where my charts
should
> > be.
> >
> > In reading the BOL under ReportingService.Render Method
> > I found this: "StreamIds
> > [out] The stream identifiers. These IDs are passed to the RenderStream
> > method. You can use them to render the external resources (images, etc.)
> > that are associated with a given report. "
> >
> > I have found this topic:
> > ms-help://MS.RSBOL80.1033/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.htm
> > ReportingService.RenderStream Method
> >
> > I read the code, and I have tried to implement it as in the BOL. I am
able
> > to write the images onto the web-server hard-drive, and the image place
> > holder properties no longer point to my SQL server (which they did at
first)
> > but I still don't get an image.
> >
> > For example, my image is actually at:
> > http://sandy.murdocks.on.ca/1/reports/temp/C_79_S
> >
> > It is there and it works. Now my report opens in a new window since I do
the
> > final call to open it like this:
> > Response.AddHeader("Content-Disposition", "attachment; filename=" &
> > fileName)
> > Response.BinaryWrite(data)
> >
> > When I right click on the image place holder I get this:
> >
file:///C:/Documents%20and%20Settings/Administrator/Local%20Settings/Temporary%20Internet%20Files/Content.IE5/QPIH2VE9/1/Reports/Temp/C_79_S
> >
> > The images don't seem to get from being written on the drive, to being
> > picked up for display.
> >
> > My code for writing the images looks like this:
> >
> > If format = "HTML4.0" Then
> > For Each streamid In streamIDs
> > image = rs.RenderStream(strpath, "HTML4.0", streamid,
> > Nothing, Nothing, parameters, Nothing, Nothing)
> >
> > Dim stream As System.IO.FileStream = _
> > System.IO.File.OpenWrite(Application("TempReports") &
> > streamid)
> >
> > stream.Write(image, 0, CInt(image.Length))
> > stream.Close()
> > Next
> > End If
> >
> >
> > Sandy Murdock MCP
> >
> >
> >|||I've been rendering chart images successfully for a report using the
ReportingService web services for a few weeks now. Today I had to add a
parameter to the report and now after I call my render method and loop
through the returned streamId's to get the images, I get the exception:
"rsStreamNotFound The stream cannot be found. The stream identifier that is
provided to an operation cannot be located in the report server database."
Why would this be happening?! I'm looping through the very streamId's that
the render method just returned to me!
Thanks in advance, Brian Parker