eXPivot - FAQ
Exontrol.COM Software - Frequently Asked Questions - ExPivot Component
1:
The control's release notes can be found on our web site, looking for the Release Notes column in the control's main page. Click here for direct link.
2:
Yes, the Exontrol ExPrint component ( exprint.dll ) provides Print and Print Preview capabilities for the exPivot component. Once that you can have the exPrint component in your Components list, insert a new instance of "ExPrint 1.0 Control Library" to your form and add the following code:
Private Sub Command1_Click()
    With Print1
        Set .PrintExt = Pivot1.Object
        .Preview
    End With
End Sub

The Exontrol Print Preview mainframe looks like follows:

The exPrint component is free of charge, if you are registered user of the exPivot component.

The following VB sample opens the Print Preview frame:

With Print1
    Set .PrintExt = Pivot1.Object
    .Preview
End With

The following C++ sample opens the Print Preview frame:

m_print.SetPrintExt( m_pivot.GetControlUnknown() );
m_print.Preview();

The following VB.NET sample opens the Print Preview frame:

With AxPrint1
    .PrintExt = AxPivot1.GetOcx()
    .Preview()
End With

The following C# sample opens the Print Preview frame:

axPrint1.PrintExt = axPivot1.GetOcx();
axPrint1.Preview();

The following VFP sample opens the Print Preview frame:

with thisform.Print1.Object
    .PrintExt = thisform.Pivot1.Object
    .Preview()
endwith
3:
The Exontrol ExPrint component ( exprint.dll ) provides Print and Print Preview capabilities for the Exontrol ExPivot component.

The requirements for the FitToPage option:

  • Exontrol.ExPrint version 5.2 ( or greater )
  • Exontrol.ExPivot version 7.0 ( or greater )

If these are not meet, the Options("FitToPage") property has NO effect.

The FitToPage option could be one of the following:

  • On, (Fit-To-Page) the control's content is printed to a single page ( version 7.0 )
  • p%, (Adjust-To) where p is a positive number that indicates the percent from normal size to adjust to. For instance, the "FitToPage = 50%" adjusts the control's content to 50% from normal size. ( version 10.0 )
  • w x, (Fit-To Wide) where w is a positive number that indicates that the control's content fits w pages wide by how many pages tall are required. For instance, "FitToPage = 3 x" fits the control's content to 3 pages wide by how many pages tall is are required. ( version 10.0 )
  • x t, (Fit-To Tall) where t is a positive number that specifies that the control's content fits t pages tall by how many pages wide are required. For instance, "FitToPage = x 2" fits the control's content to 2 pages tall by how many pages wide are required. ( version 10.0 )
  • w x t, (Fit-To) where w and t are positive numbers that specifies that the control's content fits w pages wide by t pages tall. For instance, "FitToPage = 3 x 2" fits the control's content to 3 pages wide by 2 pages tall. ( version 10.0 )

The following VB6 sample shows how to show the eXPivot/COM's content to one page when print or print preview the component:

Private Sub Command1_Click()
    With Print1
        .Options = "FitToPage = On"
        Set .PrintExt = Pivot1.Object
        .Preview
    End With
End Sub

The following VB/NET sample shows how to show the eXPivot/NET or /WPF's content to one page when print or print preview the component:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    With Exprint1
        .Options = "FitToPage = On"
        .PrintExt = Expivot1
        .Preview()
    End With
End Sub
4:
The control's Layout property indicates a value to restore the control's layout as previously saved. The Layout includes the column positions, sorting, size, filtering and so on.

For instance, the Layout term is defined as:

  • as an event, in the /NET framework, (Control.Layout Event)
  • as a property in MS Access, of the extended control. 

In order to use the control's Layout property and not confused with the system's Layout event or property you need to cast the object such as:

  • VB, VBA, MS Access, Pivot1.Object.Layout instead Pivot1.Layout
  • C# for /COM, (axPivot1.GetOcx() as EXPIVOTLib.IPivot).Layout, instead  axPivot1.Layout. The /COM version on /NET provides the CtlLayout, which is the control's Layout property, so it is correct to be used too as axPivot1.CtlLayout
  • VB/NET for /COM, AxPivot1.GetOcx().Layout instead AxPivot1.Layout. The /COM version on /NET provides the CtlLayout, which is the control's Layout property, so it is correct to be used too as AxPivot1.CtlLayout.
5:
The control's Import method imports data to the control. It may be confused with other methods, properties or events named the same.  

