|
Re: Hide Detail Row For Nested Table [message #886335 is a reply to message #886179] |
Thu, 14 June 2012 18:49 |
|
Add a visibility expression to the detail row with the expression:
Total.count() < 1
See attached example.
Jason
On 6/14/2012 7:45 AM, Nitin Sharma wrote:
> Dear All,
>
> I have a master table which lists the ParentTicket IDs with some other
> details. Then for each of the Parent Ticket IDs I have a nested table
> which lists down its respective child-ticket IDs. I have a nested table
> for child ticket IDs in the master table of Parent Ticket ID. There is a
> scenario when a parent ticket does not have any child. In this scenario
> there is no entry for the nested table. But there is a redundant blank
> detail row appears. How can I make this detail row invisible wherever I
> do not have any child ticket entries?
>
> Thanks,
> Nitin
|
|
|
Re: Hide Detail Row For Nested Table [message #886545 is a reply to message #886179] |
Fri, 15 June 2012 06:40 |
Nitin Sharma Messages: 10 Registered: May 2012 |
Junior Member |
|
|
Jason,
Thanks for replying but this didn't help. The output remained as it is where empty rows were showing up for no child ticket IDs. I have attached my report design.
There is a nested table for Subtask ID in the merged detail row of parent ID. That's where I want this condition to work. So what I want to achieve is that the detail row of the parent table should not appear when there are no entries for the nested Subtask Table.
Please suggest and help.
Thanks,
Nitin
[Updated on: Fri, 15 June 2012 07:28] Report message to a moderator
|
|
|
Re: Hide Detail Row For Nested Table [message #886828 is a reply to message #886545] |
Fri, 15 June 2012 17:44 |
|
Nitin
Your report did not come through all the way. If you want to hide the
detail row of the parent table when the child table is empty that is a
bit more difficult. Attached is an example that does it with scripting
and it has to be viewed in the webviewer not with the preview tab at the
bottom of the canvas. This is because of the different event order firing.
Jason
On 6/15/2012 2:40 AM, Nitin Sharma wrote:
> Jason,
>
> Thanks for replying but this didn't help. The output remained as it is where empty rows were showing up for no child ticket IDs. I have attached my report design.
> There is a nested table for Subtask ID in the merged detail row of parent ID. That's where I want this condition to work. So what I want to achieve is that the detail row of the parent table should not appear when there are no entries for the nested Subtask Table.
>
> Please suggest and help.
>
> Thanks,
> Nitin
|
|
|
|
Re: Hide Detail Row For Nested Table [message #888784 is a reply to message #888646] |
Mon, 18 June 2012 16:00 |
|
Did the example I posted work in your environment? Are you using the
view in WebViewer option to display it?
Jason
On 6/18/2012 8:19 AM, Nitin Sharma wrote:
> Thanks for replying Jason, somehow this thing didn't work. So you have
> added the script, as mentioned below, at the OnCreate of detail
> row...correct? Is there any other script also which you have added in
> your shared example? My scenario becomes a little more difficult because
> I have done the merging of detail row and added the nested table there.
> Please ignore if a solution is not feasible in this case. Thanks for
> your help.
>
> if( typeof myrownum == 'undefined' ){
> myrownum = 1;
> }else{
> myrownum++;
> }
|
|
|
|
Re: Hide Detail Row For Nested Table [message #890066 is a reply to message #889925] |
Wed, 20 June 2012 21:40 |
|
I am not certain why this in not working in your example. In my example
the outer table has an onCreate script on the detail row that increments
a counter for ever row.
if( typeof myrownum == 'undefined' ){
myrownum = 1;
}else{
myrownum++;
}
the nested table has an oncreate on the detail row that references this
variable and sets a persistent global variable based on this row number.
reportContext.setPersistentGlobalVariable(myrownum, "true");
If the nested table row does not get created no variable is stored.
Then finally on the outer tables detail row there is an onrender script
that sets the visibility based on this persistent variable:
if( typeof myrenderrownum == 'undefined' ){
myrenderrownum = 1;
}
var pgv = reportContext.getPersistentGlobalVariable(myrenderrownum);
if( pgv ){
this.getStyle().display = "block";
}else{
this.getStyle().display = "none"
}
myrenderrownum++;
Jason
On 6/20/2012 5:25 AM, Nitin Sharma wrote:
> yes the example did run in my environment. Yes I am using the view in
> WebViewer option.
>
> Thanks,
> Nitin
|
|
|
|
Re: Hide Detail Row For Nested Table [message #923328 is a reply to message #922929] |
Tue, 25 September 2012 20:38 |
|
Bryan
One way of doing this with a runandrender is to reproduce the tables twice and hide the first group using a visibility expression. Then in the hidden groups inner table put an onCreate script on the row like:
if( typeof myarr== 'undefined' ){
ii = 0;
myarr = [];
}
myarr[ii]=this.getRowData().getColumnValue("ORDERNUMBER");
ii++;
Then in the second group of tables put a visibility expression on the outer table's detail row that looks like:
!BirtComp.anyOf(row["ORDERNUMBER"],myarr)
See attached example
|
|
|
Re: Hide Detail Row For Nested Table [message #1053390 is a reply to message #923328] |
Sat, 04 May 2013 23:15 |
Kaushik B Messages: 1 Registered: May 2013 |
Junior Member |
|
|
Hi Jason.
Thanks for the help.
Your every reply is helping me.
I used your 1st Method , then I am getting expected output in only web viewer.
Also in above reply of you
Please help me to understand "runandrender"
I used your second method but somehow it is not working.
Please Check my attached rptdesign file if I am doing something wrong.
Method 1:Well in Web Viewer
Method 2:Wrong output
Extra Information about my rptdesign file :
I have created report which shows parent workitems with its respective child workitems in single row.
__________________
Parent 1....Child 1
............Child 2
Parent 2....Child 1
............Child 2
............Child 3
__________________
I used nested table to get the output.
I wanted to display only those workitems (Parents) which has child workitems.
Actual output is listing parents with and without child workitem. :wacko:
__________________
Parent 1...Child 1
...........Child 2
Parent 2...
Parent 3...
Parent 4...Child 1
...........Child 2
...........Child 3
Parent 5...
To list row with only parent-child I refer your answers.
Now I am able to get required output but only in Birt's Web viewer. everywhere >> No output
Not in excel or as html. so no output in RTC web client ()
IBM rational team concert
Please Help me to get required output in every format directly.
Data Source : Jazz Data Source
Rational Team concert 3.0.1
Regards
Kaushik
[Updated on: Mon, 06 May 2013 07:23] Report message to a moderator
|
|
|
Re: Hide Detail Row For Nested Table [message #1053870 is a reply to message #1053390] |
Wed, 08 May 2013 03:16 |
|
runandrender is that you can just run it in preview. From the designer, this would be any output except the web viewer. I'll take a look at your report and let you know if I see where the issue is.
Michael
Developer Evangelist, Silanis
|
|
|
|
Powered by
FUDForum. Page generated in 0.03250 seconds