Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How does BIRT know the columns returned from proc?
How does BIRT know the columns returned from proc? [message #368659] Wed, 17 June 2009 18:45 Go to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 46
Registered: July 2009
Member
How in the world does BIRT do discovery on the columns output by more
stored
proc? My stored proc has 4 inputs and before it can run the stored proc,
it must ask me for defaults to pass in but does not!!!! I assume it
is taking a guess, but then on some stored procs, if it guesses wrong, a
single column called error with an error code might be returned(maybe
with another column called error message). How is BIRT running my proc
which takes 4 parameters? I ask because my proc errors out and gets the
error columns instead of the real columns.

2nd question: I can't seem to rerun to get clean output columns once I
setup the parameters and default the parameters to valid values.

3rd question: How can my java code call into the BIRT Engine after running
the report but before displaying it to see if there was 0 rows returned OR
if there was an error returned so that I can redirect to an error page
instead of showing a report with 0 rows via excel or pdf?

thanks for any help on this.
Dean
Re: How does BIRT know the columns returned from proc? [message #368689 is a reply to message #368659] Thu, 18 June 2009 19:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Dean,

When you put the ? in for the parameters you should have had to enter a
default value there. (BTW your sp can return multiple cursors, but you
have to pick one in the designer).

2 - This should not be happening. I tried this on my install on MySQL
and had no issues. What happens when you change the values? Are you
getting any data?

3 -
You can add a script tag to a text element like:

<script type="text/javascript">
function forward() {
location.replace("http://www.google.com");
}
forward();
</script>

And then use the visibility expression Total.count() >0 to hide it when
you have rows.

If you are using the APIs you can call the task.getErrors() method, but
it sounds like you are using the viewer.

Jason


Dean Hiller wrote:
> How in the world does BIRT do discovery on the columns output by more
> stored
> proc? My stored proc has 4 inputs and before it can run the stored proc,
> it must ask me for defaults to pass in but does not!!!! I assume it
> is taking a guess, but then on some stored procs, if it guesses wrong, a
> single column called error with an error code might be returned(maybe
> with another column called error message). How is BIRT running my proc
> which takes 4 parameters? I ask because my proc errors out and gets the
> error columns instead of the real columns.
>
> 2nd question: I can't seem to rerun to get clean output columns once I
> setup the parameters and default the parameters to valid values.
>
> 3rd question: How can my java code call into the BIRT Engine after
> running the report but before displaying it to see if there was 0 rows
> returned OR if there was an error returned so that I can redirect to an
> error page instead of showing a report with 0 rows via excel or pdf?
>
> thanks for any help on this.
> Dean
>
>
>
>
Re: How does BIRT know the columns returned from proc? [message #368730 is a reply to message #368689] Mon, 22 June 2009 16:44 Go to previous messageGo to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 46
Registered: July 2009
Member
sweeeeet!!! task.getErrors() was exactly what I wanted but the "other
issue persists" for some reason....(I worked around by changing proc to
not error out which get around the problem)....

nope, after the ?, ?, ?, it doesn't ask...weird. I deleted all
parameters, and deleted all data sets and was then viewed my xml source
after saving. Then I redid the steps to pick the proc from the
wizard(when creating data set) and after typing the proc, it never asks me
for the default values(I only have one which is a Date type in this case).
Here is the xml if you are curious just before I create the data
set......(I also tried taking out the log4jdbc driver and using
ojdbc14.jar directly with the correct oracle class as well, but that
didn't seem to help either.)

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="7">
<property
name="odaDriverClass">net.sf.log4jdbc.DriverSpy</property >
<property
name="odaURL">jdbc:log4jdbc:oracle:thin:@10.10.x.x:1521:xcodev01 </property>
<property name="odaUser">deano</property>
<encrypted-property name="odaPassword"
encryptionID="base64">xxxZeFGdtVhbjAx</encrypted-property >
</oda-data-source>
</data-sources>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of>new
Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
</report>
no multiple cursor support? [message #368731 is a reply to message #368689] Mon, 22 June 2009 16:45 Go to previous messageGo to next message
Dean Hiller is currently offline Dean HillerFriend
Messages: 46
Registered: July 2009
Member
oh, does BIRT not support putting the two cursors into two result sets? I
guess that means I have to split the proc into two different calls then?

thanks,
Dean
Re: How does BIRT know the columns returned from proc? [message #368750 is a reply to message #368730] Wed, 24 June 2009 13:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Dean,

I do not see a dataset in the xml snippet.

Jason

Dean Hiller wrote:
> sweeeeet!!! task.getErrors() was exactly what I wanted but the "other
> issue persists" for some reason....(I worked around by changing proc to
> not error out which get around the problem)....
>
> nope, after the ?, ?, ?, it doesn't ask...weird. I deleted all
> parameters, and deleted all data sets and was then viewed my xml source
> after saving. Then I redid the steps to pick the proc from the
> wizard(when creating data set) and after typing the proc, it never asks
> me for the default values(I only have one which is a Date type in this
> case). Here is the xml if you are curious just before I create the data
> set......(I also tried taking out the log4jdbc driver and using
> ojdbc14.jar directly with the correct oracle class as well, but that
> didn't seem to help either.)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
> id="7">
> <property
> name="odaDriverClass">net.sf.log4jdbc.DriverSpy</property >
> <property
> name="odaURL">jdbc:log4jdbc:oracle:thin:@10.10.x.x:1521:xcodev01 </property>
> <property name="odaUser">deano</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">xxxZeFGdtVhbjAx</encrypted-property >
> </oda-data-source>
> </data-sources>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab-cell" id="5">
> <property name="borderBottomColor">#CCCCCC</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">1pt</property>
> <property name="borderLeftColor">#CCCCCC</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property name="borderRightColor">#CCCCCC</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">1pt</property>
> <property name="borderTopColor">#CCCCCC</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> <style name="crosstab" id="6">
> <property name="borderBottomColor">#CCCCCC</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">1pt</property>
> <property name="borderLeftColor">#CCCCCC</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property name="borderRightColor">#CCCCCC</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">1pt</property>
> <property name="borderTopColor">#CCCCCC</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> </styles>
> <page-setup>
> <simple-master-page name="Simple MasterPage" id="2">
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.25in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.25in</property>
> <page-footer>
> <text id="3">
> <property name="contentType">html</property>
> <text-property name="content"><![CDATA[<value-of>new
> Date()</value-of>]]></text-property>
> </text>
> </page-footer>
> </simple-master-page>
> </page-setup>
> </report>
>
>
Re: no multiple cursor support? [message #368751 is a reply to message #368731] Wed, 24 June 2009 13:49 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Dean,

You can specify which cursor is used in the dataset editor.

Jason

Dean Hiller wrote:
> oh, does BIRT not support putting the two cursors into two result sets?
> I guess that means I have to split the proc into two different calls then?
>
> thanks,
> Dean
>
Previous Topic:SQL Query Builder
Next Topic:Pdf Report - huge size
Goto Forum:
  


Current Time: Thu Apr 25 18:55:55 GMT 2024

Powered by FUDForum. Page generated in 0.03327 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top