michael.kolowicz Posted May 22, 2015 Posted May 22, 2015 I have create a wrapper for using Japser Server Reports in my own .NET application. The wrapper get the report via getWSClient.My goal is to show the server input controls in my application to select the paramters of the report. It works fine until I have input controls they query data. Then the list of possible entries still empty.My wrapper (a java-class) is following to determine the input controls: // Hier geht es um die Verwendung der InputControls int parametersCount = 0; logger.info("Open report definition on server"); List<ResourceDescriptor> iCtls = new ArrayList<ResourceDescriptor>(); List list = rpt.getChildren(); for (iCounter = 0; iCounter < list.size(); ++iCounter) { ResourceDescriptor rd = (ResourceDescriptor) list.get(iCounter); if (rd.getWsType() .equals(ResourceDescriptor.TYPE_INPUT_CONTROL)) { parametersCount ++; // Umschreiben der ServerDataSource auf eine lokale DataSource, wenn es sich um eine // Query handelt List icList = rd.getChildren(); for (icCounter = 0; icCounter < icList.size(); ++icCounter) { // MISSING PART TO GET DATA TO THE CONTROLL } // Hinzufügen in die Liste der InputControls iCtls.add(rd); } }[/code]After this code i open it ReportUnitRunDialog of the iReport-Source to bring up a dialog with the control ReportUnitRunDialog dlg = new ReportUnitRunDialog(frame, true); dlg.setInputControls(iCtls); dlg.setVisible(true);[/code]If the user select the parameters then i open the report with the selected values // Hinzufügen der InputControls zu den Parametern Map<String, Object> params = dlg.getParametersValues(); for (ResourceDescriptor rd : iCtls) { for (Map.Entry<String, Object> entry : params.entrySet()) { if (entry.getKey() == rd.getName()) { reportData.parameters.put(rd.getName(), entry .getValue().toString()); logger.debug("Users Input : " + rd.getName() + " = " + entry.getValue().toString()); } } }[/code]All this works fine - but I only need the missing part to fill the InputControl with the correct data.A possible Idea is that my application set the properties of the connection to a ???-Object and put into the input control. Or another way could be that the wrapper try to get the needed data (I found helpfull properties like PROP_REFERENCE_URI (the link to the DataSource on server) and PROP_QUERY (the Query that be used from the inputontrol to get data)
hozawa Posted May 23, 2015 Posted May 23, 2015 I'm not sure what's you're doing. I think I have similar requirements but I'm just using REST_V2 APIs or using Visualize.js (when using commercial version).
michael.kolowicz Posted May 27, 2015 Author Posted May 27, 2015 The Feature what I need is to visualise the input controls. I didn´t want create vor every report a own part in my WPF-Application (.NET technologie)I didn´t use the commecial version, so I didn´t have the possibility with Visualize.jsThanks for your comment anyway
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now