crinch Posted August 6, 2012 Share Posted August 6, 2012 Hi, I am using JaserReport Server 4.5, I have created a report using iReport which has query. It runs successfully and it is input based report, the report takes input from user while go to preview in iReport.I need to create a dashboard and embed this report in Jasper Server. I am not getting understand how to do this becuase the report is parameter based.I need help to how to implement this scenario.Thanks in advance Link to comment Share on other sites More sharing options...
oesina Posted August 6, 2012 Share Posted August 6, 2012 After you deploy a report, you need to create Input Controls with the same Names (Ids) as the report parameters. You can define behavior for your input control - wether it's drop down list, checkbox, text entry etc. If it's a query for values - you will need to define a datasource for your query and the query text.See "Adding Input Control" chapter at http://help.jaspersoft.com/Content/JasperServer-Help-Book/Adding_Report_Units_from.htm Hope that helps,Olga Link to comment Share on other sites More sharing options...
crinch Posted August 6, 2012 Author Share Posted August 6, 2012 Olga, I am really thankful for your reply. My requirement is not an input control rather an a parameter from the URL when this report will be accessed. I am already created a data source.So how I will enter parameter in the URL and that should be acceptable while running a report in the Jasper Report Server. Link to comment Share on other sites More sharing options...
oesina Posted August 6, 2012 Share Posted August 6, 2012 You still need to define input control, you can say "invisible" on it if you don't want the users to change it. Once you have Input Control, JasperServer knows it can use that report with a parameter. You can add parameter name and the value to URL when you execute the report. Link to comment Share on other sites More sharing options...
crinch Posted August 6, 2012 Author Share Posted August 6, 2012 I have created report in iReportMy Query was===========SELECT sp.OrderId, sp.OrderDtTm,sp.Email,o.CustomerID, C.FirstNameB,C.LastNameB, sp.Subscribe, sp.Item, sp.StyleNo, sp.Size, sp.Color,sp.Quantity, sp.Price, sp.Total,sp.BillingCountry, sp.ShippingCountry, sp.StoreOrderNo FROM tblshippedorders sp LEFT JOIN orders o on (sp.OrderId = o.ID) LEFT JOIN customers C on (C.ID = o.CustomerID) WHERE sp.PartnerId =$P{parternerId} ORDER BY `sp`.`OrderDtTm` ASC===========When I run the report it takes input from me and fetch the data successfully.Now I add this reoprt in report unit and created an input control which will be promt when the report will run. Would you like to tell me what will be the input controller name and what will be parameter name in the URL so the report could run successfully.Thanks again! Link to comment Share on other sites More sharing options...
oesina Posted August 6, 2012 Share Posted August 6, 2012 Sounds great!Add to your report URL parameterID=abcd.For example for demo Customer report the URL is as follows:http://localhost:8080/jasperserver-pro/flow.html?_flowId=viewReportFlow&reportUnit=%2Fsupermart%2Fdetails%2FCustomerOverviewReport&customerId=4021&reportLocale=enit should work just fine! Link to comment Share on other sites More sharing options...
crinch Posted August 6, 2012 Author Share Posted August 6, 2012 I have done this, I am very thankful to you for this.Thanks alot Olga!Post Edited by crinch at 08/06/2012 10:47 Link to comment Share on other sites More sharing options...
oesina Posted August 6, 2012 Share Posted August 6, 2012 cheers! Link to comment Share on other sites More sharing options...
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