ActiveReports 2.0 (Visual Basic 6.0) Support

Started by Jare37 at 03-09-2010 4:01 PM. Topic has 3 replies.

Print Search Rate
Sort Posts:    
   03-09-2010, 4:01 PM
Jare37 is not online. Last active: 3/12/2010 12:45:56 AM Jare37

Not Ranked
Joined on 03-10-2010
Posts 2
Keeping a row from printing
I imagine there should be a simple answer to this but I'm not sure. I have a report and for reason that I won't explain I need to keep from printing records if certain conditions are met ie. print all rows where rpt.Fields("Print").value = "Yes" and otherwise do not show the row. Obviously I can test this condition in the OnDataFetch Event but when the condition is met how can you keep the row from printing?

Thank you

   Report 
   03-10-2010, 11:16 AM
PrantikS is not online. Last active: 2/10/2012 5:46:35 PM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 1,550

DDStaff
Re: Keeping a row from printing
Hello,

Do you wish to show the report in the viewer but not in the print out? I am afraid there cannot be changes in the report between its run and the print. However you could rerun the report-> set the visible property of the control to false when the condition is met and then print the same.

Regards,
Prantik


   Report 
   03-11-2010, 10:48 AM
Jare37 is not online. Last active: 3/12/2010 12:45:56 AM Jare37

Not Ranked
Joined on 03-10-2010
Posts 2
Re: Keeping a row from printing
By print I mean display in the viewer. The recordset being used for the record contains more records than I want to display, I managed to eliminate the records by changing the LayoutAction dependent on the field values as it runs through the records. I would have preferred to prefilter the subreport (obviously more efficient) but it was not an option in this case.

Thank you

   Report 
   03-12-2010, 1:31 PM
PrantikS is not online. Last active: 2/10/2012 5:46:35 PM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 1,550

DDStaff
Re: Keeping a row from printing
Hello,

Are you using this in the code behind or the script? In case it is in the codebehind , you can use something similar to the following

Private Sub Detail_Format ()
If Me.Field1.Text = "k" Then
   Me.Detail.Visible = False
Else
   Me.Detail.Visible = True
End If

End Sub

Or

Private Sub ActiveReport_FetchData (EOF As Boolean)
   If Me. Fields ("k").Value = "k" Then
     Me.Detail.Visible = False
    Else
      Me.Detail.Visible = True
   End If
End Sub

If you are in writing this in the script, replace me with rpt.

Regards,
   Report 
GrapeCity » Product Support » ActiveReports 2... » Re: Keeping a row from printing

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.