Showing posts with label print. Show all posts
Showing posts with label print. Show all posts

Sunday, March 25, 2012

Automatically print multiple copies of the same report with different label on letter size p

Hi,

I am new to reporting services and I'm really stuck on a design problem. Can someone please help me?

I would like to design my own print function. When a user clicks on the print icon (preferably the one that came with reporting services), the report is automatically printed twice, once with "For Person A" and the second time with "For Person B" on it. It doesn't matter where these two labels are placed on the page. These two reports need to be printed on letter-size paper regardless of user's selection. How do I do this with minimum amount of code?

Any help would be greatly appreciated!

Depending on how the names of person A and person B actually get onto the report, you could add a grouping by person with a page break and actually make the report have 2 pages, 1 per person.|||

Hi

Thanks for your help.

The names are constant - ie they can be hardcoded.

If I make the report 1 page per person, does that mean the user will see two copies of the report in preview? Is there a way so that the user sees one copy but can print multiple copies with a single click?

Thanks!

|||

Hi

If there is a field with "Person A" and "Person B" you can add
a grouping by that field and set 'Page Break at end' on the grouping to true.

If this is a static value that has to be hard coded I cannot think of anything.

Problem when using the group by person approach is that the report will display
twice in the browser, each seperated by a pagebreak.

G

|||More specifically, the report will indicate that it has multiple pages (hence allowing the user to browse to the next page) but by default only the first page will show. When you export or print, all pages will be outputted.|||

Is there a way to do this without showing multiple copies (show one copy of the report in preview but prints two)?

Ideally I would like to create a print function that can be used across all reports, instead of changing all existing reports.

Thanks

|||

In that case your only other option is write your own rendering extension. That's quite involved and probably not how far you would want to go in this case.

You can't override the default print function.

|||Ok, got it. Thanks for your help :)

Tuesday, March 20, 2012

automatic report printing - sp2

Hi,
Is it possible to print the report automatically as it loads?
Shimonthere is a sample to add a delivery extension to print a report.
but this works for scheduled reports.
SP2 allow the end user to directly print the report without having to export
it in PDF format.
"'? ?." <@.discussions.microsoft.com> wrote in message
news:37A5CE58-ADFF-4FAC-B04F-519D7143E7C9@.microsoft.com...
> Hi,
> Is it possible to print the report automatically as it loads?
> Shimon|||I know there is a new option to directly print the report.
My question is: can I invoke the print action directly when the report loads
- without the need to press the print button?
"Jéjé" wrote:
> there is a sample to add a delivery extension to print a report.
> but this works for scheduled reports.
> SP2 allow the end user to directly print the report without having to export
> it in PDF format.
> "'? ?." <@.discussions.microsoft.com> wrote in message
> news:37A5CE58-ADFF-4FAC-B04F-519D7143E7C9@.microsoft.com...
> > Hi,
> >
> > Is it possible to print the report automatically as it loads?
> >
> > Shimon
>
>|||sorry, but I don't see any rs command to render to the printer directly.
The current print preview & print functionality is an ActiveX control.
I presume that this ActiveX simply call reportserver to generates a TIFF
image (or PDF or any other format) and send it the printer.
Its a client side event and action, not a server side generation.
"'? ?." <@.discussions.microsoft.com> wrote in message
news:062F8D4D-EEE7-4400-AC10-147363442D37@.microsoft.com...
>I know there is a new option to directly print the report.
> My question is: can I invoke the print action directly when the report
> loads
> - without the need to press the print button?
> "Jéjé" wrote:
>> there is a sample to add a delivery extension to print a report.
>> but this works for scheduled reports.
>> SP2 allow the end user to directly print the report without having to
>> export
>> it in PDF format.
>> "'? ?." <@.discussions.microsoft.com> wrote in message
>> news:37A5CE58-ADFF-4FAC-B04F-519D7143E7C9@.microsoft.com...
>> > Hi,
>> >
>> > Is it possible to print the report automatically as it loads?
>> >
>> > Shimon
>>|||This could probably be made to work if the report web page was hosted by
another controlling app. E.g. if it is a frame in a larger web page than
the controlling page could trigger the print. Or if it's a vb app with a
web browser control, then the exe can control what occurs on the web page.
"'? ?." <@.discussions.microsoft.com> wrote in message
news:37A5CE58-ADFF-4FAC-B04F-519D7143E7C9@.microsoft.com...
> Hi,
> Is it possible to print the report automatically as it loads?
> Shimon

Automatic refresh

If there a way to have reports automatically refesh in in print preview mode - without hitting the refresh key or cmd5 key on the toolbar. CR VER 8.5 or 9.0Is there a way to automatically refresh a screen in the preview mode (without hitting cmd 5 or refresh key on the toolbar)

Monday, March 19, 2012

Automatic Printing

