Hi,
My company has recently switched from Crystal Reports to Jasper IReports. I'm findng it hard to find a lot of documentation and training manuals for IReports so far. I'm trying to write an if-then-else statement for a field in Ireport that tests for data type.
Here is what I am trying...
TurkBear,
Thanks for the quick response. I haven't looked at the whole database for that field, but it is possible that one of the records is null- interestingly, I only get the error whenn grouping on the field.
Also, I am using the expression as a sql expression within the report. Is there...
Hi,
I am trying to group my report on the following SQL Expression named %empl
(
select max(B.`ResultText`)
from TestMainList A, TestResults B
where A.`TestID`= B.`TestID` and
A.`Description`= 'Employee' and
B.`TestDate` = TestResults.`TestDate`
)
However, when I run the report, it gives...
lbass,
I go it to work- I just started a new report and did the SQL Query first, and then added the tables. For some reason, it compiled without an error.
The only other "requirement" was that I add all the tables after it was created and then group it by the expression. If I grouped it...
lbass,
I put "min" in there just because i was playing around a little and didn't realized I hadn't changed it back when I pasted it.
The only other clue the error gives me other than the "too few parameters expected 1" is that it is a "Database connector error DAO Error Code 0xbf5" Not sure...
LBASS,
One further thought on this if you don't mind- when I typed it is as below it worked:
(
select min(B.`ResultText`)
from TestMainList A, TestResults B
where A.`TestID`= B.`TestID` and
A.`Description`= 'Employee'
)
except that it selected just one name from the whole list and ignored...
Ok- well thanks for all your help- I'm at least a lot closer to figuring it out. I'll have to examine it and play around a little to see if I can get it to run.
lbass,
Thanks- The site shouldn't be needed. It is there just to show which site or client the report is being run for. I ran the code as is and it gave me a "too few parameters" error with "expected 1" this time.
After reviewing the code the only thing I could come up with is the...
lbass,
Ok- sorry about that. I put the formula in as you said and got the too few parameters error- expected 5. Yes- the testid field is unique.
The SQL query for the report is long- not sure if you wanted all of it. here it is:
SELECT `AssetType`.`AssetDescription`, `Site`.`SiteID`...
lbass,
Thanks- I updated the @score formula.
I also tried the code you suggested. I put it in as follows:
(
select max(B.`TestResults`)
from Testmainlist A, Testresults B
where A.`testid` = B.`testid` and
A.`Probetype` = 'Employee' and
A.`testdescription` = 'Employee' and
A.`testid` =...
The formula is a simple if then statement:
if {ProbeType.ProbeTypeDescription} = "test" and {TestResults.OutOfSpec} = true then 10
else if {ProbeType.ProbeTypeDescription} = "test" and {TestResults.OutOfSpec} = false then 0 else if
isnull({TestResults.OutOfSpec}) then 0
I'll give what you...
I had to change it with the new table, so it is a lot longer then the original post.
SELECT TestResults.TestId, TestResults.TestDate, TestResults.ResultText, TestMainList.probetype,T1.ResultText
FROM (TestResults INNER JOIN TestMainList ON TestResults.TestId = TestMainList.TestId) INNER...
lbass,
It was a mistake on my part- one of the fields was in the wrong table. The probetype field was in a table that I didn't select which was why the error of missing parameters showed up.
I've been trying to figure out a grouping issue in Crystal reports on and off for months now- what I am trying to do is summarize a point total for an employee entered as a test result. There are a number of tests for an asset in this particular database. All have a score of 0 if they are in...
lbass,
Sure- here it is:
SELECT T1.resulttext, T2.resulttext
FROM testresults T1 INNER JOIN testresults T2
ON T1.testdate = T2.testdate
WHERE T1.probetype = 'Employee' AND T2.probetype = 'Test
Thanks
Hi,
I am using Crystal Reports 2008 with an Access database. I am trying to add this command to the report. See below:
SELECT T1.resulttext, T2.resulttext
FROM testresults T1 INNER JOIN testresults T2
ON T1.testdate = T1.testdate
WHERE T1.probetype = "Employee" AND T2.probetype = "Test"...
Hi,
Does anyone know if there is an option to place a calender in Crystal 11 or 2008? It seems like this would come with the program but I can't find one- I was trying to have a calender view of tests due (from a database date field).
Thanks,
Jeff
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.