Queries on data in reports

When you run a report and have to input data, is it possible to do any queries other than begins with, ends with or contains? For example AND, OR, EXCLUDING.

If so how do you do it?

Many thanks,
Matt Y.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Queries on data in reports

Hey Matt, I'm not sure I understand your question. Do you mean in the SQL query? If so then you can do whatever SQL logic mysql can handle....

I think I'm missing the point.

Sorry, Matt C

On Thu, 17 Jun 2010 01:32:59 +0000 (UTC), matt@mattyoung.com.au wrote:

> When you run a report and have to input data, is it possible to do any > queries other than begins with, ends with or contains? For example AND, > OR, EXCLUDING. > > If so how do you do it? > > Many thanks, > Matt Y. > _______________________________________________ > OpenVPMS User Mailing List > users@lists.openvpms.org > To unsubscribe or change your subscription visit: > http://lists.openvpms.org/listinfo/users > Posts from this mailing list can be viewed online and replied to in the > OpenVPMS User's forum- http://tinyurl.com/openvfu >

_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/users Posts from this mailing list can be viewed online and replied to in the OpenVPMS User's forum- http://tinyurl.com/openvfu

Queries on data in reports

Hi Matt,

I think I undersatnd what you are trying to acheive.  Currently any string searches in the report sql utilise the like sql keyword so within the string parameters you enter when running the report you can use any of the simple string matching patterns which typically use the % character. 

To be able to do more complex functions such as you describe they would need to be incorporated into the reports sql I believe.  I don't believe you can modify the parameter in the sql to include the function but maybe worth trying i.e  In the customer list report you have a where clause

where l.name like $P{classification}

changing to

where $P{classification} 

and including whatever combination of where clauses when you are prompted in the reports classification field i.e  like "breeder%" and like "farm%"

Cheers

Tony

 

Queries on data in reports

Hi Tony,

Yes you did understand what I was asking correctly and you were also spot on the money:

Parameters can only be a string, date, etc so if you want to add more conditions you need to edit the sql query in the report.

I guess I was hoping you could use [charlist] Wildcards or something like that but I've tried them out and they don't work.

Never mind. No big deal.

Thanks anyway Matt C and Tony,
Matt Y.

Syndicate content