Hello All,
Thanks in advance for helping me to solve my problem. I want to print
the invoices automatically through Reporting Services. I am sending a
parameter to the Report which may contains one or more pages in it,
when i press any button, these report should print automatically with
all pages and page numbers without displaying it on screen. I tried
Pring Sample Delivery Services but i dont know why it wont work, when i
subscribe for that Delivery service it shows me error. Can anybody help
me how to solve this? again my requirement is to print invoices
automatically with all number of pages which accepts parameter (for ex.
Invoicenumber).
Thank you !
Waiting for Shower of answers
RajI think you will have to write custom delivery extension (that delivers
the report to a printer) at a predetermined schedule.
if you want to send the report the printer interactively (as i
understand from your use case), can you use the browser print button?
I read on BOL that ssrs 2005 has advanced print features.
Raj wrote:
> Hello All,
> Thanks in advance for helping me to solve my problem. I want to print
> the invoices automatically through Reporting Services. I am sending a
> parameter to the Report which may contains one or more pages in it,
> when i press any button, these report should print automatically with
> all pages and page numbers without displaying it on screen. I tried
> Pring Sample Delivery Services but i dont know why it wont work, when i
> subscribe for that Delivery service it shows me error. Can anybody help
> me how to solve this? again my requirement is to print invoices
> automatically with all number of pages which accepts parameter (for ex.
> Invoicenumber).
> Thank you !
> Waiting for Shower of answers
> Raj

Thursday, March 8, 2012

Automated Printing of Report

