Afsarr rr Posted December 26, 2019 Posted December 26, 2019 Requirment : User give the inputs Those inputs are as parameters to the Sql and it returns the records. All records are to be taken as formatted pdf Using TIBCO Spotfire 10.3. Tried below methods. using parameter . I used the sql with parameter directly in the sql. For example. select name,depart,dobfrom employee where name =parameter i am getting error for this. i dont know if i am missing any step here. Information Link i tried creating information link but couldnt. please share how to create information link and then use input parameters Any help is greatly appreciated.
Tyger Guzman 2 Posted December 26, 2019 Posted December 26, 2019 You could use an on demand query with parameters connected to a document property.
Tyger Guzman 2 Posted December 26, 2019 Posted December 26, 2019 For a parameterized query you can use the following example : Set all your parameters with infront of the variable in the sql statement. Then choose your paraemeter input(s) I'm showing using a docuemnt property :
Tyger Guzman 2 Posted December 26, 2019 Posted December 26, 2019 Also remember that the Parameter will always return a String / varchar(). So if you are trying to pass an integer you'll have to alter your SQL statement or wrap the parameter in a function to change to the correct date type.
Afsarr rr Posted December 26, 2019 Author Posted December 26, 2019 Thanks for your answer but user can provide any value not fixed value. Do you have any idea where user can provide any value and based on that sql runs
Tyger Guzman 2 Posted December 26, 2019 Posted December 26, 2019 The document property is a input field so users can input their own value. Just place the document property in a text area so users can edit the value. Or instead on the data on demand you can choose prompt so that users get a pop up while the analysis is loading.
Afsarr rr Posted December 27, 2019 Author Posted December 27, 2019 Greetings, i tried your method . data for 102 showing 1535 is there in database but it is not showing in the report . Kindly explain if it is possible to execute sql query with user input every time input is given
Tyger Guzman 2 Posted December 27, 2019 Posted December 27, 2019 To have the data load on every change of the document property set the on demand setting "load automatically" with a check mark. See previous screenshots. Also the parameter is returned as a string , your column should be string also for this to work or would need to write the SQL to accommodate that the parameter is a string.
Afsarr rr Posted December 27, 2019 Author Posted December 27, 2019 Thanks a lot for your help. one more doubt. when connecting db using below method, data table properties - >type of data ->setting is disabled Do you have any idea how to enable this setting when data type is IMPORTED and NOT EXTERNAL Thanks again for your help
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