facebook

Birt report parameters not taking new values at runtime

  1. MyEclipse Archived
  2.  > 
  3. MyEclipse Reports
Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #323499 Reply

    globus68
    Member

    Hello Swapna, and thank you for your quick reply!

    I am new to MyEclipse Reports, so I have to admit that the problem was a bad SQL when I tried out the reports. However I have another question about the same topic: The reports now works for my one and only parameter to the WHERE-clause. However, I have two more parameters for sorting. The parameters are chosen from two equal lists called parOrder and parOrder1, the first set up to get the resultset in ascending order and the second one in descending order.

    The sorting is made like this for parOrder, with Ascending in Direction in Edit sort key:
    if( params[“parOrder”].value == “animal_id” ){
    row[“ANIMAL_ID”];
    } else if( params[“parOrder”].value == “ear_no”){
    row[“EAR_NO”];
    } else if( params[“parOrder”].value == “birthdate”){
    row[“BIRTHDATE”];
    }

    and like this for parOrder1, with Descending in Direction in Edit sort key:
    if( params[“parOrder1”].value == “animal_id” ){
    row[“ANIMAL_ID”];
    } else if( params[“parOrder1”].value == “ear_no”){
    row[“EAR_NO”];
    } else if( params[“parOrder1”].value == “birthdate”){
    row[“BIRTHDATE”];
    }

    When I run the report i choose blank for parOrder and ear_no for parOrder1 and the report is rendered correctly sorted. When i rerun the report and select ear_no on the first and blank on the second to get it sorted ascending, it renders as the first run. When I do the same in MyEclipse Reports Designer Perspective preview it behaves correctly.

    Sorry about bad explanation. Hope you understand…

    Any suggestions would be helpful

    This is from .log:

    
    !SESSION 2012-02-20 22:04:51.012 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=1.6.0_13
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=no_NO
    Command-line arguments:  -os win32 -ws win32 -arch x86_64
    
    !ENTRY org.eclipse.mylyn.tasks.ui 2 0 2012-02-20 22:05:19.032
    !MESSAGE No search provider was registed. Tasks search is not available.
    
    !ENTRY org.eclipse.jface 2 0 2012-02-20 22:05:43.432
    !MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
    !SUBENTRY 1 org.eclipse.jface 2 0 2012-02-20 22:05:43.432
    !MESSAGE A conflict occurred for CTRL+F9:
    Binding(CTRL+F9,
        ParameterizedCommand(Command(org.eclipse.mylyn.tasks.ui.command.activateTask,Activate Task,
            ,
            Category(org.eclipse.ui.category.navigate,Navigate,null,true),
            ,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.ui.contexts.window,,,system)
    Binding(CTRL+F9,
        ParameterizedCommand(Command(RunSQLAction,Run SQL,
            Run SQL,
            Category(org.eclipse.ui.category.edit,Edit,null,true),
            ,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.ui.contexts.window,,,system)
    
    !ENTRY org.eclipse.jdt.debug 4 125 2012-02-20 22:06:09.003
    !MESSAGE Internal error logged from JDI Debug: 
    !STACK 0
    org.eclipse.jdi.TimeoutException: Timeout occurred while waiting for packet 2.
        at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:171)
        at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:180)
        at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:177)
        at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:246)
        at org.eclipse.jdi.internal.VirtualMachineImpl.getIDSizes(VirtualMachineImpl.java:896)
        at org.eclipse.jdi.internal.VirtualMachineImpl.packetSendManager(VirtualMachineImpl.java:331)
        at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:173)
        at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:208)
        at org.eclipse.jdi.internal.request.EventRequestImpl.enable(EventRequestImpl.java:231)
        at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget$ThreadStartHandler.createRequest(JDIDebugTarget.java:1840)
        at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget$ThreadStartHandler.<init>(JDIDebugTarget.java:1827)
        at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.initializeRequests(JDIDebugTarget.java:486)
        at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.initialize(JDIDebugTarget.java:429)
        at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.<init>(JDIDebugTarget.java:305)
        at org.eclipse.jdt.debug.core.JDIDebugModel$1.run(JDIDebugModel.java:160)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
        at org.eclipse.jdt.debug.core.JDIDebugModel.newDebugTarget(JDIDebugModel.java:164)
        at org.eclipse.jdt.internal.launching.StandardVMDebugger.createDebugTarget(StandardVMDebugger.java:438)
        at org.eclipse.jdt.internal.launching.StandardVMDebugger.run(StandardVMDebugger.java:314)
        at com.genuitec.eclipse.core.JavaVMUtility.execute(JavaVMUtility.java:277)
        at com.genuitec.eclipse.easie.core.EASIEServerManager.start(Unknown Source)
        at com.genuitec.eclipse.easie.core.EASIEServer.start(Unknown Source)
        at com.genuitec.eclipse.easie.core.ui.action.ServerStartAction.�(Unknown Source)
        at com.genuitec.eclipse.easie.core.ui.action.ServerStartAction.basicRun(Unknown Source)
        at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
        at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.runWithEvent(Unknown Source)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
        at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        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:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
        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:597)
        at com.genuitec.pulse.eclipse.launcher.Main.main(Main.java:110)
    
    !ENTRY org.eclipse.osgi 2 0 2012-02-20 22:06:30.824
    !MESSAGE While loading class "org.eclipse.wst.jsdt.internal.core.JavaModelManager$16", thread "Thread[Worker-0,5,main]" timed out waiting (5004ms) for thread "Thread[Worker-4,5,main]" to finish starting bundle "org.eclipse.wst.jsdt.core_1.1.100.me201109222040 [960]". To avoid deadlock, thread "Thread[Worker-0,5,main]" is proceeding but "org.eclipse.wst.jsdt.internal.core.JavaModelManager$16" may not be fully initialized.
    !STACK 0
    org.osgi.framework.BundleException: State change in progress for bundle "reference:file:/C:/Users/vs.NORSVIN/AppData/Local/MyEclipse/Common/plugins/org.eclipse.wst.jsdt.core_1.1.100.me201109222040.jar" by thread "Worker-4".
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1087)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:297)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
        at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
        at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at org.eclipse.wst.jsdt.internal.core.JavaModelManager$15.run(JavaModelManager.java:4182)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
        ... 16 more
    Root exception:
    org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1087)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:297)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
        at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
        at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at org.eclipse.wst.jsdt.internal.core.JavaModelManager$15.run(JavaModelManager.java:4182)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    

    Best regards
    globus68

    #323507 Reply

    support-swapna
    Moderator

    globus68 ,

    Glad that you got it working.

    For the second issue, I am not well versed with Reports, so please give detail steps on how you set the report parameters, how the lists are created and the sorting for me to be able to replicate it at my end.

    #323522 Reply

    globus68
    Member

    Setup
    MyEclipse 10
    New workspace with Java 1.7.0_02. Text file encoding: UTF-8
    Apache Tomcat 7.0.23 using Java 1.7.0_02
    Checked out my main web application project and its dependant projects from subversion. The web application project is not at this point enabled with MyEclipse Reports

    Implementing a test report

    Intention: testreport with one parameter to the WHERE-clause and enabled sorting of one of three columns ASC and DESC. Now following the directions in http://www.myeclipseide.com/documentation/reporting/quickstart/ and http://download.eclipse.org/birt/downloads/examples/reports/Parameters/Parameters.html :
    [list=]1. Adding Report Capabilities to my web project called PigFo
    2. Creating a new report using Report-wizard:
    3. Report file semenboars.rptdesign. Also generating sample report access webpage.
    4. Choosing blank report.
    5. Report access web page: reportSemenboars.jsp as «An embedded report viewer [JSP Tag]». HTML display format. Also checking «Use advanced report viewer» and «Occupy the entire page»
    6. After «Finish», MyEclipse Report Design Perspective opens
    7. Creating Data Source called PROD using Oracle Thin driver to our company’s database. Connects successfully
    8. Creating a dataset called semenboars using PROD data source
    9. First trying a query without parameters: select a.animal_id, a.herd_no, a.ear_no, s.avlsnr, s.navn, s.semin_inn, s.semin_ut from ban_animal a, ban_breeding_animal ba, seminraane s where a.animal_id = ba.animal_id and ba.herdbook_no = s.avlsnr
    10. Changing data types from «Decimal» to «Integer» for animal_id, herd_no, ear_no and herdbook_no (I do not know why the Designer types these as Decimal in the first place)
    11. Previewing result in «Edit data set» box looks good
    12. Dragging the semenboars dataset to the layout makes the table. Previeweing the layout looks good regarding the data, however looks bad regarding layout (haven’t applied some styles yet… :)). All good for now
    13. Mapping everything in Spring to get the report up in a new page.
    14. When running the report in PigFo everything looks good for now
    15. Now I will add a Where-parameter
    16. Adding a parameter in the query in the «Edit Data Set» box: and herd_no = ?
    17. Adding the parameter in «Edit Data Set» linked to a ListBox with three static Value/Display Text lines. The parameter list is called paramHerds. Data type is Integer
    18. In Property Editor – Data Set Parameter Binding I bind the herd_no parameter to paramHerds value
    19. When running Preview from the Latout in MyEclipse Report Design Perspective everything works as expected. When selecting different herd numbers in the parameter input the report renders for the selected herd. All well.
    20. Now trying my web application.
    21. First run: I select one of the values in the dropdown list and the report displays correctly
    22. Rerunning in the same «MyEclipse Report Viewer», selecting another value from the input dropdown. The same report as first run is shown, which is the same behaviour as the initial message in this thread. Also when I try to run it a third time, the value selected for the input in second run is exchanged with the value selected from the first run. That is, the list in the dropdown box is altered[/list]

    I did not reach the sorting problem this time. Now the parameter problem occurred again, this time without a lousy sql. Also, the parameter list was changed. I have compared the report setup with the previous mentioned report where parameters work but sorting don’t, and I cannot find any differences regarding the WHERE-parameter. It seems like there are some bugs here. I think I cannot use this in a production environment. I think I give up this and try the Engine API instead.

    #323628 Reply

    support-swapna
    Moderator

    globus68 ,

    We are investigating this issue. We will get back to you.
    Sorry for the inconvenience caused.

Viewing 4 posts - 16 through 19 (of 19 total)
Reply To: Birt report parameters not taking new values at runtime

You must be logged in to post in the forum log in