I have a report that I want to print. This report is invoked from a windows
app. The only thing I have been able to figure out so far is displaying the
report in a browser. Is there a way to programmatically send my report to
the printer without viewing in browser first.
I would like it to print just as it does when I preview and print from the
designer.
--
Don
--
DonHmm, the only way to print from anywhere (designer or otherwise) is to
export to another format (like PDF) and print. Printing in any other way
just prints the currently showing page. Render as PDF and print that. You
could use web services to render as PDF, save the file and then print it.
Note that with SP2 there will be client supported printing (Yeah!). Don't
know when SP2 will be.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Don" <Don@.discussions.microsoft.com> wrote in message
news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> I have a report that I want to print. This report is invoked from a
windows
> app. The only thing I have been able to figure out so far is displaying
the
> report in a browser. Is there a way to programmatically send my report to
> the printer without viewing in browser first.
> I would like it to print just as it does when I preview and print from the
> designer.
> --
> Don
> --
> Don|||you can print from the designer by clicking on the Preview tab and just to
the right of the page number range buttons and the refresh button there is a
print preview icon, click it and the print icon will be enabled. you can
print it from there.
"Bruce L-C [MVP]" wrote:
> Hmm, the only way to print from anywhere (designer or otherwise) is to
> export to another format (like PDF) and print. Printing in any other way
> just prints the currently showing page. Render as PDF and print that. You
> could use web services to render as PDF, save the file and then print it.
> Note that with SP2 there will be client supported printing (Yeah!). Don't
> know when SP2 will be.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Don" <Don@.discussions.microsoft.com> wrote in message
> news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> > I have a report that I want to print. This report is invoked from a
> windows
> > app. The only thing I have been able to figure out so far is displaying
> the
> > report in a browser. Is there a way to programmatically send my report to
> > the printer without viewing in browser first.
> >
> > I would like it to print just as it does when I preview and print from the
> > designer.
> >
> > --
> > Don
> > --
> > Don
>
>|||How about that, I've never paid attention to that. I guess since there was
no printing from deployed reports I've never paid attention to it. That's a
little embarassing. I decided to see what it did and at least for me the
print preview is totally flaky. Nothing shows, I click the print button
after the preview and then the preview shows up. I click the print button
after the print preview and cancel it and I see part of the page.
Behind the scenes it must be doing the same thing that you could do. I am
guessing that it is rendering it in pdf and showing in the embedded browser
control and then telling it to print.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Don" <Don@.discussions.microsoft.com> wrote in message
news:78D74B64-F4C7-47C9-863E-6D905AE1A3F1@.microsoft.com...
> you can print from the designer by clicking on the Preview tab and just to
> the right of the page number range buttons and the refresh button there is
a
> print preview icon, click it and the print icon will be enabled. you can
> print it from there.
> "Bruce L-C [MVP]" wrote:
> > Hmm, the only way to print from anywhere (designer or otherwise) is to
> > export to another format (like PDF) and print. Printing in any other way
> > just prints the currently showing page. Render as PDF and print that.
You
> > could use web services to render as PDF, save the file and then print
it.
> >
> > Note that with SP2 there will be client supported printing (Yeah!).
Don't
> > know when SP2 will be.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Don" <Don@.discussions.microsoft.com> wrote in message
> > news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> > > I have a report that I want to print. This report is invoked from a
> > windows
> > > app. The only thing I have been able to figure out so far is
displaying
> > the
> > > report in a browser. Is there a way to programmatically send my
report to
> > > the printer without viewing in browser first.
> > >
> > > I would like it to print just as it does when I preview and print from
the
> > > designer.
> > >
> > > --
> > > Don
> > > --
> > > Don
> >
> >
> >|||Have you tried installing and using the sample print delivery extension? Look
in the samples section of the Reporting Services Books Online for how to
install it. I believe it is just a sample which therefore is not supported,
and I have never used it myself.
Charles Kangai, MCT, MCDBA
"Don" wrote:
> I have a report that I want to print. This report is invoked from a windows
> app. The only thing I have been able to figure out so far is displaying the
> report in a browser. Is there a way to programmatically send my report to
> the printer without viewing in browser first.
> I would like it to print just as it does when I preview and print from the
> designer.
> --
> Don
> --
> Don|||If you use DebugLocal configuration mode and 'Run' the report, it comes
up with a specialised viewer with a print button. I believe this uses
the RS.exe command line utility - but I don't know how!
Maybe you could utilise this somehow?
Also the following link in BOL shows you how to develop your own
renderer (if you're so inclined!);
ms-help://MS.RSBOL80.1033/RSAMPLES/htm/rss_sampleapps_v1_0q28.htm
Regards
Chris
Bruce L-C [MVP] wrote:
> How about that, I've never paid attention to that. I guess since
> there was no printing from deployed reports I've never paid attention
> to it. That's a little embarassing. I decided to see what it did and
> at least for me the print preview is totally flaky. Nothing shows, I
> click the print button after the preview and then the preview shows
> up. I click the print button after the print preview and cancel it
> and I see part of the page.
> Behind the scenes it must be doing the same thing that you could do.
> I am guessing that it is rendering it in pdf and showing in the
> embedded browser control and then telling it to print.

Monday, February 13, 2012

Auto Print

I am using Visual studio 2005. This may be a vb question but it deals with reporting services.

I have a local report using the reportviewer control. (rdcl 2005 fmt)

It displays perfectly, and when i click the print button it prints flawlessly.

How do i print the document to the default printer automatically?

This seems like a basic function that i can't seem to find the answer to.

Thanx

Jerry Cicierega

I found the answer. Its not as bad as it looks. Thois is a form called "slip.vb" I am printing to a slip printer. The form has a rpt viewer on it. The form nevers shows. It is just used as a containor for the report. I created the report as an RDL report. I coppied it into the program folder and re-named it to a RDCL extension. I then established the datasource. and it worked interactivly. I then added the following code and presto. Auto Print. I also asume the default printer is the printer of choice.

Imports System.IO

Imports System.Data

Imports System.Text

Imports System.Drawing.Imaging

Imports System.Drawing.Printing

Imports System.Collections.Generic

Imports Microsoft.Reporting.WinForms

Public Class Slip

Private m_currentPageIndex As Integer

Private m_streams As IList(Of Stream)

Public Sub Print_Slip()

Me.TxnHistoryTableAdapter.Connection.ConnectionString = My.Utilities.ConnectionString

Me.TxnHistoryTableAdapter.FillBy(Me.PCZonDataSet.TxnHistory, My.GlobalVariables.ComputerData.ComputerName, My.GlobalVariables.ComputerData.Sequencenumber)

Export(Me.ReportViewer1.LocalReport)

m_currentPageIndex = 0

Print()

End Sub

Private Function CreateStream(ByVal name As String, _

ByVal fileNameExtension As String, _

ByVal encoding As Encoding, ByVal mimeType As String, _

ByVal willSeek As Boolean) As Stream

Dim stream As Stream = New FileStream(name + "." + fileNameExtension, FileMode.Create)

m_streams.Add(stream)

Return stream

End Function

Private Sub Export(ByVal report As LocalReport)

Dim deviceInfo As String = _

"<DeviceInfo>" + _

" <OutputFormat>EMF</OutputFormat>" + _

" <PageWidth>9in</PageWidth>" + _

" <PageHeight>11in</PageHeight>" + _

" <MarginTop>0.0in</MarginTop>" + _

" <MarginLeft>0.0in</MarginLeft>" + _

" <MarginRight>0.25in</MarginRight>" + _

" <MarginBottom>0.25in</MarginBottom>" + _

"</DeviceInfo>"

Dim warnings() As Warning = Nothing

m_streams = New List(Of Stream)()

report.Render("Image", deviceInfo, _

AddressOf CreateStream, warnings)

Dim stream As Stream

For Each stream In m_streams

stream.Position = 0

Next

End Sub

Private Sub Print()

If m_streams Is Nothing Or m_streams.Count = 0 Then

Return

End If

Dim printDoc As New PrintDocument()

AddHandler printDoc.PrintPage, AddressOf PrintPage

printDoc.Print()

If Not (m_streams Is Nothing) Then

Dim stream As Stream

For Each stream In m_streams

stream.Close()

Next

m_streams = Nothing

End If

End Sub

Private Sub PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)

Dim pageImage As New Metafile(m_streams(m_currentPageIndex))

ev.Graphics.DrawImage(pageImage, ev.PageBounds)

m_currentPageIndex += 1

ev.HasMorePages = (m_currentPageIndex < m_streams.Count)

End Sub

End Class