Transact SQL :: Printing Report - Capture Actual Pages In A Duplex Printing Job

Aug 10, 2015

So I have been asked by our sustainability person to create report from our printing data that actually shows the number of pieces of paper used. This is easy enough for single-sided printing, but when printing in duplex the software does not take into account that 3 printing pages actually equates to 2 pieces of paper. I know this sounds simple, but say I have a print job record that looks like this:

Submitted printed total_pages duplex
8/10/2015 8/10/2015 42 1                       

This is a print jobs that if done correctly is actually 21 pages( duplex printing). If the job is say total_pages =5 I cant just divide by 2 because its actually using 3 pieces of paper ( yes they are wanting this data don't ask why). How can I adjust some sql to accurately depict 5 pages, front and back, as 3 pieces of paper?

View 2 Replies


ADVERTISEMENT

Duplex Printing In Reporting Services

Sep 13, 2007

I have been working on this problem for days. I have a report that is grouped
and will be printed duplex (front and back). There is a page break after each
group. I want to ensure that the start of a new group does not end up printed
on the back side of an old group. For example:



Page 1 (printed on front side of paper): group 1
Page 2 (printed on back side of paper): more group 1
Page 3 (printed on front side of paper): more group 1
Page 4 (printed on on back side of paper): group 2 <--- This is a problem


I need:



Page 1 (front side): group 1
Page 2 (back side): more group 1
Page 3 (front side): more group 1
Page 4 (back side): <This Page Intentionally Left Blank>
Page 5 (front side): group 2


Issues that I've run into include the fact that SSRS renders the entire body
first, before rendering the header/footer. This prevents the body of the
report from knowing which page it will end up on when it is rendered (and is
also why you cannot reference Globals!PageNumber from the body).


The restriction above also prevents using a variable in custom code to know
when to generate a page break. If you set this variable in the header/footer
then the body will never see it as the entire body is rendered first and will
therefore only see the initial state of the variable.


I have seen this issue posted in a number of places,
but no one ever has a solution to this (except switching back to
Crystal Reports). Have any MVPs ever addressed this issue? I am
really hoping someone can offer a good solution or work-around.



View 7 Replies View Related

Report Printing Multiple Pages, Only Want One

Aug 8, 2007

I have a report that only has one page when previewed but when it's printed there are two pages. This is a problem because I get two printed pages to my report with "1 of 2 pages" on the first page and "2 of 2 pages" on the second but there is only data on the first page and the second has header and footer but no data.


Is there a way to force the report to fit everything on one page? Or some other setting I am missing?

Thanks.

View 4 Replies View Related

Existing Report Started Printing Blank Pages

Oct 11, 2007

Hi there.

We have a report that has been working fine for almost a year and just recently we found a bug that when we print, the 1st 3 pages each have a single line from the table header and then the details of the table print.

The report table does have 2 subreports in detail rows. We have diligently checked to make sure that the sizes fit in both the main report and the subreports and we know that the report version did not change.

After a little digging we discovered that we recently patched RS to be version 9.2.3042. When we run the report on another RS server that is running 9.00.1406.00, it works fine. Do you know if this could be the cause? If so, is there another patch that addresses the issue?

Any help would be appreciated.

Thanks, Mike

View 3 Replies View Related

Landscape Printing From Report Manager Not Printing All Displayed Columns On Each Page

May 3, 2007

I have deployed a report that is configured for landscape printing. It does print in landscape, however, only the first seven columns appear on the first page and the other five columns appear on the next page. Is there a method, like in print preview setup in MS Excel, where we can scale down the print (like to 80%) so all columns appear on each page?

Thanks!

View 3 Replies View Related

Reports Are When Printed SQL Server Report Is Printing Extra Pages

Apr 5, 2008



Hi ,

I have developed some report in Sql Server Reporting services my Page orientation is portrait that is report height and width are 8.5 and 11 respectively and margins are set to 0.3 in when it is printed the pages are printed more that actually viewed Pages.

I need help from someone.

Thanks,

Nikhil
response2nikhil@hotmail.com

View 7 Replies View Related

Report Printing With Blank Pages When Large Amount Of Text In Column Values. Urgent

Apr 16, 2008

Hi every one,
I am facing problem in printing the reports from browser and also when i export it to pdf,the problem i am facing is blank pages are coming when report column getting the large amount of text around 2500 characters into column value.
can any one help me in this issue?. if the report is getting acceptable amout of data it is printing in proper way i.e no balnk pages at all.i maintained all properties like margins+body size < page size.

View 4 Replies View Related

Printing Multiple Pages

Jan 10, 2008

I have a report that prints one record on a page. It also has four tables which print records from related tables. I pass it the ID of the master record an it works great.
But I need to be able to print multiple master records, ie use the same form to print more than one record from the master table. I can pass more than one ID and change the Stored proc to return more than one master record, which I believe, with the addition of a page marker, will produce a multiple form report - but what about the tables which display multiple records for each ID? Does reporting Services understand the relationship between the tables and and restrict the tables on each page to the ID?David

View 2 Replies View Related

Headers Printing On Separate Pages

May 11, 2007

I am having a problem with headers printing on separate pages. I have a report in RS 2000 that consists of 4 tables. Each table has several tables embedded within the table. The report has a header and each main table has two headers. The report layout is 11in. x 8.5in. with margins of 0.05in. The view space of the report is 10.2125in. Doing the math, I am withing the bounds of the paper; however, when I export to PDF, the report header and a legend table prints on the first page, the first table header prints on the second page, the second table header prints on the third page, the first data row prints on the fourth page and the rest of the table prints on the next page or several pages as needed. This repeats for the subsequent tables because I have the table property set to Insert page break after this table. I also have Repeat header rows on each page checked. I am at a loss as to why this continues to happen.

View 2 Replies View Related

Printing Blank Pages In Landscape

Jul 18, 2007

I ahve a report, that has 24 fields in the layout. When I tried to print the reprot, it prints BLANK pages, in between and at the start. I have confirmed that the width BODY of the report, < width of the report properties. It still prints blank pages.Pl advise.

View 1 Replies View Related

Table Header Not Printing On Specific Pages

Nov 29, 2007

I'm not sure what is going on but I created a table in the body of a report. I have set the RepeatOnNewPage property to be true. When I preview it the header is on all pages. Perfect! However when I print preview it or export to PDF the header is on Page 1 thru 6 it skips 7 and 8 and then prints on 9. This is happening on a few of my reports.

Any suggestions?

CardGunner

View 11 Replies View Related

Reporting Services :: Printing Reports On Separate Pages

May 18, 2015

I must confess it has been a long time since I have done any SSRS reporting.  I have the following SQL Statement (I will change it to a stored Procedure with parameters once I get the design done):

SELECT
rc.wo_id,
rc.process_id,
rc.item_id,
rc.lot_no AS full_lot_no,
rc.oper_id, rc.seq_no,
CAST(la.attr_value AS DECIMAL(12, 2)) AS weight,

[Code] ....

This gives me the data I want which looks like this:

Rework ID              Ingot           Oper ID        Piece         Rework
28                          xxxxxx14           5                   M88           Route 1
55                         xxxxxxx15           5                   B106          Route 2
79                         xxxxxxx19           5                    M68            Route 3
164                       xxxxxx234           5                    T16             Route 4
                            xxxxxx234           5                     B82             Route 4

The grouping is on the Rework ID.  Any of the pieces can be put on any rework route.  As you can see, there are 4 routes, but 5 pieces.  What I need is for each rework ID to be printed on its own paper even if there is only 1 record for the route.  So I would expect 4 pieces of paper, 3 with 1 record, the 4th with two pieces.  Is there a setting in the Tablix or report that I can set, or is there an expression I can use?

View 2 Replies View Related

Problem With Printing Execution Time And Total Pages

Mar 28, 2008

I have a strange problem. All my report footer has 3 text boxes with the following formulea in them.

="Printed by " + User!UserID + " on " + DateTime.Now.ToString()


="Execution Time: " +

IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).TotalSeconds < 1, "0 seconds",

(

IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours & " hour(s), ", "") +

IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes & " minute(s), ", "") +

IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds & " second(s)", ""))

)


="Page " + Globals!PageNumber.ToString() + " of " + Globals!TotalPages.ToString()

When I run the report on the report manager, (through the site), the execution time, number of pages everything show properly. But when I print the report, the execution time and total pages is printing huge numbers, which are not in any way related the actual page numbers.

For example:
When I run the report it shows the footer like below:
Printed by xxxxxxxxx on 3/28/2008 1:59:01 PM Execution Time: 6 Seconds Page 1 of 213
When I print
Printed by xxxxxxxxx on 3/28/2008 1:59:01 PM Execution Time: 47 Seconds Page 1 of 483

Does anyone know what is the solution to this problem is?
I really appreciate your help,

Thank you,


View 3 Replies View Related

Report Printing Issue

Apr 5, 2007

Hi,
I am having problems printing a new table we added to an existing report. When I preview the report in Visual Studio everything looks good. But when I click the print layout view button the "header" portion of the report shows on one page and the detail shows up on another. Has anyone seen this happen before?

Thanks,
Jon Edwards

View 2 Replies View Related

Printing Report In One Page

Sep 26, 2007

hello there,

i have created a report now i want to have the report print on one page instead of two pages which is doing now.how can i do that.i am using SSRS 2005.
please help

