#1 2017-01-27 10:16:04

Sreejith S
Member
Registered: 2016-11-16

Parameter view via url

Hi,


I am trying to get the parameter list of a crystal report  via url while executing the same.

For eg :-

http://reportserverUrl/reportserver/reportserver/httpauthexport?id=1234&user=sa1&apikey=abcdef&format=pdf&download=false&v=parameter

Its just showing the report view , but not the parameters in the specified report.

How can we list the parameters while executing the report via url?

Could you please help us to sort out this.

Regards,
Sreejith

Last edited by Sreejith S (2017-01-27 10:19:03)

Offline

#2 2017-01-27 11:19:34

wonky
Member
Registered: 2016-03-01

Re: Parameter view via url

We are building a report configuration screen.  It would be great if we could get the parameters for a given report so that we can dynamically populate the inputs that are available and required.

Offline

#3 2017-01-27 13:23:00

Sreejith S
Member
Registered: 2016-11-16

Re: Parameter view via url

Hi,

We have found the solution for our issue , We just combined two tables from internal database and created a table with report id and parameters . Created a report with parameter report_id in the RS using that combined table and executed via url. Thus we got the result by executing the below url:-

http://reportserverUrl/reportserver/reportserver/httpauthexport?id=1234&user=sa1&apikey=abcdef&format=pdf&download=false&p_report_id=5678

Regards,
Sreejith

Last edited by Sreejith S (2017-01-30 09:28:36)

Offline

#4 2017-01-27 14:03:42

Sreejith S
Member
Registered: 2016-11-16

Re: Parameter view via url

Hi ,

Is there any way that we could get the parameter data type such as 'integer' , etc of a report in ReportServer while executing the same via url.

Regards,
Sreejith

Last edited by Sreejith S (2017-01-30 11:14:52)

Offline

#5 2017-01-31 14:10:41

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Parameter view via url

Hi Sreejith,

parameters can only have the following types: "text", "date", "datasource", "file selection", "script" and "user variable". You can see these when you open the report configuration -> parameters, and click on the arrow next to "Parameters".

When you add a new parameter, it is inserted into the table "rs_parameter_definition", you can see its id in the column "entity_id". In order to identify the parameter type, you can query the following tables and look for the id:
rs_text_param_def
rs_datetime_param_def
rs_datasource_param_def
rs_filesel_param_def
rs_script_param_def
rs_uservar_param_def

So you can use your previously created internal database query and modify it to include the param types.

Hope this helps.

Cheers,
Eduardo

Offline

#6 2017-02-03 13:34:09

Sreejith S
Member
Registered: 2016-11-16

Re: Parameter view via url

Hi Eduardo ,

Thanks for you answer , but is there any way so that we could get the types such as integer, etc , since we can't validate with these types . If a user  puts some string, but it's supposed to be a integer, the report would fail, and it will become a mess.

Could you please help us to sort this issue.

Regards,
Sreejith

Last edited by Sreejith S (2017-02-03 13:36:14)

Offline

#7 2017-02-03 13:47:49

wonky
Member
Registered: 2016-03-01

Re: Parameter view via url

My idea was to start using JRXML reports since they are readable (XML), and we can extract data types, and if the field name in the JRXML matches the Parameter Name, even if we have to build some kind of lookup table to map them, then we can know how to do proper validation in our frontend.

For example: Fieldname could be like SqFtArea or something, and we want to show the user "Area in Square Feet"

Offline

#8 2017-02-08 13:46:09

wonky
Member
Registered: 2016-03-01

Re: Parameter view via url

We are doing as I suggested.  We had to write a cron that dumps the internal database to one that is accessible to our code, hourly.  Then, when a report is selected on our report configuration screen, we are trying to build the inputs by parsing the JRXML for the field captions and the data types, so that we can populate the appropriate controls.  We are open to suggestion on whether there is any easier way to construct our own report configuration screen.

It does seem like if there were a proper integer data type, it might make life easier.

Offline

Board footer

Powered by FluxBB