Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
view SQL
TheShadraq
I have some logic built into a query. The report worked fine prior to this change so I am certain that my script and/or logic is incorrect.<br />
<br />
How do I get the sql to dump onto the report screen so I can see what it is breaking on?<br />
<br />
var sqlText = <em class='bbc'>my query</em><br />
<br />
Thanks,<br />
Shadraq
Find more posts tagged with
Comments
thuston
Run eclipsec.exe to get a command prompt alongside the BIRT designer.
In the afterOpen of the DataSet add System.out.println(this.queryText).
I've only accessed queryText in beforeOpen but it should still be valid.
TheShadraq
appreciate the quick reply. I am relatively new to BIRT and am a weak-novice running .cmd so : <br />
<br />
afterOpen I placed <em class='bbc'>System.out.println(this.queryText)</em> into my rpt. I get errors about "System is undefined" if I run it in BIRT directly. <br />
<br />
If I run it in .cmd I <br />
<br />
cd birt<br />
cd eclipse<br />
eclipse.exe<br />
<br />
It just opens the program. Now, obviously, I'm doing something wrong and wasn't comprehending what you suggested. Ideas?<br />
<br />
Thanks,
thuston
When you installed BIRT/Eclipse there are two EXE files.
All the default shortcuts go to eclipse.exe, but you can also run eclipsec.exe and get the same eclipse designer and also a Console (command prompt) window.
You can write to the Console using System.out
However, I forgot to have you add the full class so it will recognize System.
java.lang.System.out.println("----SQL
\n" + queryText);
So:
Run eclipsec.exe instead of eclipse.exe
Use it as normal and add the above line to the DataSet script.
When you run the report, the Console will have the output.