Wednesday, March 28, 2012
PDF Printing example
service?
The one in the documentation does not stream the file back to the browser.
Thanks in advance.this is just a snippet, i'm assuming you already have the basics of using the
web service and getting a report, but just need to know the pdf portion:
report =rs.Render(reportPath,format,historyID,devInfo,parameters,credentials,showHideToggle,out
encoding, out mimeType, out optionalParams, out optionalWarnings, out
streamIDs);
Response.ClearContent();
Response.AppendHeader("content-length", report.Length.ToString());
Response.ContentType = "application/pdf";
Response.BinaryWrite(report);
Response.Flush();
Response.Close();
"RichieRich" wrote:
> Does anyone have a good example of printing to a PDF file using the web
> service?
> The one in the documentation does not stream the file back to the browser.
> Thanks in advance.|||Thanks much. The last time I tried the code from the documentation, I got a
401 error...Authorization required. Do I need to give write rpermissions on
a folder? And which user gets it.
Thanks again.
"mike" wrote:
> this is just a snippet, i'm assuming you already have the basics of using the
> web service and getting a report, but just need to know the pdf portion:
> report => rs.Render(reportPath,format,historyID,devInfo,parameters,credentials,showHideToggle,out
> encoding, out mimeType, out optionalParams, out optionalWarnings, out
> streamIDs);
> Response.ClearContent();
> Response.AppendHeader("content-length", report.Length.ToString());
> Response.ContentType = "application/pdf";
> Response.BinaryWrite(report);
> Response.Flush();
> Response.Close();
>
> "RichieRich" wrote:
> > Does anyone have a good example of printing to a PDF file using the web
> > service?
> >
> > The one in the documentation does not stream the file back to the browser.
> >
> > Thanks in advance.
PDF printing error
I use the printer is HP LeasrJet 5000N.
And I cannont print the report. The error is the following:
Error: limitcheck
Offending command: string
stack: 173155Hi,
I am having this problem with printing PDF.I use the web services to export
the PDF to the client sides. And then open / save the file to print out. This
report have bar-code and chinese fonts.
Case 1:
I try to use the Acrobat Reader 6.0 to print this report is property. But I
use the Acrobat Reader 5.1 to print the reports, then show the error message
as following:
ERROR: limitcheck
OFFENDING COMMAND: string
STACK:
173155
(
(
)
(
)
(
)
......
Case 2:
I also try to use the "HP LaserJet 5000 Series PCL" printer to print the
same report. It is work fine. But I use the "HP Laser Jet 5000 Series PS"
printer to print the report, then the error message is shown:
ERROR: limitcheck
OFFENDING COMMAND: string
STACK:
173155
(
(
)
(
)
(
)
......
*Remark: My company policy is not allow the user to change the basic PC
config.
Does anyone know how to solve this problem? Please help.
Thanks,
Dale Ho
Monday, March 26, 2012
PDF expport and printing problem
I am trying to export a report to PDF format and receive this error:
Exception of type
Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
thrown. (rrRenderingError) Get Online Help
Exception of type
Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
thrown.
Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index
When I try to print my report this print error is displayed:
"An error occured during printing. (0x80004005)"
The report exports just fine to Excel and other reports export to PDF &
print just fine.
A previous post from Bruce Johnson referred to report language settings and
I am not sure which setting to verify.
I am running Reporting Services SP2.
Thanks,
PaulHello Paul -
Did you ever figure this error out? I am having the same issue. Thanks.
Mitch
mlake@.3plcorp.com
"Paul Ennamorato" wrote:
> Hello -
> I am trying to export a report to PDF format and receive this error:
> Exception of type
> Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> thrown. (rrRenderingError) Get Online Help
> Exception of type
> Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> thrown.
> Index was out of range. Must be non-negative and less than the size of the
> collection. Parameter name: index
> When I try to print my report this print error is displayed:
> "An error occured during printing. (0x80004005)"
> The report exports just fine to Excel and other reports export to PDF &
> print just fine.
> A previous post from Bruce Johnson referred to report language settings and
> I am not sure which setting to verify.
> I am running Reporting Services SP2.
> Thanks,
> Paul|||Mitch -
Thanks for your reply. We have not yet determined what causes this error
message.
Regards,
Paul
"Mitch Lake" wrote:
> Hello Paul -
> Did you ever figure this error out? I am having the same issue. Thanks.
> Mitch
> mlake@.3plcorp.com
> "Paul Ennamorato" wrote:
> > Hello -
> >
> > I am trying to export a report to PDF format and receive this error:
> >
> > Exception of type
> > Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> > thrown. (rrRenderingError) Get Online Help
> > Exception of type
> > Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> > thrown.
> > Index was out of range. Must be non-negative and less than the size of the
> > collection. Parameter name: index
> >
> > When I try to print my report this print error is displayed:
> >
> > "An error occured during printing. (0x80004005)"
> >
> > The report exports just fine to Excel and other reports export to PDF &
> > print just fine.
> >
> > A previous post from Bruce Johnson referred to report language settings and
> > I am not sure which setting to verify.
> >
> > I am running Reporting Services SP2.
> >
> > Thanks,
> >
> > Paul|||Well, I never did figure out what was happening, but SP2 seems to have fixed
the problem. I was able to isolate it down to a particular group footer and
then got the "bright" idea to check for a service pack. Installed to
development and server and all is good again.
Mitch
"Paul Ennamorato" wrote:
> Mitch -
> Thanks for your reply. We have not yet determined what causes this error
> message.
> Regards,
> Paul
> "Mitch Lake" wrote:
> > Hello Paul -
> >
> > Did you ever figure this error out? I am having the same issue. Thanks.
> >
> > Mitch
> > mlake@.3plcorp.com
> >
> > "Paul Ennamorato" wrote:
> >
> > > Hello -
> > >
> > > I am trying to export a report to PDF format and receive this error:
> > >
> > > Exception of type
> > > Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> > > thrown. (rrRenderingError) Get Online Help
> > > Exception of type
> > > Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> > > thrown.
> > > Index was out of range. Must be non-negative and less than the size of the
> > > collection. Parameter name: index
> > >
> > > When I try to print my report this print error is displayed:
> > >
> > > "An error occured during printing. (0x80004005)"
> > >
> > > The report exports just fine to Excel and other reports export to PDF &
> > > print just fine.
> > >
> > > A previous post from Bruce Johnson referred to report language settings and
> > > I am not sure which setting to verify.
> > >
> > > I am running Reporting Services SP2.
> > >
> > > Thanks,
> > >
> > > Paul
PDF Export Never Prints Landscape
I would like to know if there is a fix to the PDF export always
printing in Portrait? No matter what I try with my RDL, it always
exports the report to Portrait, is there a way to programmatically
tell the reports server to always export to Landscape with exporting
to PDF? With Excel, MHTML, HTML...they work fine, I am able to print
the exported data in landscape, just not when I export to .PDF
Thank you in advance for ANY light you can shine on this!
Kind Regards,
Patrick
please reply to shidoshixx<AT>hotmail<dot>com (You know what to
change...)Hi,
Swap the Height and Width in Reporting Service and Design the report
Then Export. Check the option Auto-Rotate and Center in Print Dialog of PDF
Then you would get the print in landscape.
Hope this Helps
Ponnurangam
"Patrick" <patrick@.comminnovations.com> wrote in message
news:1599d577.0410181047.67387031@.posting.google.com...
> Hello,
> I would like to know if there is a fix to the PDF export always
> printing in Portrait? No matter what I try with my RDL, it always
> exports the report to Portrait, is there a way to programmatically
> tell the reports server to always export to Landscape with exporting
> to PDF? With Excel, MHTML, HTML...they work fine, I am able to print
> the exported data in landscape, just not when I export to .PDF
> Thank you in advance for ANY light you can shine on this!
> Kind Regards,
> Patrick
> please reply to shidoshixx<AT>hotmail<dot>com (You know what to
> change...)|||Ponnurangam,
Thank you for your reply, that has fixed it. This has saved me alot of
headaches, if there is any help I can extend to you, please do not hesitate
to ask.
Thanks a million!!!
Patrick
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message news:<OTD8SjatEHA.3564@.tk2msftngp13.phx.gbl>...
> Hi,
> Swap the Height and Width in Reporting Service and Design the report
> Then Export. Check the option Auto-Rotate and Center in Print Dialog of PDF
> Then you would get the print in landscape.
> Hope this Helps
> Ponnurangam
> "Patrick" <patrick@.comminnovations.com> wrote in message
> news:1599d577.0410181047.67387031@.posting.google.com...
> > Hello,
> >
> > I would like to know if there is a fix to the PDF export always
> > printing in Portrait? No matter what I try with my RDL, it always
> > exports the report to Portrait, is there a way to programmatically
> > tell the reports server to always export to Landscape with exporting
> > to PDF? With Excel, MHTML, HTML...they work fine, I am able to print
> > the exported data in landscape, just not when I export to .PDF
> >
> > Thank you in advance for ANY light you can shine on this!
> >
> > Kind Regards,
> > Patrick
> > please reply to shidoshixx<AT>hotmail<dot>com (You know what to
> > change...)|||Where is the "Check the option Auto-Rotate and Center in Print Dialog of
PDF"
I can't find it on my Print Dialog. Could my print Dialog be different?
Thanks in advance!
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message
news:OTD8SjatEHA.3564@.tk2msftngp13.phx.gbl...
> Hi,
> Swap the Height and Width in Reporting Service and Design the report
> Then Export. Check the option Auto-Rotate and Center in Print Dialog of
> Then you would get the print in landscape.
> Hope this Helps
> Ponnurangam
> "Patrick" <patrick@.comminnovations.com> wrote in message
> news:1599d577.0410181047.67387031@.posting.google.com...
> > Hello,
> >
> > I would like to know if there is a fix to the PDF export always
> > printing in Portrait? No matter what I try with my RDL, it always
> > exports the report to Portrait, is there a way to programmatically
> > tell the reports server to always export to Landscape with exporting
> > to PDF? With Excel, MHTML, HTML...they work fine, I am able to print
> > the exported data in landscape, just not when I export to .PDF
> >
> > Thank you in advance for ANY light you can shine on this!
> >
> > Kind Regards,
> > Patrick
> > please reply to shidoshixx<AT>hotmail<dot>com (You know what to
> > change...)
>
Friday, March 23, 2012
PC shutdown while printing from report
Hi all,
I m new to SQL Server Reporting Service. I hope you guys can find some solutions to my problem.
When i try to print from report's toolbar, my pc suddenly restart. and I thought it may be some printer driver
conflict, and check my event logs also. but i can't find any error or warning message there at all.
Can anybody knows the source of the problem and solution.
Regards,
gakuci
Any luck with this? Are you aware of any special anti virus/spy software that could be causing this?
|||Looks like this is a driver problem. Try this KB article
http://support.microsoft.com/kb/935843
Wednesday, March 21, 2012
Pause between pages when printing RS report
On the report I use a list control to display multiple records per page.
When printing the report (which currently produces over 500 pages - future printings of this report will not be nearly so large), the printer pauses between each page as if they are seperate print jobs. This is an HP LaserJet 5Si that normally cranks out reports very fast.
The only thing I can think of that might contribute to this sort of behavior is the fact that I set my margin sizes to 0in to get as much design room on the report as possible. Could that cause this sort of behavior?
Just bumping this topic. I'm very much in need of an answer on this. I've tried different settings for the margins as well, but anything other than 0in. causes extra pages to be printed.
How can I eliminate the pause between pages?|||How are you printing the report? Are you using the printing via the web or using delivery? I have not heard of this sort of behavior. The only thing I can think of is that the server is busy rendering each page and is causing the printer to wait for additional pages.
-Daniel|||Thanks for the reply.
I am printing the reports via the web. This behavior is exhibited when printing them from the Visual Studio design environment as well.
|||Most likely, your printer is able to print faster than the ability of the server to generate the pages. This could happen if the pages are complex and/or have lots of images. The overall time should be similar to exporting the report to an image format.|||I guess I can see where the report generation might be the bottleneck, however it is just a standard report with a basic list control displaying some 20-25 data fields per record. There are no images being used at all. The most graphically intensive element is a light gray filled box around the report title.
Honestly, I can't imagine a much simpler report. That is why I have trouble accepting this as being as good as it gets.
|||The fact that you see this in the designer as well as the server seems to mean that the issue may lie elsewhere. Do any other reports behave this way? Are you able to try any other printers?
When you print from the web you can preview the report first. Can you first preview the entire report before printing? By doing this you will have downloaded all the pages to the client, when you actually print you will just be sending the emf file to the printer. If the problem still occurs then it is most likely an issue downstream from RS if it doesn't occur then RS would have some issue.
Thanks.
-Daniel
Pause between pages when printing RS report
On the report I use a list control to display multiple records per page.
When printing the report (which currently produces over 500 pages - future printings of this report will not be nearly so large), the printer pauses between each page as if they are seperate print jobs. This is an HP LaserJet 5Si that normally cranks out reports very fast.
The only thing I can think of that might contribute to this sort of behavior is the fact that I set my margin sizes to 0in to get as much design room on the report as possible. Could that cause this sort of behavior?Just bumping this topic. I'm very much in need of an answer on this. I've tried different settings for the margins as well, but anything other than 0in. causes extra pages to be printed.
How can I eliminate the pause between pages?|||How are you printing the report? Are you using the printing via the web or using delivery? I have not heard of this sort of behavior. The only thing I can think of is that the server is busy rendering each page and is causing the printer to wait for additional pages.
-Daniel|||Thanks for the reply.
I am printing the reports via the web. This behavior is exhibited when printing them from the Visual Studio design environment as well.|||Most likely, your printer is able to print faster than the ability of the server to generate the pages. This could happen if the pages are complex and/or have lots of images. The overall time should be similar to exporting the report to an image format.|||I guess I can see where the report generation might be the bottleneck, however it is just a standard report with a basic list control displaying some 20-25 data fields per record. There are no images being used at all. The most graphically intensive element is a light gray filled box around the report title.
Honestly, I can't imagine a much simpler report. That is why I have trouble accepting this as being as good as it gets. |||The fact that you see this in the designer as well as the server seems to mean that the issue may lie elsewhere. Do any other reports behave this way? Are you able to try any other printers?
When you print from the web you can preview the report first. Can you first preview the entire report before printing? By doing this you will have downloaded all the pages to the client, when you actually print you will just be sending the emf file to the printer. If the problem still occurs then it is most likely an issue downstream from RS if it doesn't occur then RS would have some issue.
Thanks.
-Danielsql