Jump to content
We've recently updated our Privacy Statement, available here ×

Executing report using parameters through URL


emmanuelpaul70

Recommended Posts

Hello,

I am an absolute beginner in Jasper Server and i'm having the problem

I have a report published on my JasperServer installation

It has the following input control

Name = ParcelType = Multi-select query [/code]

When I'm running my report from I-Reports or from my JasperServer portal, it runs succesffuly.

The point is that i would like to run it using an url and pass the parameter in it

Here is my parameter in the report

Parcel,  type = Java.util.CollectionDefault value expression : new ArrayList(Arrays.asList(new String[] {"ZK0040"}))[/code]

Here is my query  using this parameter :

select a.id_parcel, b.nom_prop, b.adress from parcel a, prop bwhere a.id_parcel=b.id_parceland $X{IN,a.id_parcel,Parcel}order by b.nom_prop[/code]

When i'm passing one value for the Parcel parameter, it runs succesfully :

 
http://server:8080/jasperserver/flow.html?_flowId=viewReportFlow&ParentFolderUri=%2FDBASE%2FRapports&ndefined=&standAlone=true&reportUnit=%2FGEOPARCEL%2FRapports%2FConv&j_username=jasperadmin&j_password=jasperadmin&Parcel=ZN0202[/code]

But I would like to pass several values for my Parcel parameter (ex : ZN0202, AB125, AA321)

I tried that :

 
http://server:8080/jasperserver/flow.html?_flowId=viewReportFlow&ParentFolderUri=%2FDBASE%2FRapports&ndefined=&standAlone=true&reportUnit=%2FGEOPARCEL%2FRapports%2FConv&j_username=jasperadmin&j_password=jasperadmin&Parcel=ZN0202&Parcel=ZN0203[/code]

The result is that only my first value for parameter is used.

I tried using these expressions :

Parcel=ZN0202,ZN0203

Parcel=(ZN0202,ZN0203)

Parcel=%28ZN0202%2CZN0203%29

My report crashes.

Does anybody have an idea?

I'm using Jasper Server 3.7.0 under Windows 2003 R2 SP2 and I-Reports 3.7.3

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Thanks Lucian for your answer.

I'm using Jasper Server CE 3.7.0 and I-Reports 3.7.3 on Windows 2003 R2 SP2.

I found a way to walk through my problem  using a parameter defined as string and a single value input control (string type).

I'm passing the parameter like this &Parcel=('ZN0202','ZN0203')

I don't think it' the correct way but it seems to work fine.

I woul prefer to pass the parameter the way I read it in Jasper Server user's guide as well as your explanation but it still doesn't work.

Link to comment
Share on other sites

emmanuelpaul70
Wrote:

I woul prefer to pass the parameter the way I read it in Jasper Server user's guide as well as your explanation but it still doesn't work.

Log a bug for it.  Include any information that could be used to reproduce the error.

Regards,

Lucian

Link to comment
Share on other sites

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...