Cascading Input Controls for JasperServer 3.5

0

Cascading input controls allow you to define a set of linked parameters, like country -> state -> city.

 

I have made an overlay patch for JasperServer 3.5 with documentation and an example, which is available here http://jasperforge.org/plugins/esp_frs/file.php?id=96&group_id=112&relid=42. This is a pre-release of the functionality that will be in the next full JasperServer release, Please give feedback about how this works for you on this forum, or on the wiki at: http://jasperforge.org/plugins/mwiki/index.php/Jasperserver/Cascading_input_controls

 

Sherman

Jaspersoft



Post Edited by swood at 08/24/2009 23:03
swood's picture
2377
Joined: Jun 21 2006 - 12:48pm
Last seen: 6 years 8 months ago

30 Answers:

0

Hello swood!!

I checked the cascading patch its working fine with the given example . I checked this with our sample data it works perfectly......

I used JasperServer 3.5.0 Community Edition.

 

Thank  for giving  such feature it was much awaited since long.

Thanks & Regards,

Yash

Consulting 101 Systems Pvt. Ltd.




Post Edited by yashdeep at 25/08/2009 11:29 AM



Post Edited by yashdeep at 25/08/2009 12:03 PM
yashdeep's picture
Joined: Oct 6 2008 - 1:03am
Last seen: 10 years 8 months ago
0

Thank you Swood ,

                                    Adding this Overlay patch with Jasperserver 3.5.0 is cool .

                                    I tried also this patch with jasperserver 3.5 but get lots exception

                                    The log has been attached.

Vishal

vishal29bhp's picture
Joined: Mar 6 2009 - 3:23am
Last seen: 10 years 3 months ago
0
Hello Shermann, i tested this new features and it works perfectly with our community edition instance. Awesome feature that makes it easy to analye over different states in different countries or over different customers per compnay. Jaspersoft made a great job. Thanks Jens
jens_noering's picture
Joined: Feb 20 2007 - 11:54pm
Last seen: 3 years 11 months ago
0

Vishal,

 

You can only use this with JasperServer Community Edition 3.5, not a Professional Edition. I'll see about getting a version of cascading input controls for Pro v3.5, and 3.5.1.

 

 

Sherman

Jaspersoft

swood's picture
2377
Joined: Jun 21 2006 - 12:48pm
Last seen: 6 years 8 months ago
0

Hello!!

I would like to know how to use "OR" condition in the cascaded input controls, for example i have country --> State--> City  prompts on report.

I want to fill all countries, all states and all cities on report load.

Now

1. If only country is selected then city should reload irrespective to state selection.

2. If only State is selected then city should reload according to state selection.

I tried these conditons in input controls but won't worked. Here is sample  Queries

-- For Country Prompt

select Country from Country_t

-- For State Prompt

Select State from state_t where county='$P{Country_p}'

-- For City Prompt

Select city from city_t where county='$P{Country_p}' OR state='$P{State_p}' etc

None of my input control is Mandatory.

If any workaround is thr then pls let me know.......

Anyways cascaded control is a grate feature............... once again thanks for this..

Thanks & Regards,

Yash

Consulting 101 Systems Pvt Ltd.



Post Edited by yashdeep at 26/08/2009 03:11 PM
yashdeep's picture
Joined: Oct 6 2008 - 1:03am
Last seen: 10 years 8 months ago
0

Hello Jaspersoft,

                              I installed jasperserver 3.5.0 community edition .

                              I upload a sample report and when i click on run report i get the follwoing javascript error in Internet Explorer.

                              but this is working fine with Mozila Firefox . How do i remove this error in IE.

                             I got this error in Internet Explorer after implementing Cascading Input Control Patch.

regards

Vishal

vishal29bhp's picture
Joined: Mar 6 2009 - 3:23am
Last seen: 10 years 3 months ago
0
Same error for me. Tested ist in first step with Firefox and everything works fine. But with the Internet Explorer the javascript error appears. Error appears in the commons.js javascript file that has not changed with the update. Thanks & Regards, jens
jens_noering's picture
Joined: Feb 20 2007 - 11:54pm
Last seen: 3 years 11 months ago
0

vishal29bhp
Wrote:

