Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Print Selection Only
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Print Selection Only

 Post Reply Post Reply
Author
Message
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Topic: Print Selection Only
    Posted: 08 December 2011 at 8:44pm
I'm trying to figure out how to print only selected records in a report using the PrintReport method. I'm using 15.1.3. The print dialog comes up and I select the "Selection" radio button on it but the entire report still prints.

Any help would be appreciated.
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2011 at 9:00am
So, is there any way to print just the selected rows on a report?
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2011 at 4:48pm
Hi;

I would try to temporarily hide all non selected records, print and then show them again.
Something like

BeginUpdate
  for (int i=0; i<GetRecords()->GetCount(); i++)
    if (GetRecords()->GetAt(i) is not found in selected records collection)
        Record->SetVisible(FALSE);
 
    Populate()
    Print()

  Show all hidden records again

  EndUpdate()

But I don't know whether this really works.
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2011 at 5:00pm
Hi,
 
If you really need this option (AND if it's possible to detect "Selection" mode), you could make records/rows invisible just before Print call.
 
Thanks
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2011 at 10:02am
Making the records invisible prior to print is how I WAS doing it. When I upgraded to the new ActiveX it stopped working. It appears that the print is now being sent to the printer prior to the code that executes the row visible code.
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2012 at 9:37am
Does anyone from Codejock have an answer to this? I'm using VB6.
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2012 at 10:23am
Originally posted by jcollier jcollier wrote:

It appears that the print is now being sent to the printer prior to the code that executes the row visible code.


Hi,

please open a ticket and attach a sample with your code.

Andre

Codejock support
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2012 at 11:56am
Printing selection only doesn't work in the sample provided by Codejock.  "C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v15.2.1.0221\Samples\ReportControl\VB\ReportSample\ReportSample.vbp"

When I highlight multiple rows (or even one row) and choose selection only on the print dialog, it prints all rows regardless of whether they are selected.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.