SysAid, iReport questions

 
Author
Message
SysAider
4
 
Our company has deployed SysAid and we have been using it for about 2 months. Now, I am in the process of creating some specific reports using iReport and I have a few questions/comments.

1) Which version of iReports should I use? I believe the manual said 1.2.3 which I downloaded and appears to work OK, but I was wondering if a newer version would also work? For example, newer versions on this page: https://sourceforge.net/project/showfiles.php?group_id=64348&package_id=64215

2) After nearly throwing my computer out the window because of frustration, it seems that you cannot use characters like >, <, and & in variable expressions. This means that you are unable to do greater-than, less-than or AND operations. Is this correct?

For example, if I want to generate a report that counts all open tickets for a certain REQUEST_USER, in my count variable I should be able to do something like:

However, while the above works fine in iReport, it does not work in SysAid. If I rewrite the code and get rid of the ampersands like this:

It will work fine in both SysAid and iReports. Am I doing something wrong? Is there a better way to do greater-than, less-than or AND operations?

3) This is perhaps the most annoying and frustrating part of developing these reports: while the report will work beautifully in iReports, when I upload it to SysAid and it fails for some reason, the only message I get is something like "Internal error while executing report (70b41f62_11cb07fbf00_-7ffb)." This is, absolutely, 100%, NOT HELPFUL in trying to figure out what went wrong. Are the actual Java errors logged someplace? Is there some way of getting more verbose error messages for this?

Anyway, that's it for now. I am probably going to be writing more reports and I appreciate any help I can get.

Thanks
SysAid Wiz
1768
 
Hi, Welcome to the fun that is report writing in sysaid, I had all the same issues you did, and too got close to throwing the computer out of the window!

I tried to use <> and that would not work in sysaid because it treats it as an html tag, so I was told by support to use != instead, but
> greater than
< less than
>= greater than or equals to
<= less than or equals to
should all work ok.

the same I suppose applies to & characters, but I have not used these so do not know a workaround, maybe wrapping the query up in a CDATA statement would help.

I report versions up to 1.3.2 work fine.

Yes I agree the "Internal error while executing report ....." errors are totally unhelpful, you have to browse the sysaid.log file to get the real error messages.
I too find they often work a treat in Ireports and you have to mess about with them to get them to work in sysaid.

Don't give up though, it does get a bit easier with practice. Check out my top five report writing tips thread if you haven't already.


Other tips given to me by support at the time:-

in the prompt screen you need to add at least:
1.The submit button and the javascript ExecuteOK() function to run the report.
2.The outFormat to choose the report output
3. The action to view it or save it to scheduler/my reports.
where the reportTitle is a choice.
remember if you want to use the check validation you need to add the javascript part - ex: ${ValidateSchedule} for scheduler.

The script part is used to transport parameters between the prompt and the design report -
example: if you add the reportTitle in the prompt and the design reports you need to add these two rows:
1. reportTitle = requestParams.get("reportTitle";
// get from prompt
2. parameters.put("ReportTitle",reportTitle);
// put in design report (jrxml file)

The design report screen / part
if you have parameters you need to add them ex.

and if you want to use this parameter you have to put it in a textField
that is a container and give it the parameter in the textFieldExpression part of the textField.






SysAider
4
 
Thank you very much for your response!

I did some more testing, and it appears that the < less than character and && are the ones causing problems. For example, if I take a currently working report (working in SysAid), and add the following count variable:

The report works just fine in SysAid. However, if I switch it to a less than:

The report stops working in SysAid.

Also, if I use &&, the report stops working. For example, if I wanted to count something within a given range, I could do something like:

which works fine in iReport, it will not work in SysAid.

I checked the sysaid.log file and it seems that I am getting the following error when I try to use &&:
2008-11-03 13:00:46,178 [Thread-16] ERROR com.sysaid - Exception while trying to compile report code
org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.

Also, here is the error when I try to use a < less than character:
2008-11-03 13:17:30,959 [Thread-5] ERROR com.sysaid - Exception while trying to compile report code
org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.

So I'm not sure what is going on, but it looks like it is interpreting the < and & characters as HTML/XML markup which is messing things up.

I'll try version 1.3.2 of iReports and see if anything changes.

Again, thanks for the response!
SysAid Wiz
1768
 
try adding <![CDATA[ INSERT YOUR CODE HERE ]]>

and see if that works.

This message was edited 2 times. Last update was at Nov. 03, 2008 04:51 PM

SysAider
4
 
Again, thanks for the quick response.

When you say to add the <!CDATA[...]]>, do you mean within iReports or the actual jrxml file? I tried adding it in iReports but it gave me an error, but when I look at the jrxml file, it seems like everything is already enclosed in a CDATA block.

For example, the following count variable:

causes an error in SysAid (again, probably because of the < less than character).

If there was a way to escape out the < less than character, it might work, but I don't know how to do that.

Again thank you for your suggestions.
SysAid Wiz
1768
 
Hmmm, i'm stumped, sounds like one for Firass to solve, he doesn't frequent here much, and Haim has been missing the last few days, you will probably have to open a service request to get the answer.
th
SysAid Mod
250
 
Since generating new reports seems to be challenging, shouldn't we open a thread where we can post our own custom reports to share them with the community? What do you think?
SysAid Wiz
1768
 
yazny wrote:Again, thanks for the quick response.

When you say to add the <!CDATA[...]]>, do you mean within iReports or the actual jrxml file? I tried adding it in iReports but it gave me an error, but when I look at the jrxml file, it seems like everything is already enclosed in a CDATA block.

For example, the following count variable:

causes an error in SysAid (again, probably because of the < less than character).

If there was a way to escape out the < less than character, it might work, but I don't know how to do that.

Again thank you for your suggestions.


Did you get an answer to this in the end? if not post back and I will try to get you an answer.

th wrote:Since generating new reports seems to be challenging, shouldn't we open a thread where we can post our own custom reports to share them with the community? What do you think?


Well finally we got our own forum TH!
SysAid Wiz
1768
 
Ok, the only way I can get a less than "<"; to work is by replacing it with & l t ; (remove the spaces) before uploading the report to SysAid, this as you say should not be necessary as the query is within a CDATA block anyway, so I think there is a bug in the way that sysaid is parsing it.

before I made the change, the error I was getting was "org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup."

I will open this as a SR and see if I can get it fixed.

This message was edited 2 times. Last update was at Feb. 10, 2009 04:31 AM

SysAider
4
 
No, I never received a good response.

However, I figured out I can do something like below in place of the less-than, greater-than marks:



Also, in place of && marks, I did something like this:



Which is just a collection of if... else... statements.

So, right now everything is working.
SysAid R&D
32
 
hi yazny,techguy

i want to congratulate you for finding this painful bug and also finding a workaround (1)

it is a bug #2887 ,and there are two workarounds:
workaround1 : is to replace the < with & lt ; and > with & gt ;
OR
workaround2: to write the where in the script section and pass it as a parameter to the report like this:
(in script)


(in Report design / mainReportCode / jrxml file)


ex.
select id,title from service_req where $P!{MoreWhere}

Good Job.

This message was edited 2 times. Last update was at Feb. 17, 2009 03:59 AM