attach simple query to report

0

hi

i'm using jasper studio V6.6.0 and i need to attach  very simple query statment like "date" to my report

i following the wizard to create Query by right click in jasper report server then choose query and fill the query name '''date'  then choosing my data source and finally write  my sql statment like 
SELECT
    DATE_FORMAT(CURRENT_TIMESTAMP, '%h:%i:%s %p');

then finish

i can't attach this query to my report !

how i can do this ? can any one help me !

m.harery's picture
Joined: Dec 11 2018 - 3:32am
Last seen: 2 months 1 week ago

3 Answers:

0

There's no query in Data Adapter. What you need to do is create a data adapter to your database. The create a report and specify to use that data adapter.

If you already have a report, click on "DataSet and Query editor dialog" icon. It is the second from the left icon located at the top right side of the report panel. In this dialog, enter your sql statement.

 

hozawa's picture
39247
Joined: Apr 24 2010 - 4:31pm
Last seen: 10 hours 4 min ago
0

so for each query i need to create new data set ? because i need to save those query to be used in others reports

 

 

m.harery's picture
Joined: Dec 11 2018 - 3:32am
Last seen: 2 months 1 week ago
0

Dataset is to define connection to the database. Sharing of a query is not supported.

Option is to use stored queries on the database side.

hozawa's picture
39247
Joined: Apr 24 2010 - 4:31pm
Last seen: 10 hours 4 min ago
Feedback
randomness