Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 09:52

All times are UTC




Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: 06 Dec 2018, 13:59 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

1. Check if you really use last build.

2. Try to take standard Demo Porject PivotGridEh.SimpleDemo.
Drop a new Button on the Form and write code

procedure TForm1.Button1Click(Sender: TObject);
begin
PivotDataSourceEh1.PivotFields.FindFieldByName('OrderNo').DisplayName := 'Order Number';
PivotDataSourceEh1.PivotFields.FindFieldByName('ShipVIA').DisplayName := 'ShipVIA New';
end;

If you press 'Button1' after '(3) Load source data' and then press 'Build Pivot data' you should see new Display Names for fields.
If you press 'Button1' after 'Build Pivot data' the PivotGridEh should clear itself so you need to rebuild Pivot data.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 07 Dec 2018, 14:19 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
Thanks for your answer,
I want change text in black box:


Attachments:
Sample.png
Sample.png [ 6.17 KiB | Viewed 6347 times ]
Sample.png
Sample.png [ 6.17 KiB | Viewed 6347 times ]
Top
 Profile  
 
PostPosted: 13 Dec 2018, 01:44 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

The value for the 'grand total' is taken from the global variable EhLibLanguageConsts.GrandTotalEh
If you assign EhLibLanguageConsts.GrandTotalEh, then the value will be used for all PivotGrids of the project.

The values of COD, Cash, Check, Credit, MC, Visa are taken from the DataSet with the original data specified in the PivotDataSourceEh.DataSet.
To change these values, you need to change them in the original DataSet.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 13 Dec 2018, 04:48 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
Hi,
Thanks for your Answer,
But About this:
Quote:
The values of COD, Cash, Check, Credit, MC, Visa are taken from the DataSet with the original data specified in the PivotDataSourceEh.DataSet.
To change these values, you need to change them in the original DataSet.

Yes, I know that must change from orginal Dataset, But I want to be able to change later
Can I access this column?


Top
 Profile  
 
PostPosted: 13 Dec 2018, 08:16 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Could you write your task in more detail.
Why data should appear later than they are present in the original DataSet?
Do want to replace internal codes with corresponding display values?

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 13 Dec 2018, 16:27 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
In Orginal Dataset I use English Title, but my software is multi language & i want show title in correct language


Top
 Profile  
 
PostPosted: 29 Dec 2018, 05:41 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
Hi,
Has this access been created in new versions?


Top
 Profile  
 
PostPosted: 10 Mar 2019, 13:21 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
Is there a way to change the columns Title?


Top
 Profile  
 
PostPosted: 11 Mar 2019, 03:55 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
I Use follow code:
Code:
     
with PivotDataSourceEh1.ValueFieldDefs.Add do
      begin
        PivotFieldName := 'Qty';
        SumFunction := svtSumEh;
        DisplayFormat:= '###,###,###,###';
        DisplayName:= 'کميته';
      end;
      with PivotDataSourceEh1.ValueFieldDefs.Add do
      begin
        PivotFieldName := 'Price';
        SumFunction := svtSumEh;
        DisplayFormat:= '###,###,###,###';
        DisplayName:= 'مبشر';
      end;

But DisplayName not work.
Also, Is it possible to adjust the Alignment?


Top
 Profile  
 
PostPosted: 15 Mar 2019, 16:13 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

About you code

Code:
ValueFieldDefs.Add
...
DisplayName:= 'کميته';


The DisplayName property in TPivotFieldValueInfoEh is a property of base class - TCollectionItem.
This property is intended only for display in the 'Collection editor' at design time.
If you want to change display name of TPivotFieldEh in PivotGridToolBoxEh you should use TPivotFieldEh.DisplayName like this

Code:
  PivotDataSourceEh1.PivotFields.FindFieldByName('AmountPaid').DisplayName := 'The Amount Paid';

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 56 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group