TMI Posted October 17, 2006 Posted October 17, 2006 (edited) I am printing several extrenal reports that were created in Crystal Reports XI through code in vb 2005. But, sometimes there will be a report that does not have any information for it but a blank page gets printed anyways. I have been trying everything I can think of so that the blank reports will not be printed. But have had no luck yet. Below is the typical code used for each report. rptToOpen.SetParameterValue("LabelName", strRouteTo) rptToOpen.PrintOptions.PrinterName = strWorkOrderPrinter Try '///This is one of my attempts at solving my problem/// If rptToOpen.Rows.Count > 1 Then rptToOpen.PrintToPrinter(1, True, 0, 0) else 'Do not need to print the report End If '//////////////////////////////////////////////////////////// 'rptToOpen.PrintToPrinter(1, True, 0, 0) Catch err As ApplicationException MessageBox.Show(err.ToString, "Error with " & report, MessageBoxButtons.OK, MessageBoxIcon.Error) isError = True Exit Sub End Try HELP!!!!! Edited October 17, 2006 by TMI Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.