通过url传递参数 [英] Passing parameters through the url

查看:501
本文介绍了通过url传递参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以访问我使用ireport创建的报告。我正在使用一个网址,让我看一下JasperServer界面的报告。它看起来如下:

I am able to access a report, that I created with ireport. I am using an url which let's me have a look at my report from the JasperServer interface. It looks like following:

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples%2FTest&reportUnit=%2Freports%2Fsamples%2FTest%2FEinReport&j_acegi_security_check&j_username=jasperadmin&j_password=jasperadmin

我的问题是:一个 可以通过此网址传递参数 ,如果可能,它是如何完成的?我在iReport的SQL查询中有3个变量,名为Startdatum,Enddatum和username。

My question is: can one pass parameters through this url and when it is possible, how is it done? I have 3 variables in my SQL query in iReport called, Startdatum, Enddatum and username.

推荐答案

我只需要添加输入控件然后添加这些参数。

I just had to add input controls in the JasperServer interface and then add those parameters.

之前

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples%2FTest&reportUnit=%2Freports%2Fsamples%2FTest%2FEinReport&j_acegi_security_check&j_username=jasperadmin&j_password=jasperadmin

之后

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples%2FTest&reportUnit=%2Freports%2Fsamples%2FTest%2FEinReport&j_acegi_security_check&j_username=jasperadmin&j_password=jasperadmin&Startdatum=2014-04-08&Enddatum=2014-04-11&username=firstUser

基本上只需将输入控件和这些参数添加到url中。

Basically just adding input controls and these parameters to the url.

&Startdatum=2014-04-08&Enddatum=2014-04-11&username=firstUser

这篇关于通过url传递参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