Print Selection Only |
Post Reply |
Author | |
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
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.
|
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
So, is there any way to print just the selected rows on a report?
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
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.
|
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
Does anyone from Codejock have an answer to this? I'm using VB6.
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Hi, please open a ticket and attach a sample with your code. Andre |
|
Codejock support
|
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |