3 Replies Latest reply on Mar 4, 2013 7:53 AM by Simon Ma

    Unable to use parameters when creating reports

    Apprentice

      When creating a report in Report Designer, the parameter information of the SQL query will not be accepted correctly. Someone actually just posted a report that I have been trying to create for quite a while now. (http://community.landesk.com/support/docs/DOC-25268). I imported this report and when I perform a simple test edit of the query, the dataset no longer retrieves query results for the table. When I remove the line for the parameter (i.e. where t.TASK_NAME = ?) the dataset will retrieve the query results.

      I also tried making copies of built-in reports that have parameters and the same thing happens when I make an edit to the query for the dataset and save it. The dataset can no longer retrieve the results. When I remove the parameter line the dataset works just fine.

      I have test all of these queries directly against the database using SQL Server Mgmt and they all work fine.

      How do I get Report Designer to accept the parameters?

      I am using LANDesk v9 SP3

       

      Thanks,

      Sundiata

        • 1. Re: Unable to use parameters when creating reports
          Jack.rotherham Specialist

          *BUMP* I get the same issue. Without a parameter I get the fields returned in the report designer. When I add th e? in the query for the parameter then assign the parameter in the right place in the dataset the fields disappear.

          • 2. Re: Unable to use parameters when creating reports
            Apprentice

            Why no one answer this serious problem for a long time? I got the same problem and I posted several times here but no answer until now. I am awaiting a key someone to solve our problems. If there are  some bugs, let me know, please! 

            • 3. Re: Unable to use parameters when creating reports
              Simon Ma Employee

              Hello everyone !!

               

              As you guys, I've faced this issu many times ! When you add a parameter in a query in a dataset, all the data fields disappear.

               

              For information, if you add manually the retreived fields, it works !! but it's very annoying when you have lots of fields...

               

              So here the trick : you need to avoid the SQL query evaluation/test with the parameter. Indeed, when the report engine try to test the SQL query, it failed and that's why it can't retreive the data fields.

               

              To do that :

              • In the DataSet > Query - click on the "Fx" button to open the Expression Editor dialogue box.

              Community Help  - Add Parameter 1.png

               

              • In this box, modify and add the parameter (?)

               

              • Validate the change by clicking "OK" button

               

              • Validate adgain by clicking Accept (DO NOT click on the Check button !!!!)

               

              Community Help  - Add Parameter 2.png

               

              With this method the retreive data field should not disappear !!!

               

              Community Help  - Add Parameter 3.png

               

               

              That's all !!

               

              Simon