how to hide an external table when there is no data in internal table in BIRT? - birt

I have two tables one inside the other. When there are no detail rows in the inner table i am making it invisible. but i am not able to make the external table invisible.
In detail My inner table heading row and footer is visible even when there are no detail rows so i made the table visibility to true when no detail rows. But i am not able to make the external table invisible with the same logic. it is because even though the inner table is invisible the detail and footer is there so when i say no detail rows no visibility it is not working. so how can i hide the external table when the internal table is invisible?

I would try Binding the data set to the external table and making an aggregation that counts the number of rows in the data set.
Click on the Table
go to Binding in the Property Editor
click Add Aggregation
I called the Column Binding Name RowCount and set the Function to COUNT. Set the Expression to one of the columns from your dataset that you have included in the binding. In my case, I set Expression to row["columnname"].
Click on your table.
go to Visibility in the Property Editor.
check Hide Element and set the Expression to:
row["RowCount"]==0 || row["RowCount"]==null
The element will only display when the RowCount aggregation counts more than 1 row in your dataset.

My solution for this was to create a function that counts the records that meet the desired criterion, in my case select count(*) from my_table where user_id = id.
Then I inserted this function as a detail component that gets the count based on the selected table record.
Then I used the result of the count as a visibility rule. count > 0. this way I can hide the tables that return empty.
Using this trick is possible to hide the secondary table but the count details component will be still there, if you want to hide it you have to put it in a flexbox component. then in the visibility rules you an access you flexbox component and include the rule count > 0

Related

Using DAX to get a table from nested table

In powerBI, I using the python script and generate one table. The generated table is a nested table. Each row value is actually a table. and so now I want to use DAX to copy one specific row value(which is a table), just the "dataset_filtered" table shown as below.
what's the DAX code for this ? or any good suggestions ?
The nested table
This is M rather than DAX.
Click the drop down arrow in the name column to filter the row you want.
Click the expand arrows in the Value column to expand the table.

session item does not change when using lov in primary key

I am implementing a Interactive grid to perform DML operations on a table.
it has combined primary key of two columns
One primary key column is display only and refer to master table and another primary key column I want to have a LOV to select value. LOV is dynamic lov having a display and return value picked from another table.
Inserts are fine but session state item value is set for one row and all the operations are performed on that same row irrespective of which row is selected.
you can see a sample here
https://apex.oracle.com/pls/apex/f?p=128616:2:1964277347439::NO:::
master table name: sample
detail table name: sample_child
primary key in sample child : ID and Name
pop lov is implemented in NAME
LOV values are picked from table: Sample_uncle
LOV display : ID || '-' || NAME
LOV return : ID
you can try to update blabla column of sample_child table to see the issue.
I am not sure how I can give you access to look at the implementation.
I have already tried all the options I can think of
This is to do with your primary keys, the detail table does not appear to have proper ones, thats why it always tried to update the first entry, and I think this is also why every row is marked when you load the table.
Primary keys also do the annoying thing of refusing to be empty, as you can see if you insert a new row, the middle column(which is a PK) is filled with 't1001'.
Since you are dealing with simple tables(and not a whole bunch of joined tables) I always consider it best to use ROWID as PK. So set ROWID as PK for the master table, and ROWID for the detail table. And have the detail table have a Master table be your master table, and then click on the first column in the detail table and set the master column for it. And I also personaly always hide the column that is linked.
I would advise you use ROWID whenever possible as its just so much easier to work with, it does mean you might need to set up a validation to prevent someone adding duplicated values for your actual PK, but since the PK is in the underlying table, they cant enter it anyways(but if you have a validation, the error will be much prettier), whilst if the column is a PK, APEX will prevent duplicates by default.
I hope this helps

Delete columns from BIRT report

I have a BIRT Excel Report with 10 columns. I have a query which executes and brings the data for all the 10 columns.
However, based on one of the input parameters, i need to display just 8 columns. I am able to hide the remaining 2 columns but i would like to delete those 2 columns from the report so that user does not see the hidden columns.
I tried to change the query but i am unable to dynamically set the select parameters.
Is there a way either in Query or in BIRT to remove few columns based on an input condition.
You cannot delete the columns, but it's sufficient to hide them dynamically using the column's visibility expression. You can add an aggregation to the table, using the MAX function for the column data (let's call it max_name).
E.g. if your table column shows the DS column NAME and you want to hide the column if NAME is empty for all rows:
Add an aggration (let's call it MAX_NAME) to the table, with the aggregation function MAX and the expression NAME. Then in the visibility expression of the table column, use !row["MAX_NAME"] as the expression.
After drag and drop the dataset. Right click on column header and select the delete column option.

Selecting only check marked rows in a different table - Mac Numbers

I have a table in Mac Numbers which has a column with checkbox. I am trying to copy only those rows in a second table which are check marked.
I also want to extend this solution to multiple tables; I will have multiple tables having a column with checkbox. I want to copy all those rows into a single table which are check marked.
I tried with LOOPUP function but it didn't help.
How can we do this?
I worked it out in 2 steps -
Used IF condition to put column data if checkbox is checked else put "NA".
Then put a filter on the new table to filter out all rows which has that column with values "NA".

Oracle ADF Table Row Selection Performance Tuning?

I have a problem with an ADF table component in my jspx page.
In my table each row contains 2 LOV component (seleconechoice).Table row selection value is "single". After clicking the row table activates editing the current row after 5 seconds or more times. This table is the most used component in my page. Information entance is provided by this component. So i need to improve performance of this component.
I try some of the techniques above but can't find a solution yet.
Viewobject tuning
Iterator range size and fetch size is equivalent
table content delivery = "immediate" ... so on.
In page definition iterator range size ="50"
table fetchSize="50"
This table is the detail table of another view object in my page.
Any idea?
you need to profile your apps to understand which part of your code causing it.
Try to reduce number of max rows retrieved from database.
Example: VO -> general -> tuning -> only up to row number 10

Resources