In order to use the control's Import method and not be confused other method of the same name you can do:

  • C# for /COM, The /COM version on /NET provides the CtlImport, which is the control's Import method, so it is correct to be used too as axPivot1.CtlImport. The same way, you can get the Import call if using such as   (axPivot1.GetOcx() as EXPIVOTLib.IPivot).Import, instead  axPivot1.Import.
  • VB/NET for /COM, The /COM version on /NET provides the CtlImport, which is the control's Import method, so it is correct to be used too as AxPivot1.CtlImport.The same way, you can get the Import call if using such as  AxPivot1.GetOcx().Import instead AxPivot1.Import.
6:
Yes. The control's Import method imports data to the control. The Source parameter of the Import method can be:
  • A String expression that indicates the path to a file to be loaded or the content itself. If the expression points to a file, the file's content is loaded.The Import method loads CSV files or CSV content. A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form. Plain text means that the file is a sequence of characters, with no data that has to be interpreted instead, as binary numbers. A CSV file consists of any number of records, separated by line breaks of some kind; each record consists of fields, separated by some other character or string, most commonly a literal comma or tab. Usually, all records have an identical sequence of fields. The Source parameter indicates the path to the CSV file to be loaded, or the content itself. For instance, the Import "C:\Program Files\Exontrol\ExPivot\Sample\data.txt"  imports the data.txt file.
  • A Safe array of one-dimensional or two-dimension type, which indicates the data to be loaded. The safe array must be with 1 or 2 dimensions, else an error occurs. If the Source parameter refers a one-dimensional array, the content of the array indicates the values of the rows. If the Source parameter refers a two-dimensional array, the first dimension indicates the columns, while the second indicates the rows. For instance, in VB6 you can load data from a safe array using the syntax Import Array(1, 1, 2, 2, 3, 3, 4, 4). Where Array is a method of VB6 that creates a safe array of different values. The same way you can have the declaration Dim data(1,99) as String, and call the Import data, will load a two-dimensional array. The sample loads 2 columns, and 100 rows from the data array.

Here's a few samples of using Import method with arrays, using the /COM version:

  • VB,VBA: .Import (Array(1, 2, 3, 4, 5))
  • VB/NET: .GetOcx().Import(New Integer() {1, 2, 3, 4, 5})
  • C#: .Import(new int[] { 1, 2, 3, 4, 5 }, null);

Here's a few samples of using Import method with arrays, using the /NET version:

  • VB/NET: .Import(New Integer() {1, 2, 3, 4, 5})
  • C#: .Import(new int[] { 1, 2, 3, 4, 5 });;
7:
By default, the control is keeping the layout (size, position, sorting order, ... ) of the generated columns when the user makes changes in the control's pivot bar. In other words, if you include a new value in the column's filter, the new generated columns will be appended at the end of the header list. In order to prevent this, you need to handle the LayoutEndChanging event when exPivotDataColumnSort and exPivotDataColumnFilterChange notifications occur, and call the control's Reset method as in the following sample:
Private Sub Pivot1_LayoutEndChanging(ByVal Operation As EXPIVOTLibCtl.LayoutChangingEnum)
    If (Operation = exPivotDataColumnSort) Or (Operation = exPivotDataColumnFilterChange) Then
        Pivot1.Reset "c*.position*"
    End If
End Sub

 The sample resets the position of the generated columns when exPivotDataColumnSort and exPivotDataColumnFilterChange notifications occur.

8:
This issue may occur when the control displays a hierarchy ( the control is grouping multiple columns, or PivotRows property contains multiple columns ) By default, the control's FilterInclude property is set on exItemsWithChilds + exMatchIncludeParent. Because the FilterInclude property includes the exMatchIncludeParent flag, it makes the control to include the parent with childs, so more items appear to be included not only the matching items. 

You can do one of the following:

  • Change the FilterInclude property to exItemsWithoutChilds, and so just the items that match the filtering will be included in the control's list ( including the parent items ).
  • Set the FilterInclude property to exMatchingItemsOnly flag, and so no parent/child items are displayed, and so the control displays just the items that match the criteria. This option hides the parent or child items that does not match the criteria.
9:
If using a different Font, make sure that you are updating the DefaultItemHeight property as well, which indicates the default height for the items to be shown in the control's list. The DefaultItemHeight property is not depending on the Font property.
How-To Questions
General Questions
Copyright 1999-2018 Exontrol. All rights reserved.