1 Reply Latest reply on Oct 24, 2011 11:01 AM by Simon Ma

    Getting an error trying to create a report with parameters

    tlman12 Rookie

      I'm trying to create a report using custom data and i want to be able to select parameters.

       

      i'm using a custom landesk query for the base but for some reason when i add the parameter i created for the to the main query i get the message "An error occured while attempting to run the repot. Click here for detailed information.

       

      i get this error even before i change the SQL query to incorperate the (?)

       

      steps i do to recreate the error

       

      create a LDMS query for 4 peices of custom data (scanned from computer registry put into custom data catigory) and 2 pieces of LDMS data Computer Name and IP

      the query just specifies that one of the pieces of custom data exists

      i then choose the colums i want displayed

      i then create a new report and choose the new query as the base and go into the report designer

      i right click parameters and add a new one

      i choose one of the custom data fields as the data i want diplayed multi line and black accepted

      at this point i can preview and the data i want shows up as parameters, i can click view and obvoulsy it dosn't care what i choose for a parameter it returnes all data but it still works

      i then add the parameter to the data set query (i'm not changing the sql query at this point)

      i do a preview and i get the message

       

      even if i do add the (?) i still get an error

       

      i have very little background in creating SQL statements but i've read a few documents and looked at the statemens in other querys with parameters and as far as i can tell i'm doing everything right, but i know it's going to be something stupid

       

      if there is any other info i can proovide please let me know

        • 1. Re: Getting an error trying to create a report with parameters
          Simon Ma Employee

          Hello,

           

          I think that the problem is coming from the fact that you are using the same query/Dataset for the parameter and the output data (Am I right ?)

          You should  :

            - create a new Dataset (could be based on the same query, without the "?" for the parameter of course)

            - re-create the parameter base on the new Dataset

            - re-declare the new parameter in the "Main" query

            --> Test if it show up something (all data or an error ??)

           

            - Add the correct synthaxe with "?" in the "Main" query

           

          And it should work...

           

          Simon