cheers
zolf

View 1 Replies View Related

#Error When Printing Report

Feb 3, 2007

I have a field on a Group Footer which is a Sum field based of an IIF statement.

Here it is.

=Sum(IIF(Fields!EXPR1.Value=2 and Fields!Type.Value=1,Fields!Quantity.Value,0))

If I do not use the AND, by by only checking on one field it works fine and it returns a result, however if I use the AND Operator I get the #Error when previewing the report.

Does anyone have any idea why this is happening. Any suggestion would help/


THanks

View 3 Replies View Related

Printing Report In One Page

Sep 26, 2007

hello there,

i have created a report now i want to have the report print on one page instead of two pages which is doing now.how can i do that.i am using SSRS 2005.
please help

cheers
zolf

View 3 Replies View Related

Printing Report.... Issue

Jan 15, 2008

Hi,

I have developed report(SSRS 2005) using Matrix control and Chart, on web in works good, but when user prints the report
it cuts matrix and prints it on separate pages.

my requirement is to print every thing in a single page, no matter how much data i has.
i tried landscape print (by changing width 11 and height to 8.5) but no result,
does any one know the solution....?

thank you...

View 8 Replies View Related

Processing A New Report Before Printing

Sep 12, 2007

I am running SSRS 2005, rendering reports locally using a report viewer. Rather than direct the viewer to an .rdlc file, I use an XMLDocument. A few of my reports have a large image in the background that needs to be invisible when the report prints. This was straightforward - I just use a report parameter and set the visible state of the image to the value of the parameter. The hard part is getting the report to print without an error.

Initially, I render the report with the following code:

Private Sub ShowReport()

Try

With Me.ReportViewer1
.Reset()
.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
.LocalReport.LoadReportDefinition(New System.IO.StringReader(_Doc.OuterXml))
.LocalReport.DataSources.Add(_Item1)
.LocalReport.DataSources.Add(_Item2)
.LocalReport.SetParameters(_Param)

.RefreshReport()

End With

Catch ex As Exception
MsgBox(ex.ToString)
End Try

End Sub
This code works fine. I have hidden the print button on the report viewer, and to print, the user must press my button which runs the following code.
Private Sub PrintReport()

Try
_Param(0) = New Microsoft.Reporting.WinForms.ReportParameter("ImageVisible", "False")
ShowReport()

ReportViewer1.PrintDialog()

Catch ex As Exception
MsgBox(ex.ToString)
End Try

End Sub
Resetting the parameter and re-displaying the report works fine on its own. The PrintDialog method works fine on its own. When combined in the same Sub like this, I get the following error:
"Operation is not valid due to the current state of the object".
Does anyone know how I could get it to print without an error? I would be very grateful for any help.

View 1 Replies View Related

Problem When Printing Report From IIS

May 16, 2007

Hi,

I am rendering the report from remote server and I am displaying it. when I try to print the report from my application it is printin properly. but when I try to print it from IIS it is showing an error message that "No printers are Installed ". I did not specify any printer name in my application. How can I resolve this problem.



Thanks

rahul

View 1 Replies View Related

Printing Graph Report

Feb 28, 2007

Hello

I have a report with pie and bar graphs, I have the paper size 16.54 x 11.69 for landsacpe, there are twelve graphs ,two placed side by side , and in the report manager, the appearence is perfect ,spread over six pages. I have Pagebreakatend True for all the graphs. The problem is with printing, on printing , the are tottaly misaligned,any tips are welcome



Thanks

Inder

View 4 Replies View Related

Printing Remote Ssrs Report From Report View Does Not Work

Oct 9, 2007

Hi,

It appears to work fine on my end however on my clients end, whenever they try to print a report that displays perfectly within the report viewer to their printer by selecting the printer button in the report it never ends up printing.., however if they go into printer setup and change the page range to print from all pages to just maybe one page and then select the print button it seems to print fine..

The printer seems to receive the information as the light flashes but no page kick out when all pages is selected to print..

Any help would be greatly appreciated..

