View Full Version : Problem with Jasper/Microsoft SQL/Pentaho w/Variables

08-20-2007, 07:30 PM
Hallo all,

I am having a problem creating reports that accept string type variables; I am using Pentaho 1.2.1 Build 625 GA, iReport 2.0.0, and Microsoft SQL 2000.

I can create reports that accept numerical values as parameters passed via the URL, but I'm at a loss as to how to make String parameters work.

My working SQL Code looks like this:

SELECT Key, Make, Model, Year, Class
FROM dbo.Equipment
WHERE Class like 'A51%'

Notice that the string on the last line is enclosed by single quotes. This works fine in the Microsoft Query analyzer.

Yet, when I go to create a report using iReport, it wants double quotes, which Microsoft SQL doesn't like, and if I put single quotes, it gets treated as a single character.

Any ideas?



09-03-2007, 02:38 AM
Hi Daniel,

string parameters in SQL work like this:


Hope that helps,