Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printing Only Selected Rows

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Halftime



Joined: 12 Nov 2006
Posts: 7
Location: Charlotte NC

PostPosted: Wed Nov 15, 2006 12:31 pm    Post subject: Printing Only Selected Rows Reply with quote

I want to print + print preview only the selected rows - I simplify this by just getting the 1st and last selected rows identifiers, but this feature does not appears to work correctly.

Below is a code sample:

int iSelectedRows = virtualTree1.SelectedRows.Count;
PrintPreviewDialog previewDialog = new PrintPreviewDialog();
VirtualTreePrintDocument pd = new VirtualTreePrintDocument(virtualTree1);

pd.DefaultPageSettings.Landscape = true;

if (iSelectedRows >= 2)
{
int iFirstRow;
int iLastRow;
Row[] oSelectedRows;

oSelectedRows = virtualTree1.SelectedRows.GetRows();
iFirstRow = oSelectedRows[oSelectedRows.GetLowerBound(0)].RowIndex;
iLastRow = oSelectedRows[oSelectedRows.GetUpperBound(0)].RowIndex;

if (iFirstRow < iLastRow)
{
pd.StartRowIndex = iFirstRow;
pd.EndRowIndex = iLastRow;
}
else
{
pd.StartRowIndex = iLastRow;
pd.EndRowIndex = iFirstRow;
}

}

previewDialog.Document = pd;
previewDialog.ShowDialog(this);
}

Any Suggestion ?

Shocked
_________________
Michael Miller
HalfTime Technologies
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Nov 15, 2006 9:53 pm    Post subject: Reply with quote

There is indeed a bug here. The VirtualTreePrintDocument StartRowIndex property is working correctly however the EndRowIndex property does not work correctly. Rows after EndRowIndex are still printed if they would fit on the same page.

We will fix this with a release in the next few days.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Nov 20, 2006 5:03 am    Post subject: Reply with quote

Version 2.6.3 (VS2003) and 3.2.0 (VS2005) have now been released and fix this issue.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group