View 1 Replies View Related

Transact SQL :: Unexpected Rounding With MONEY When Casting To VARCHAR Or Printing

Dec 18, 2008

if I 'print' a MONEY value, or cast a MONEY variable to VARCHAR, it automatically rounds it to two decimal places. Maybe that's a built-in convenience, but I'd like to make it not do that.My workaround right now is to first cast my MONEY variabled to DECIMAL(30,4), and then cast the result to VARCHAR, but I'd like to avoid that step if possible.Consider the following

query:DECLARE @UnitCost MONEY  SET @UnitCost = .0167  SELECT      @UnitCost,      
CAST(@UnitCost AS VARCHAR(30)),     
CAST(CAST(@UnitCost AS DECIMAL(30, 4)) AS VARCHAR(30))  -
- Results in: 0.0167, 0.02, 0.0167 

View 5 Replies View Related

Printing A Linked Report In Landscape

Aug 30, 2006

I have a report that is setup to print landscape.

I deploy to Report Manager, print it, and everything works great.

If I create a linked report from the deployed report, the linked report prints portrait.

Does anyone know of a workaround or am I just doing something wrong?

Thanks!!

BobP

View 6 Replies View Related

Printing Report Directly Without Using Reportviewer

Apr 11, 2008



Hi,

My Requirement is to dirctly Print the SSRS Report without using Reportviewer.
If anybody know How to Print Report without using Reportviewer, please let me know asap.

Thanks in advance.

View 2 Replies View Related

HTML Report Printing Problem.

Mar 26, 2008



Hello Every one,
we have reports, for that we are using Visual studio and report viewer.
In Report viewer ,I Enabled print Option.
While i tried to Print on HTML report from report viewer; I set Properties Landscae but the output is coming like Potrait.
In my Rdl Interactive size Properties are width11 in and height 8.5 in
why it is coming like Potrait size.
can any one help me?

View 11 Replies View Related

Report Add Line Breaks When Printing Or Exporting To .pdf/.tif

Jan 2, 2008



I have e-mails saved in a SQL database with all HTML formatting information.
To remove all HTML formatting I craeted a function on the RS report:

Public Shared Function removeHtmlChar(ss)
try
Dim l as integer
Dim i as integer
Dim ch as string
Dim x as integer
Dim t as string
t = ""
l=len(ss)
for i=1 to l
ch=mid(ss,i,1)
x=i
if(ch="<") then
x=i
do while(mid(ss,x,1)<>">")
x=x+1
loop
else
t=t & ch
end if
i=x
next
t = t.Replace("nbsp;"," ")
removeHtmlChar = t
catch
removeHtmlChar = ""
end try
End Function

When I look at the report on the screen the report is showed correct.
If I print or export the report it add a lot of line breaks in the e-mail text.
Why does it not print it as it looks at the screen?

View 4 Replies View Related

Linked Report Printing In Portrait Instead Of Landscape

Apr 15, 2008



We have a report that prints correctly (in landscape) in the folder that is deployed to but the linked report in a different folder prints in portrait?

can anyone shed some light on this.

View 2 Replies View Related

Different Font Size When Browsing And Printing A Report ?

May 3, 2007

Hi all,



Is it possible to setup different font size when a user is browsing or printing a report?



I have a lot of data to print on a report and i need tu use a font size of 7pt which is fine for printing but when the user is looking at the report on the browser a font size of 7pt is a bit too small and the bold doesn't work.



Tia

View 2 Replies View Related

Printing Table Header On Every Page Of Report

Jan 10, 2008

I have report with a table, that generates rows to more than 1 page. When the user prints the report, each page should show the table header.
Presently or by default , the table header is shown(printed) only on the first page.

Please let me know, how can I achieve this.

View 4 Replies View Related

Printing Address Labels Using Report Builder

Sep 22, 2007



Hi,

I need to create address labels from report builder. I can create the same from report designer using list box and text boxes. But not able to create the same from report builder as it is supporting only one layout - table (Columnar) for table type. Can any one help me to place the filelds in row wise rather than column wise.

View 3 Replies View Related

Subreport - Concurrent Printing With Main Report.

Sep 28, 2006

SUBREPORT (License info to the right) SHOULD PRINT TO RIGHT OF ADDRESS INFORMATION ON LEFT.  LIKE THIS...

Name                     ABC-12345
Address line 1           DEF-12345
Address line 2           GH1-12345
City, State Zipcode


The data is from one table and looks like this.  Both the main report and subreport use a shared data souce.