I upload a sample report and when i click on run report i get the follwoing javascript error in Internet Explorer.

Fix available at http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=62816

Regards,

Lucian

lucianc's picture
7055
Joined: Jul 17 2006 - 1:10am
Last seen: 2 weeks 6 days ago
0

Thanks guys, this is great! I'm now merrily cascading things all over the place.

baggypants's picture
Joined: Apr 7 2009 - 12:43am
Last seen: 10 years 2 months ago
0

When do you expect this to be available in JasperServer Pro?

anatm1's picture
1
Joined: Jul 23 2007 - 9:23pm
Last seen: 11 years 11 months ago
0

Hi,

Ive been trying to add this cascading prompts with the community edition of jasperserver 3.5 and still i am facing the same problem which vishal had faced. I guess i am not using the exact version of jasperserver for which this patch was built for.. attaching the server log file along with this post. Please help me in solving this issue. Please provide the exact link to download the particular jasperserver with which cascading prompts work. 

Also, when can we expect a patch to add cascading prompts to the Professional editon. Can i have any help regarding creating this patch on my own(by editing the patch for community edition) for the professional edition

madhukiran's picture
Joined: May 20 2009 - 1:53am
Last seen: 7 months 3 weeks ago
0

I didn't realise that this is not available for the professional version and have submitted a request to have this overlay patched when we are due to receive our JS. When is the estimated time we will receive this patch?

linvicch's picture
129
Joined: Mar 19 2009 - 7:41pm
Last seen: 10 years 3 months ago
0

I am able to use this patch succesfully.

I would like to select multiple values for first parameter and pass the same values(more than one) to next parameter.

Is it possible using this patch?

I tried using Multiple select query option,whuile configuring input control;but got foll error.

Unknown parameter type java.lang.String for multiple value input

Has anyone implemented this functionality in jasperserver?

nikunj321's picture
Joined: Dec 5 2008 - 2:46am
Last seen: 10 years 6 months ago
0

Hi @ all,

First of all I have to say that the cascading input controls are really nice to work with. Many thanks for that new feature!

But I've got a problem with my multi query input controls on jasperserver 3.5 with the new patch. All of my reports which use multi select input controls with check boxes gave me an error message: control is null. If I click 'ok' it starts working and my report is shown correctly, but the message pops up again after filling the report. Does anybody knew a workaround for this? By the way: if I use only multi select query (without the checkboxes) it works fine without any message.

Regards

Christina

ckampshoff's picture
Joined: Sep 23 2009 - 6:25am
Last seen: 7 months 1 week ago
0
it works great.. now my reports is more attractive. many Thanks ..
malek's picture
40
Joined: Jun 29 2009 - 2:54am
Last seen: 6 years 7 months ago
0

Cascading Input Controls feature will be available in the next Pro and Community releases at the end of the year. Stay tuned! ;-)

 

We will also have release candidate for Community edition around November time frame - would be great if you guys can help us test it out and report all the issues with casdacing inputs on that code line. Look out for the forum post!

 

thx!

marina

mryzhikova's picture
Joined: Nov 28 2006 - 6:09am
Last seen: 4 years 1 day ago
0

Hi Sherman,

I must some think like (very simple) :

select distinct division from operation where numetab = $P{NUM_ETAB}

in Input control so ,

I had install the cascading-ce-v1 patch on my JasperServer 3.5.0 (Community version)

I follow step by step the install procedure.

Now when I use the "Report Options pop-up control" sometime I have Exception : NotSerializeException.

Sometime selectbox is displayed but no data in ...

1/ My question : which exact version of JasperServer this patch is for ?

2/ How can debug for my report run ?

Thanks

Eric

erbru's picture
2
Joined: Sep 22 2009 - 8:13am
Last seen: 9 years 9 months ago
0

Thanks very much for the work you've done on this.  I've just tested here and I've observed that when using a multi-select query input control whose query is referring to a parameter, that you cannot select from the input control list box and have that selection stick.  As soon as you complete a selection, your selection is cleared as if the data is refreshing.  Using a single-select query input control does not have this issue.

tinnyb's picture
7
Joined: Apr 18 2007 - 8:27am
Last seen: 6 months 3 weeks ago
0

 

For the NotSerializableException, can you show the stack trace?

 

