on 03-18-2015 4:03 PM
Hi all,
i’m using two crosstabs one above the other like this:
If I expand the upper crosstab, I want to slide the position from lower crosstab down automatically.In WAD it is a standard funcionality. I don’t want to overlap the crosstabs like this:
Also I don’t want to get a scrollbar in the upper crosstab like this:
It would be really great if someone has a solution for this!
Thanks and Regards
Gabriel Motor
HI Gabriel,
I will make you a written idea draft - perhaps already this will help, but if not, feel free to ask, I can make you an example (will need some more time than typing in here).
Basically, you cannot place CROSSTAB2 directly after CROSSTAB1, but..
you can place the CROSSTAB2 with following script:
CROSSTAB2.setTopMargin(CROSSTAB1.getTopMargin() + CROSSTAB1.getHeight());
this would make what you need, but the problem is - the height of crosstab1, how to set it?
I think there is a chance. In your scenario I see you try to make it for static comparison, so you actually know the size of the crosstab - it is
* the header * pixels which are used for header, and
* number of rows * pixels per row
Number of rows canbe get from method DS_1.getMembers().length (or similar) - then you get the height in PX (the real HTML sizes you need to check in debugger tools.
and that's the idea...
perhaps work, if not, I can experiment.
ah, the last point - the re-positioning you have to place in the data source on result set changed event.
Karol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karol
Thanks for your input, it is a good solutions which we has also, but the problem in this solution is
when you will have this table
With you solution we will receive for the DS_1.getMembers().length Month the number 3 and for the DS_1.getMembers().length Year number 3. But the right number of records are 8. This is only an easy example. For the crosstab which we would like create, we have also hierarchies and this constellation.
Maybe you have a a other idee.
Best Regards
Gabriel Motor
Hi Karol
No problem, for a good solution we wait also longer
If we found not a other way SDK is acceptable.
We to have try it also one time with SDK, with an HTML SDK. But it was not working at the end, because of pixel setting "auto" in design studio.
Yes we have several dimensions.
Sorry for to less description.
Best Regards
Gabriel Motor
Hi Gabriel,
I have a solution in standard for you 😉
but..
a bit expensive (getMembers calls) and not very practicable on complex result sets...
here is the script:
var dim1 = DS_1.getMembers("0D_PH1", 100);
var dim2 = DS_1.getMembers("0D_CHANNEL", 100);
var rows = 0;
dim1.forEach(function(element1, index1) {
dim2.forEach(function(element2, index2) {
var data = DS_1.getData("BJJ5GG93Z194C8FBG1EM94S7J", {
"0D_PH1": element1.internalKey,
"0D_CHANNEL": element2.internalKey
});
if(data.formattedValue != "") {
// has data, add row.
rows = rows + 1;
}
});
});
var header = 23 + 22;
var footer = 22;
CROSSTAB_1.setHeight(header + (22 * rows) + footer + 1);
CROSSTAB_2.setTopMargin(CROSSTAB_1.getTopMargin() + CROSSTAB_1.getHeight());
ok, what it does.
Assumptions,
* the query looks like mine
* 2 dims in rows,
* no sums in-between (this would be possible, but the row calculation would e more complex)
* the header does not change (here also based on the query geometry you could calculate as well)
This script is mainly implementing the idea above, by calculation of rows.
first, take all members for both dimensions
then, ask for data
* if there is a data, you get the string
* if this result set does not have data for this combination, there is empty string
(assumption, you have no rows w/o data for the measure)
then, add header and footer heights, resize crosstab-1 and place crosstab-2 a bit below (1 px in my case).
Not sure if this makes you happy, but in standard I am afraid this is the best what I can imagine. for small resultsets this should work quite ok from performance point of view.
SDK Solution
* I can imagine that SDK would be easier - either I could extend the with event after data change which would send back the real number of rows / columns - then the calculation in BIAL is not necessary.
* also, using the the work could be same - the table itself would bring the event back to the server - how many rows (and then resize itself) - based on the rows, other table can be re-positioned.
So, what you think?
Karol
Hi Karol
This solution it works if the crosstab ist not to complex. When we have hierarchy and more then 3 Members has this solution take a long run time and it not work 100%.
We to have try the SDK "Result Set Information". The SDK is easier and would work with count the row. The Problem is the SDK show as the right number of row, but we found not scripting possibility to get the number row. Did you have a idea to get this information out from the SDK?
Best Regards
Gabriel Motor
Hi Gabriel,
the event is just inserted into the component.
in your case, the "central data provisioning" can be set to false, the event must be true and the results probably must be shown.
you can access the information via script:
var res = "";
res = res + RESULTSETINFO_1.getDataInfoNumberOfCells() + "\r\n";
res = res + RESULTSETINFO_1.getDataInfoNumberOfDataColumns() + "\r\n";
res = res + RESULTSETINFO_1.getDataInfoNumberOfHeaderColumns() + "\r\n";
res = res + RESULTSETINFO_1.getDataInfoNumberOfRows() + "\r\n";
TEXTAREA_1.setValue(res);
perhaps this will help you more than the complex script.
example app is here applications/SDK_DATAINFO_EVENT at master · org-scn-design-studio-community/applications · GitHub
Karol
Hi,
first, you need to install newer version of the SCN community components. Then you will see more options in the RESULTSETINFO component. I have updated the component yesterday.
sorry, I forgot to change the internal number in biapp file, just edit the file and change the verson
<bi:biapp bi:version="1500"
to
<bi:biapp bi:version="1400"
then you can load the application.
Karol
Hi Karol,
I used for a requirement of one of my customers your RESULTSETINFO for arranging crosstabs. This works pretty well. Nevertheless, I found a bug in it. Your component is working well as long as the visibility of the RESULTSETINFO is set to true. Once you set it to false, it's not possible anymore to reference to the return values.
I am using DS 1.6 SP01.
Best regards,
Karsten
Hi Karol,
in a first draft I put the component in a panel and set the bottom margin of this panel to -200. The result was that the system automatically put a pretty ugly scrollbar in the report. Thus, I simply set the component inside the report and set it to invisible. Now, my issue came into place.
Meanwhile, I considered your comment and put the RESULTSETINFO outside the report - works pretty fine :=)
Best regards,
Karsten
Hi Gabriel,
What you have described is also similar to how tables can be set up in WebI, where the top alignment of the second table is pegged to the bottom of the first table. Unfortunately, this behaviour is not supported out-of-the-box in Design Studio and I'm not sure there's a straight forward workaround either.
If the crosstab included an OnExpandCollapse event (which it doesn't) then you could have possibly scripted the position of the second crosstab by changing its top margin dynamically. Also, as you've pointed out, you would need to suppress the vertical scrollbar which I don't think is possible. Even if you could suppress the scrollbar through CSS, I don't think the crosstab would just automatically expand/contract in height when you clicked on a hierarchy node.
Perhaps others may have ideas but in situations like this, my personal opinion is to try to simplify the design based on existing functionality rather than trying to force a legacy design by jumping through hoops with CSS and other coding.
So in this case, I would ask the question, why is it not sufficient to have two scrolling crosstabs of fixed height stacked vertically?
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
Thank a lot for the answer.
The problem is we have 3 crosstabs one below the other. All crosstab should be vertical below, because the end user compare the values and if the crosstabs vertical it is more clear for the end user.
And if the end user add one dimension in the crosstab with the navigation panel, all 3 crosstabs should have the new dimension and the crosstabs should not overlap.
Best Regards
Gabriel
Hi Gabriel,
Okay, the requirement makes sense. But why the need to specifically eliminate the vertical scrollbars? With the standard layout functionality, you can still stack the three crosstabs vertically (either as fixed height or inside the Grid Layout container for flexible height) but they will have a scrollbar when the rows exceed the crosstab height.
Regards,
Mustafa.
Hi Mustafa
If the 3 crosstabs has a scrollbar the data are not so good comparable. The user has always scroll in all 3 crosstabs on the same position of the crosstab.
This reports are used for 2'500 end user. In the WAD this function was existing. When we have to inform this big numbers of end user, they will not except the solution with the scrollbar.
did you have a other idee?
Best Regards
Gabriel Motor
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.