expivot - faq

How do you find the control's help / documentation on your computer:

  • Open the Run dialog on your Windows, and type exg2antt.chm, to run the exg2antt's help file. By default, the setup installs the CHM file into your system folder, so you can open the control's help / documentation by typing the control's name followed by .chm extension in the Run dialog box.
  • Locate and Run the ExG2antt.chm shortcut from the component's folder.
  • For How-To questions, you can run the ExHelper.exe shortcut located in the component's folder.
  • For How-To questions, you can locate and run the HOWTODO.chm shortcut from the component's folder.

Frequently Asked Questions - General

Click the programming language you use for general questions:

How-To Questions

Click the programming language you use for how-to questions:

Exontrol Software - ExOrgChart FAQ page

Frequently Asked Questions - ExPivot Component

Listed below are the questions that we are asked quite often. Before you write us, be sure to check here. 

Are you looking for something?

Just press CTRL+F ( or select Tab\Find menu item ) and you have a dialog that will help you to locate the string that are you looking for.

Where can I find the control's release notes?

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. 

Is there any print and print preview support?

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

Is there any Fit-To-Page option for print and print preview?

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

Can not use the control's Layout property, as it is confused with some other property. What can be done?

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.

Can not use the control's Import property, as it gets "Overload resolution failed because no accessible 'Import' accepts this number of arguments". What can be done?

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.

 

Does your control support loading data from an array?

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 });;

After user changes the column's filter in the control's pivot bar, the generated columns shows as unsorted. What can be done?

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

The Blanks / NonBlanks filtering appears as not-working properly. Is there anything I am missing?

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.

I am using a different font, and some letters, are clipped ( for instance, g of Belgium )

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.
Copyright 1999-2017 Exontrol. All rights reserved.