The refresh problem has been fixed in HEAD.

 

 

Sherman

Jaspersoft

swood's picture
2377
Joined: Jun 21 2006 - 12:48pm
Last seen: 6 years 8 months ago
0

@tinnyb:

This is answered here: http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=64417#64937

HTH

Christina



Post Edited by ckampshoff at 10/14/2009 08:23
ckampshoff's picture
Joined: Sep 23 2009 - 6:25am
Last seen: 7 months 1 week ago
0

Hi Sherman,

 

Thanks for answer,

I put here the traceback.

After google search, it 's perhaps a spring web flow version problem ... but I am not sure.

After some time (restart reload, and restart again and again) this error go on ...

Some strange caches ..... ??

 

So my pop-up Input control come on my screen but the input control with "

select distinct division from operation where numetab = $P{NUM_ETAB}" on is still empty.

is this the refresh problem ?

Where can I get the last version on Cascading Input Control ?

 

Thanks for your products

 

Sorry for bad english....

 

the traceback NotSerializableException exception :

 

[JPivot] 21 sept. 2009 17:37:04,512 ERROR [Session ] org.apache.catalina.session.StandardManager#doLoad: "IOException" lors du chargement des sessions persista
ntes: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.Report
UnitResult                                                                                                                                                     
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRe
sult                                                                                                                                                           
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)                                                                                  
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)                                                                                    
        at java.util.HashMap.readObject(HashMap.java:1067)                                                                                                     
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)                                                                                        
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                                                               
        at java.lang.reflect.Method.invoke(Method.java:585)                                                                                                    
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)                                                                              
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)                                                                               
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)                                                                           
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)                                                                                  
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)                                                                                    
        at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1392)                                                                   
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:921)                                                                
        at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:393)                                                                        
        at org.apache.catalina.session.StandardManager.load(StandardManager.java:320)                                                                          
        at org.apache.catalina.session.StandardManager.start(StandardManager.java:636)                                                                         
        at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:431)                                                                           
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4155)                                                                           
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)                                                                     
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)                                                                             
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)                                                                               
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)                                                                         
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)                                                                       
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)                                                                              
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)                                                                                  
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)                                                                          
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)                                                             
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)                                                                               
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)                                                                                  
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)                                                                               
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)                                                                              
        at org.apache.catalina.core.StandardService.start(StandardService.java:450)                                                                            
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)                                                                              
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)                                                                                       
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                         
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)                                                                       
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                                                               
        at java.lang.reflect.Method.invoke(Method.java:585)                                                                                                    
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)                                                                                     
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)                                                                                      
Caused by: java.io.NotSerializableException: com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitResult                                 
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)                                                                               
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)                                                                                 
        at java.util.HashMap.writeObject(HashMap.java:1039)                                                                                                    
        at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)                                                                                       
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                                                               
        at java.lang.reflect.Method.invoke(Method.java:585)                                                                                                    
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)                                                                             
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)                                                                            
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)                                                                        
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)                                                                               
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)                                                                                 
        at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1468)                                                                  
        at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:938)                                                               
        at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:516)                                                                      
        at org.apache.catalina.session.StandardManager.unload(StandardManager.java:462)                                                                        
        at org.apache.catalina.session.StandardManager.stop(StandardManager.java:666)                                                                          
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4358)                                                                            
        at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892)                                                                          
        at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1164)                                                                           
        at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1135)                                                                                   
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312)                                                                          
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)                                                             
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1054)                                                                                
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066)                                                                                
        at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447)                                                                               
        at org.apache.catalina.core.StandardService.stop(StandardService.java:512)                                                                             
        at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743)                                                                               
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:601)                                                                                        
        at org.apache.catalina.startup.Catalina.start(Catalina.java:576)                                                                                       
        ... 6 more                                                                                                                                             
