Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by TMI

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...