Showing posts with label functionality. Show all posts
Showing posts with label functionality. Show all posts

Friday, March 23, 2012

Extent of Dundas functionality

I'm planning to implement MS RS and to take advantage of the charting
supplied by Dundas in my web application. My question is this:
Is the chart control available for use on web pages not created via MS
RS? I will be running MS RS and MS SQL on one machine and IIS on
another. In my web app I have need to make some simple bar charts on
one page.No, the Dundas chart that shipd with Reporting Services is only available in
the context of a report. If you would like programmitic control over the
chart in your application, you would need to license it seperately.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"MarkMurphy" <murphy@.murphysw.com> wrote in message
news:e061eb57.0406180948.687427ca@.posting.google.com...
> I'm planning to implement MS RS and to take advantage of the charting
> supplied by Dundas in my web application. My question is this:
> Is the chart control available for use on web pages not created via MS
> RS? I will be running MS RS and MS SQL on one machine and IIS on
> another. In my web app I have need to make some simple bar charts on
> one page.sql

Extending ReportingServicesFileShareDeliveryProvider

Hello all,
I need to somehow extend the functionality of the
ReportingServicesFileShareDeliveryProvider so I can ship html formatted
reports along with their chart images to a file share. I've deployed some
reports using the mhtml file format, but alot of our users have problems
viewing reports in this format and our IT dept cannot figure out why...some
computers cannot view the reports unless windows system font is set to small.
Others cannot see the reports at all...and yet other have no problems.
The best thing will be to have the html format and the chart images
exported. The Printer Delivery example does not help 100% because of two
areas:
1) I'm wanting to extend an existing extension if possible...as opposed to
what the Printer Delivery example does...creating an extension from scratch
2) I want to stream the chart images out to the file share as well
Any assistence with this would be awesome. I'll hobble along in the
meantime...
-thanks, brian parkerHi Brian:
I don't see the extensions being too extensible themselves. The
parameters and delivery mechanisms are usually so disparate that it
wouldn't make any sense to inherit from an existing delivery class.
I have another sample that might be useful to you (although I haven't
taken care of delivering images, I plan to try this in the future).
The Blog Delivery Extension
http://odetocode.com/Blogs/scott/archive/2004/08/16/393.aspx
Deliver Reports To A Blog
http://odetocode.com/Blogs/scott/archive/2004/08/16/390.aspx
--
Scott
http://www.OdeToCode.com/
On Fri, 1 Oct 2004 20:03:02 -0700, Brian Parker
<BrianParker@.discussions.microsoft.com> wrote:
>Hello all,
> I need to somehow extend the functionality of the
>ReportingServicesFileShareDeliveryProvider so I can ship html formatted
>reports along with their chart images to a file share. I've deployed some
>reports using the mhtml file format, but alot of our users have problems
>viewing reports in this format and our IT dept cannot figure out why...some
>computers cannot view the reports unless windows system font is set to small.
> Others cannot see the reports at all...and yet other have no problems.
>The best thing will be to have the html format and the chart images
>exported. The Printer Delivery example does not help 100% because of two
>areas:
>1) I'm wanting to extend an existing extension if possible...as opposed to
>what the Printer Delivery example does...creating an extension from scratch
>2) I want to stream the chart images out to the file share as well
>Any assistence with this would be awesome. I'll hobble along in the
>meantime...
>-thanks, brian parker|||Scott, This worked beautifully for me. Thanks for your help...
"Scott Allen" wrote:
> Hi Brian:
> I don't see the extensions being too extensible themselves. The
> parameters and delivery mechanisms are usually so disparate that it
> wouldn't make any sense to inherit from an existing delivery class.
> I have another sample that might be useful to you (although I haven't
> taken care of delivering images, I plan to try this in the future).
> The Blog Delivery Extension
> http://odetocode.com/Blogs/scott/archive/2004/08/16/393.aspx
> Deliver Reports To A Blog
> http://odetocode.com/Blogs/scott/archive/2004/08/16/390.aspx
> --
> Scott
> http://www.OdeToCode.com/
> On Fri, 1 Oct 2004 20:03:02 -0700, Brian Parker
> <BrianParker@.discussions.microsoft.com> wrote:
> >Hello all,
> >
> > I need to somehow extend the functionality of the
> >ReportingServicesFileShareDeliveryProvider so I can ship html formatted
> >reports along with their chart images to a file share. I've deployed some
> >reports using the mhtml file format, but alot of our users have problems
> >viewing reports in this format and our IT dept cannot figure out why...some
> >computers cannot view the reports unless windows system font is set to small.
> > Others cannot see the reports at all...and yet other have no problems.
> >
> >The best thing will be to have the html format and the chart images
> >exported. The Printer Delivery example does not help 100% because of two
> >areas:
> >
> >1) I'm wanting to extend an existing extension if possible...as opposed to
> >what the Printer Delivery example does...creating an extension from scratch
> >2) I want to stream the chart images out to the file share as well
> >
> >Any assistence with this would be awesome. I'll hobble along in the
> >meantime...
> >
> >-thanks, brian parker
>sql

extending report server to support printing

Hi all
I am following the 'Deploying the Printer Delivery Sample' in order to add
printing functionality to reports.
After compiled code was put in both the reports server's and manager's bin
directories( and thier config files were
set accordingly), I can see the new printing delivery extension listed by
the server side (using the report server web service method
.ListExtensions(ExtensionTypeEnum.Delivery);).
But.. no sign for that extension when i open reports in the html viewer nor
in the subscriptions deliveries options..
I am not sure exactly where should i expect to see it if at all.. should i
create a button which will call the printing extension on click event'
I know that in the reports manager it should be listed in the subscription
deliveries options.
Another thing is that i am not sure i have added the codegroup section in
the *policy.config files correctly.
In the reports manager config file i had to remove it because it generated a
'no object reference' error..
I guess this should interfier at some point.
Thanks alot for your attention
ReaHi Rea:
Check Bryan's blog for some clarification on the codegroup placement:
http://weblogs.asp.net/bryanke/archive/2004/05/14/132110.aspx
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 26 Oct 2004 16:05:50 +0200, "Rea Peleg" <rea_p@.afek.co.il>
wrote:
>Hi all
>I am following the 'Deploying the Printer Delivery Sample' in order to add
>printing functionality to reports.
>After compiled code was put in both the reports server's and manager's bin
>directories( and thier config files were
>set accordingly), I can see the new printing delivery extension listed by
>the server side (using the report server web service method
>.ListExtensions(ExtensionTypeEnum.Delivery);).
>But.. no sign for that extension when i open reports in the html viewer nor
>in the subscriptions deliveries options..
>I am not sure exactly where should i expect to see it if at all.. should i
>create a button which will call the printing extension on click event'
>I know that in the reports manager it should be listed in the subscription
>deliveries options.
>Another thing is that i am not sure i have added the codegroup section in
>the *policy.config files correctly.
>In the reports manager config file i had to remove it because it generated a
>'no object reference' error..
>I guess this should interfier at some point.
>Thanks alot for your attention
>Rea
>
>

Wednesday, February 15, 2012

Exporting SQL Server 2005 Reporting Services reports to PDF

Hi All

I would like to implement the functionality offered by SQL Server 2005 Reporting Services that

exports the report to PDF, but I want to do it in my C# 2005 application.

Can I do this? How?

Please help.

khuzwayom

Sure. See code here. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1715591&SiteID=1

>L<

|||

Thank you so much Lisa, Iwill try your code tomorrow.

Don't you import anything or add any references?

Thank You

khuzwayom

|||

>>

Don't you import anything or add any references?

<<

I've fully-namespaced all the instancing of objects in that sample, I'm pretty sure -- so you will probably have no problem figuring out what references are required. If you do, holler...

>L<

|||

Lisa,

I have a question with this particular line and not sure how to use it my project.

http://localhost/reportserver/?/Report+Project1/TestCity&rs:Command=Render&rs:format=EXCEL)

In my project based on the values sent by a ddl i am displaying 2 kinds of reports. and they are being stored in the report server. and when clicks on the Export link button in the report viewer control, i want to save that file as an PDF. So how should i do it?

Dim ox As System.Net.HttpWebRequest = _

System.Net.HttpWebRequest.Create _

(http://192.168.0235/Statements/StatementMain&rs:Command=Render&rs:format=PDF)

i tried using ur code snipet and got the following error

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Source Error:

Line 123: ' the line above may not work for you, you may have to provide credential information with more work Line 124: Line 125: Dim oy As System.Net.HttpWebResponse = ox.GetResponse() Line 126: Dim raw As System.IO.FileStream = New System.IO.FileStream("c:\Documents and Settings\Karen\Desktop\p.pdf", IO.FileMode.Create) Line 127: ' for a PDF, change the extension in the line above, along with changing its

any help will be appreciated.

Regards

Karen

|||

I think your problem is simply figuring out the right URL, Karen.

I don't think you should be using http://192.168.0235/Statements, although it is hard for me to say exactly what the right URL is for you.

Here is what I think you should do:

1) check your Reporting Services configuration. There are two web server applications set up for RS. One is the Report Manager site, one is the Report Server site.