[JPivot] 21 sept. 2009 17:37:04,527 ERROR [Session ] org.apache.catalina.session.StandardManager#start: Exception au chargement des sessions depuis le stockage
 persistant (persistent storage)                                                                                                                               
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRe
sult                                                                                                                                                           
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)                                                                                  
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)                                                                                    
        at java.util.HashMap.readObject(HashMap.java:1067)                                                                                                     
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)                                                                                        
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                                                               
        at java.lang.reflect.Method.invoke(Method.java:585)                                                                                                    
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)                                                                              
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)                                                                               
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)                                                                           
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)                                                                                  
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)                                                                                    
        at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1392)                                                                   
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:921)                                                                
        at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:393)                                                                        
        at org.apache.catalina.session.StandardManager.load(StandardManager.java:320)                                                                          
        at org.apache.catalina.session.StandardManager.start(StandardManager.java:636)                                                                         
        at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:431)                                                                           
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4155)                                                                           
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)                                                                     
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)                                                                             
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)                                                                               
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)                                                                         
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)                                                                       
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)                                                                              
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)                                                                                  
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)                                                                          
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)                                                             
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)                                                                               
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)                                                                                  
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)                                                                               
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)                                                                              
        at org.apache.catalina.core.StandardService.start(StandardService.java:450)                                                   &nbs

erbru's picture
2
Joined: Sep 22 2009 - 8:13am
Last seen: 9 years 9 months ago
0

Hi,

little confused about what to choose between the patch linked in this thread and the tutorial available here : http://www.jaspersoft.com/node/4199

Could you enlighten me please ?

tof's picture
tof
5
Joined: Oct 22 2009 - 5:40am
Last seen: 9 years 8 months ago
0

Hi All,

 We are try the cascading 1.0 patch on 3 different computers with out any success.

 When trying the example, the navigator error message console shows errors like intiAggregate, initCascade,... not defined.

 Those functions are defined in cascade.js

The cascade.js file, with other files, has been correctly copied in /webapps/jasperserver/scripts dir.

 This file seems correctly "included" in FillParams.jsp and some other jsp.

 Any ideas ?

Regards,

William.

tambellini's picture
Joined: Sep 2 2009 - 2:14am
Last seen: 9 years 9 months ago
0

The tutorial on jaspersoft.com is superceded by this implementation.

 

Further work has been done on cascading controls, and they will be a part of the 3.7.0 release candidate.

 

Sherman

Jaspersoft

swood's picture
2377
Joined: Jun 21 2006 - 12:48pm
Last seen: 6 years 8 months ago
0

The stack trace comes from some unserializable objects held in the user session. This is messy, but you do not need to worry about them as the cause of the exception does not effect the running of the system or the controls. In the release version, these exceptions will not be seen.

 

This pre-release version did not default the values of the input controls set up for cascading, which is why you see things blank on the initial screen. This is fixed in the release candidate version due out in the next week or so.

 

Sherman

Jaspersoft

swood's picture
2377
Joined: Jun 21 2006 - 12:48pm
Last seen: 6 years 8 months ago
0

William,

 

I don't know why you are getting those errors.

 

What browser are you using?

 

Sherman

Jaspersoft

swood's picture
2377
Joined: Jun 21 2006 - 12:48pm
Last seen: 6 years 8 months ago
0

Sorry for the newbie question but to install this do I just stop the server, copy the files from the WAR directory to the corresponding directory letting it overwrite anything already there?  Then start it back up and get to cascading I suppose?  Also, you said there's been work on the controls that will be in 3.7.  Is there not enough functionality now to use it as is? 

manshack_one's picture
Joined: Aug 18 2009 - 9:29am
Last seen: 2 years 2 months ago
0

I accidentally copied the scripts folder in the zip file to the wrong scripts folder on the server and my input controls weren't working.  Got them in the right place and my regular reports are running again.  Now I'll go play with cascading input controls.

Is this version supporting the multi-select input controls or just the single select ones right now?

 



Post Edited by manshack_one at 11/13/2009 17:11
manshack_one's picture
Joined: Aug 18 2009 - 9:29am
Last seen: 2 years 2 months ago
0

Single selects only.

 

The release candidate with multi-selects and more is out early this week.

 

Sherman

Jaspersoft

swood's picture
2377
Joined: Jun 21 2006 - 12:48pm
Last seen: 6 years 8 months ago
0
I very eagerly await this release. :) The timing couldn't be better. I just got the nested subreport thing figured out and now I need to make nested input controls.
manshack_one's picture
Joined: Aug 18 2009 - 9:29am
Last seen: 2 years 2 months ago
Feedback
randomness