Print Page | Close Window

Print Selection Only

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19285
Printed Date: 27 November 2024 at 9:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Print Selection Only
Posted By: jcollier
Subject: Print Selection Only
Date 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.



Replies:
Posted By: jcollier
Date Posted: 13 December 2011 at 9:00am
So, is there any way to print just the selected rows on a report?


Posted By: mgampi
Date 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


Posted By: Aaron
Date 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....


Posted By: jcollier
Date 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.


Posted By: jcollier
Date Posted: 21 February 2012 at 9:37am
Does anyone from Codejock have an answer to this? I'm using VB6.


Posted By: ABuenger
Date 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


Posted By: jcollier
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net