Rank: Member
Groups: Registered
Joined: 4/7/2019(UTC) Posts: 24 Thanks: 7 times
|
Hello. Is it possible to get the following result using the pivot feature built in Seal Report? Original table: ColYearMonth|Earns|Budget 2019-01. |... |... 2019-02. |... |... 2019-03. |... |... ...
Target: |2019-01|2019-02|2019-03 Earns |.......|.......|...... Budget|.......|.......|......
Dots....means any value.
I've tried putting ColYearMonth column as Column and both Earns and Budget in Data Elements but the table I get is: 2019-01 |2019-02. |2019-03 Earns. |Budget |Earns. |Budget. |Earns. |Budget ...... |....... |....... |........|........|......
Thanks in advanced.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
If you select your Data table view, there is an option to invert Row/Column presentation: It is the property 'Options: Invert data table'. It should do what you want.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/7/2019(UTC) Posts: 24 Thanks: 7 times
|
Thanks for your quick reply. I've check it but it doesn't work. I've disabled server pagination option, as indicated by the invert option. In fact, I've modified the datatable template to force the inversion: reportModel.InvertDataTables(); /* if (view.GetBoolValue("invert_data_tables") && modelView.GetBoolValue("show_data_tables") && !report.ExecutionView.GetBoolValue(Parameter.ServerPaginationParameter)) { reportModel.InvertDataTables(); }*/ But it doesn't work either. ...Uploaded: Strange...If I add some field as page element, it seems to start working. To get the table I need I've to put the ColYearMonth as Row, not as Column and invert the DataTable. But I've not add any field as page element, the table is not inverted. May be is a bug? Thanks in advance. Edited by user Monday, May 20, 2019 8:07:56 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Yes it is a bug (number 138), to fix it just change the template like this: Code: if (view.GetBoolValue("invert_data_tables") && modelView.GetBoolValue("show_data_tables") && !report.ExecutionView.GetBoolValue(Parameter.ServerPaginationParameter))
{
reportModel.InvertDataTables();
}
ResultTable table = page.DataTable;
to assign the table variable after InvertDataTables()... it will be fixed in 5.0 Edited by user Monday, May 20, 2019 8:19:48 AM(UTC)
| Reason: Not specified
|
1 user thanked epf for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 4/7/2019(UTC) Posts: 24 Thanks: 7 times
|
Working!! Thanks so much. It's awesome.
|
|
|
|
Forum Jump
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.