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)
Not able to view my report design file through tomcat
mnegi@
<p>Hi ,</p>
<p>I am trying to view a report in webviewer example available in BIRT-runtime folder.I have copied that example in tomcat wepapp directory.It is showing an error in prototype.js file "<span style="color:rgb(255,140,0);"><strong>Refused to set unsafe header "Connection</strong></span>" and I am not able to see the report contents only viewer toolbar is available.see the attached screenshot for better understanding.Please guide me to get the correct results.Thanks in advance.</p>
<p> </p>
<p> </p>
<p>Thanks</p>
<p>Meenakshi</p>
Find more posts tagged with
Comments
Clement Wong
<p>Based on your screenshot, the report has rendered. The date/timestamp in a default masterpage is showing at the bottom of your page. What do you have in the report layout?</p>
<p> </p>
<p>Does the sample report shipped with the viewer work? If you went to <a data-ipb='nomediaparse' href='
http://localhost:8080/birt/'>http://localhost:8080/birt/</a>
, what does it show? Then click on the View Example link to a test report @ <a data-ipb='nomediaparse' href='
http://localhost:8080/birt/frameset?__report=test.rptdesign&sample=my+parameter'>http://localhost:8080/birt/frameset?__report=test.rptdesign&sample=my+parameter</a>
; </p>
mnegi@
<p>Hi ,</p>
<p>This issue is just a warning.So the original issue was chart created with birt professional does not render in tomcat birt viewer while chart created with BIRT runtime are visible in tomcat birt viewer.</p>
<p> </p>
<p>I have one more issue.BIRT report viewer is not able to download csv via a post call.I am using that url</p>
<p> </p>
<p><span style="color:#00ff00;"><a data-ipb='nomediaparse' href='
http://localhost:8080/birt/extract?__report=sample.rptdesign&__extractformat=csv&__resultsetname=ELEMENT_31&__selectedcolumnnumber=2&__selectedcolumn0=LSG Name&__selectedcolumn1=Failures'>http://localhost:8080/birt/extract?__report=sample.rptdesign&__extractformat=csv&__resultsetname=ELEMENT_31&__selectedcolumnnumber=2&__selectedcolumn0=LSG Name&__selectedcolumn1=Failures</a></span></p>
;
<p> </p>
<p> </p>
<p>Thanks</p>
<p> </p>
<p>Meenakshi</p>
Clement Wong
<p>If you attempt to view a commercial BIRT report design with commercial features in an Open Source BIRT Engine/Viewer, you will not be able to render the report.</p>
<p> </p>
<p>In the Open Source BIRT Viewer, you cannot simply access the /extract servlet to extract CSV. With a CSV emitter, you can run and render the report as CSV. I haven't tested the <a data-ipb='nomediaparse' href='
https://code.google.com/archive/a/eclipselabs.org/p/csv-emitter-birt-plugin/downloads'>CSV
emitter written by the community</a> with the latest version of BIRT so you might want to try as an option.</p>
<p> </p>
<p>Now, if you want to use the /extract servlet, it will take two different URLs (with the out of the box implementation), or you can modify viewer servlets.</p>
<p> </p>
<p>The /extract servlet does not execute or run the .rptdesign to create the .rptdocument. The /extract servlet requires an .rptdocument. That is why you are seeing an error. So you will need to run the report via the /frameset servlet and use the __document option to save the .rptdocument. Then run the /extract on the .rptdocument. The method that the OS BIRT Viewer does it that it generates a transient .rptdocument and uses the __sessionId as an index into the transient cache to Export Data.</p>
mnegi@
<p>Hi Wong,</p>
<p> </p>
<p>Thanks for reply.</p>
<p> </p>
<p>I have one more query.I am executing a dynamic query through Data engine api by using a data set through rpt design file.I am able to get resultset. But not able to parse the row data though I am getting the correct row count.</p>
<p>I am using this code sample</p>
<div><span style="color:#008000;">try {</span></div>
<div><span style="color:#008000;">int rowcount = 0;</span></div>
<div><span style="color:#008000;">ReportDesignHandle designHandle = (ReportDesignHandle) runnable</span></div>
<div><span style="color:#008000;">.getDesignHandle();</span></div>
<div> </div>
<div><span style="color:#008000;">DataSourceHandle dsrc = designHandle.findDataSource(DATA_SOURCE);</span></div>
<div><span style="color:#008000;">OdaDataSourceDesign odaDataSource = new OdaDataSourceDesign("tmp-" + DATA_SOURCE);</span></div>
<div><span style="color:#008000;">odaDataSource.setExtensionID("org.eclipse.birt.report.data.oda.jdbc");</span></div>
<div> </div>
<div><span style="color:#008000;">odaDataSource.addPublicProperty( "odaURL", dsrc.getProperty("odaURL").toString() );</span></div>
<div><span style="color:#008000;">odaDataSource.addPublicProperty( "odaDriverClass", dsrc.getProperty("odaDriverClass").toString());</span></div>
<div><span style="color:#008000;">odaDataSource.addPublicProperty( "odaUser", dsrc.getProperty("odaUser").toString() );</span></div>
<div><span style="color:#008000;">odaDataSource.addPublicProperty( "odaPassword", dsrc.getProperty("odaPassword").toString() ); </span></div>
<div> </div>
<div><span style="color:#008000;">DataSetHandle dset = designHandle.findDataSet(DATA_SET);</span></div>
<div><span style="color:#008000;">OdaDataSetDesign odaDataSet = new OdaDataSetDesign("tmp-" + DATA_SET );</span></div>
<div><span style="color:#008000;">odaDataSet.setDataSource( odaDataSource.getName( ) );</span></div>
<div><span style="color:#008000;">odaDataSet.setExtensionID( "org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" );</span></div>
<div><span style="color:#008000;">odaDataSet.setQueryText((String) dset.getProperty("queryText")); </span></div>
<div> </div>
<div><span style="color:#008000;">DataEngine dataEngine = DataEngine.newDataEngine(runnable</span></div>
<div><span style="color:#008000;">.getReportEngine().getConfig(), null);</span></div>
<div><span style="color:#008000;">dataEngine.defineDataSource(odaDataSource);</span></div>
<div><span style="color:#008000;">dataEngine.defineDataSet(odaDataSet);</span></div>
<div> </div>
<div><span style="color:#008000;">QueryDefinition queryDefinition = new QueryDefinition( );</span></div>
<div><span style="color:#008000;">queryDefinition.setDataSetName( odaDataSet.getName() );</span></div>
<div><span style="color:#008000;">//queryDefinition.setAutoBinding(true);</span></div>
<div> </div>
<div> </div>
<div><span style="color:#008000;">IPreparedQuery pq = dataEngine.prepare( queryDefinition );</span></div>
<div> </div>
<div><span style="color:#008000;">IQueryResults qr = pq.execute( null );</span></div>
<div> </div>
<div> </div>
<div> </div>
<div><span style="color:#008000;">IResultIterator ri = qr.getResultIterator();</span></div>
<div><span style="color:#008000;">int cc = ri.getResultMetaData().getColumnCount();</span></div>
<div><span style="color:#008000;">IResultMetaData rsmd = ri.getResultMetaData();</span></div>
<div> </div>
<div><span style="color:#008000;">int rowCount=0;</span></div>
<div><span style="color:#008000;">while ( ri.next( ) )</span></div>
<div><span style="color:#008000;">{<span> </span></span></div>
<div><span style="color:#008000;">int r =ri.getRowIndex();</span></div>
<div><span style="color:#008000;">rowCount++;</span></div>
<div><span style="color:#008000;">for ( int i = 0; i < cc; i++ )</span></div>
<div><span style="color:#008000;">System.out.print(ri.getValue(rsmd.getColumnName(i+1)) + " ");</span></div>
<div> </div>
<div> </div>
<div><span style="color:#008000;">}</span></div>
<div><span style="color:#008000;">System.out.println("rowCount"+rowCount);</span></div>
<div><span style="color:#008000;">ri.close( );</span></div>
<div><span style="color:#008000;">qr.close( );</span></div>
<div><span style="color:#008000;">dataEngine.shutdown();</span></div>
<div> </div>
<div><span style="color:#008000;">} catch (BirtException e) {</span></div>
<div><span style="color:#008000;">e.printStackTrace();</span></div>
<div><span style="color:#008000;">}</span></div>
<div> </div>
<div><span style="color:#008000;">and my data set is</span></div>
<div><span style="color:#a9a9a9;"> <oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="NewOdaDataSet1" id="90"></span></div>
<div><span style="color:#a9a9a9;"> <span> </span> <property name="dataSource">myDataSource</property></span></div>
<div><span style="color:#a9a9a9;"> <xml-property name="queryText"><![CDATA[select Distinct count(CAUSE) as value,trim(NAME) as label</span></div>
<div><span style="color:#a9a9a9;">from LOCATION GROUP BY NAME]]></xml-property></span></div>
<div><span style="color:#a9a9a9;"> </oda-data-set></span></div>
<div> </div>
<div>I am getting result in IQueryResults because it shows the exact number of rows returned by query but it is not provding any meta data about column info.So what should I do to parse result set from IQueryResults wihout using meta data.I need row data as I need to make a json to serve my purpose.</div>
<div> </div>
<div> </div>
<div>Thanks</div>
<div>Meenakshi</div>
mnegi@
<p>Hi,</p>
<p>I have tried this many times with different ways but still the same result.Compiler is showing error on the compilation of line <span style="color:rgb(0,128,0);font-family:'Source Sans Pro', sans-serif;">queryDefinition.setAutoBinding(true); </span><span style="font-family:'Source Sans Pro', sans-serif;">so I commented out this line.I am using </span>birt-runtime-4_5_0 libraries inside the folder birt.war.</p>
<p> </p>
<p> </p>
<p>Thanks</p>
<p>Meenakshi</p>
Clement Wong
<p>Meenakshi,</p>
<p> </p>
<p>This looks like a new issue that you are trying to resolve. You can post this report design related question in the<a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/forum/2-designing-birt-reports/'>
; Designing BIRT Reports</a> forum.</p>
<p> </p>
<p>You may want to include a sample .rptdesign that illustrates the issue, preferably one that uses the Classic Models sample database so that we can run it.</p>
<p> </p>
<p>BTW, if you are using Open Source BIRT, you will need the line<strong><span style="font-family:'courier new', courier, monospace;"> queryDefinition.setAutoBinding(true); </span></strong> Otherwise, if using commercial BIRT, it can be commented out.</p>
<p> </p>
<p>Also, there have been several topics regarding executing a query in the beforeFactory. Have you referenced those posts yet?</p>
<p> </p>
<p> </p>
<p>Regards,</p>
<p>Clement</p>
mnegi@
<p>Hi Wong,</p>
<p>Thanks for reply.</p>
<p> </p>
<p>I have posted a new issue regarding the above query <span style="color:#ffa500;"><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/38627-unable-to-fetch-detailed-row-data-through-dataengine-api/'>http://developer.actuate.com/community/forum/index.php?/topic/38627-unable-to-fetch-detailed-row-data-through-dataengine-api/</a>
. </span></p>
<p> </p>
<p> </p>
<p>Thanks</p>
<p>Meenakshi</p>