Name          Address line 1        City           State      Zipcode      License
------------- -------------------   -------------  ---------  ----------   ---------
Joe Schmoe    123 Maple Street      Clearwater     Florida    33777        ABC-12345
Joe Schmoe    123 Maple Street      Clearwater     Florida    33777        DEF-12345
Joe Schmoe    123 Maple Street      Clearwater     Florida    33777        GHI-12345


All lines are header lines.  Subreport has been placed in top header line.
IT IS PRINTING SIMILAR TO THIS BUT SHOULD PRINT AS FIRST STATED ABOVE...

Name                     ABC-12345
                         DEF-12345
                         GH1-12345
Address line 1          
Address line 2          
City, State Zipcode

ISSUE: I would like the subreport to PRINT ALONG WITH the address information to its left.  In Crystal Report a subreport could "Underlay Following Sections" - a wonderful feature Microsoft maybe should have copied.  Is there a way to duplicate "underlay" behavior in SQL Reporting ?  Thanks.


UPDATE:  Coworker found workaround.  Can concatenate Name, Adress line 1, Address line 2, City, State and Zipcode into one field.  Would still like to know a more straightforward way.

 

 

View 1 Replies View Related

Problem With Printing Report Directly To Printer

Aug 22, 2007

Hello,
I am trying to get a SSRS 2005 report to print from my Visual Studio 2005 C++ application without using the ReportViewer to preview it first. What I have done is created a dll that I call into when I want to access a certain report and print it. While searching around on the internet I found an MSDN article about printing a report without previewing and it had an example in C# code. So I used that as a guide for my C++ code but I am still having problems with rendering the report properly so it can be printed. When I try to render a report using the "Image" format, my streamid string is empty but the byte array that the render routine returns is not. Here is the code I am using, what could be the problem here?

Note: m_Streams is define elsewhere as
array<String^>^ m_Streams = gcnew array<String^>(10);


void Print::Export(LocalReport^ report)

{

array<Warning^>^ Warn = gcnew array<Warning^>(10);

String^ deviceinfo =

"<DeviceInfo>" +

" <OutputFormat>EMF</OutputFormat>" +

" <PageWidth>8.5in</PageWidth>" +

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

" <MarginTop>0.25in</MarginTop>" +

" <MarginLeft>0.25in</MarginLeft>" +

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

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

"</DeviceInfo>";

String^ mimeType;

String^ enc;

String^ FileExt;

array<Byte>^ bytes;

bytes = report->Render("Image",deviceinfo, mimeType, enc, FileExt, m_Streams,Warn); // m_Streams has a length of

return; // 0 after the Render

}


void Print:: PrintPage(System:: Object^ sender, System:: Drawing:: Printing:: PrintPageEventArgs^ ev)

{

Metafile^ pageImage = gcnew Metafile(m_Streams[m_CurrentPage]);

ev->Graphics->DrawImage(pageImage, ev->PageBounds);

m_CurrentPage++;

ev->HasMorePages = (m_CurrentPage < m_Streams->Length);

return;

}


void Print:rintRpt()

{

String^ printerName = "Default";

if (m_Streams->Length < 0)

return;

PrintDocument^ printDoc = gcnew PrintDocument();

if (!printDoc->PrinterSettings->IsValid) {

return;

}

printDoc->PrintPage += gcnew PrintPageEventHandler(this, &Print:: PrintPage);

printDoc->Print();

return;

}


void Print::Run()

{

LocalReport^ report = gcnew LocalReport();

DataSet^ ds = gcnew DataSet();

LoadData(ds);

report->ReportPath = "c:\bmi\bulrpt\Report1.rdlc";

ReportDataSource^ RDS = gcnew ReportDataSource();

RDS->Name = "DataSet1_Subject";

RDS->Value = ds->Tables["Subject"];

report->DataSources->Add(RDS);

Export(report);

PrintRpt();

return;

}

DataTable^ Print:: LoadData(DataSet^ ds)

{

System:: String ^ConnStr = "SELECT * FROM Subject";

SqlConnection^ conn = gcnew SqlConnection("Data Source=JOE-PC\BMIMSDESERVER; Initial Catalog=stx52013;Integrated Security = TRUE");

SqlCommand^ command = gcnew SqlCommand(ConnStr, conn);

SqlDataAdapter^ adapt = gcnew SqlDataAdapter(command);

adapt->TableMappings->Add("Table", "Subject");

conn->Open();

adapt->Fill(ds);

return ds->Tables["Subject"];

}

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved