URL invocation in broswer
Hi Everybody..
I don't have map-service data, my data is present in Oracle database, its not spatial data and I need data reports from some of the tables data with where clause filter, I designed reports and tied them with sites base-maps using Essentials Manager so that I can invoke them with reports REST endpoint URL. So I am trying couple ways to achieve these reports.
1. First trial: designed report using Unbound tab in report's designer, used various 'ActiveReports' events like 'ReportStart', 'ReportEnd', 'DataInitialize', 'FetchData', 'PageStart' & 'PageEnd' events methods and configured Database connections and querying process in these event methods. Since I need to pass parameter to SQL query I used 'Parameter' class object in c# scripting, but I am getting an error complaining about 'Parameter' API in scripting. So, I dropped this trial.
2. Second trial: Designed report using SQL tab in report's designer, Since I need to pass parameters using where clause in my query say for exmple:- "select EMPNO, ENAME, JOB, MGR, HIREDATE,SAL,DEPTNO from EMP where job='CLERK' and deptno=20" is my query so I need to pass 'CLERK' & '20' as parameters to query. I wrote an query like "select EMPNO, ENAME, JOB, MGR, HIREDATE,SAL,DEPTNO from EMP where job='<%param:Parameter1%>' and deptno='<%param:Parameter2%>'" in SQL tab's query area. And stored them in essentials site tying with basemaps.
I am able to get the reports with no SQL parameters with like following URL
http://<System_IP>/Geocortex/Essentials/REST/sites/SampleSite1/map/mapservices/1/layers/0/reports/0/run?outputFormat=Pdf&where=1%3D1&spatialRel=Intersects&f=file where
http://<System_IP>/Geocortex/Essentials/REST/sites/SampleSite1/map/mapservices/1/layers/0/reports/0/run as URL with parameters outputFormat=Pdf&where=1%3D1&spatialRel=Intersects&f=file, i.e. where clause '1=1', placing URL plus parameters in browser allows us download report as PDF file.
But if report has parameters like say(Parameter1, Parameter2) as mentioned above in a SQL Query, invoking the report with these parameters like in following URL
http://<System_IP>/Geocortex/Essentials/REST/sites/SampleSite1/map/mapservices/1/layers/0/reports/0/run?outputFormat=Pdf&where=Parameter1%3Dvalue1&Parameter2%3Dvalue2&spatialRel=Intersects&f=file
throws following error.
"code":500,
"message":"Exception has been thrown by the target of an invocation.\nError performing the query: [Cannot perform query. Invalid query parameters.\nUnable to perform query. Please check your parameters.].\nCannot perform query. Invalid query parameters.\nUnable to perform query. Please check your parameters.".
Can anyone please provide sample url(with parameters one) so that I can get a report upon invocation of URL with parameters through the browser.
Thank you.
VM.
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
0 Kommentare