By default, the former is http://<server>/Reports, and the other is http://<server>/ReportServer. The latter is the one we want to use.

OK so far? I don't know the web site aliases or virtual directories on your box, but the web application we want to talk to is the Report Server.

2) "Visit" that site interactively in your browser. It does not look like Report Manager. You should see browable directories, instead.

3) In your browser, drill down to the report that you want to use from the ReportServer root. You can actually run the report interactively this way. This should give you most of the URL that you need.

4) Finish off the URL with parameters as shown in my sample code for your programmatic pull.

If this doesn't help, then please check the RS docs -- search using the term "URL access". You will find this described in detail.

HTH,

>L<

|||

Lisa,

Is there is a way i can capture the event when the user clicks on the export button?

Regards,

Karen

|||

Karen, this might be capturable in the ReportRefresh event, but just in case you're trying to do this to find out what the URL is... that is really the wrong way to go about the task... I hope the instructions I wrote earlier make sense to you, if not where are you stuck?

>L<

|||

Lisa, thanks a lot for your answer, what i am really trying to do is let the user view the report using the report viewer control and after he checks whether the data is correct on the reports, then i wanted to capture the export button event and save the report link to the database instead of letting the user save it somewhere else. Any ways i will try looking into the reportrefresh event to see if i can do it.

Regards

Karen

|||

Sorry, Karen, we've been having this discussion on another thread and it looks likeReportRefresh will *not* work. I suggested a couple of other events that might solve the other guy's need to capture this event, but I'm not going to refer you there because I really don't think that this is pertinent to what *you* are "really trying to do".

You are using the reportviewer as a preview and then capturing the PDF after user validation, fine. My point is that capturing the export event is not the right way to go about the second action. Having a separate button on the form that indicates "yes, go ahead and save the PDF, the results are correct", *outside* the reportviewer control is the way to go about it.

When your server receives that user response it can then save the PDF whereever you want it to go, using the code discussed here previously, and the proper URL access.

Anyway, that's my opinion...

>L<

|||

Hi Lisa,

We are using the Render method to generate report in pdf format.

Currently around 2 documents (2 pdf files are being generated).

How can we merge the files generated into just 1 pdf file?

I tried merging the byte[] returned. The output displays only the last pdf eventhough the size of the new document equals sum of the size of the other 2 documents.

|||

Hi AS2007,

The short answer to your question is "a PDF document has a specialized format, which includes a prolog or header that describes the whole document. So you can not just put two of them together like that. But it is possible to do it, certainly from a C# app. You just need to go back to first principles. (Think about : What is a PDF, really?)"

Here's the long answer:

The right way would be to take the output of the two reports, whether as EMFs or a PDF or whatever, and push them out to postscript, from whence they can be converted to a PDF using freely-available tools.

I am going to quote myself from another forum <sigh> because I've answered this question a whole bunch of times for programmers in different environments.

There is other stuff that I don't say in this particular post about how to dynamically check for a PostScript driver setup, and dynamically add such a setup if necessary, brand it to your app, etc. But all that is standard Windows stuff. There is nothing specific about RS in any of it.

HTH,

>L<

-

Is this using the ReportViewer control (client-side) or server side?

IAC -- here is what I know on this issue,which is not particular Reporting
Services specific:

1) It is easy to move multiple source files into a PDF file if the source
files are in postscript.

2) Most printing engines can write postscript files simply by specifying a
postscript print driver

3) postscript drivers come with the OS.

4) It is easier to manage this type of activity client-side than
server-side, for many reasons.

Here is some advice for you:

You can find a demo app with code for printing reports without UI, using the
ReportViewer control, on this page. http://www.gotreportviewer.com/

I expect it can be adapted to go to a ps printer driver and given target
file information (or the ps driver setup can be set to go to a file target
explicitly -- but that doesn't seem thread safe to me).

Then you can use standard postscript to PDF capabilites to convert the
string of files you just wrote out. I use Ghostscript to do this, you don't
need Adobe and you don't need any UI for this step either.

You can learn about Ghostscript here http://www.ghostscript.com/awki There
is a overview of command-line switches here
http://ghostscript.com/doc/8.54/Use.htm#Options -- for your purposes, pay
particular attention to the ability to create a commandfile listing all the
switches as well as all the files you wish to process in this run (more
flexible than listing the files directly on the command line if your list
may be long). You may prefer to use the API directly (DLLs rather than
command-line). It's quite extensive.

>L<

"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:BB990321-62C2-4EEC-9535-9C870DE7BC6A@.microsoft.com...
> Is it possible to render multiple reports and then export them to 1 PDF
> file?
> If so, how can this be accomplished?