Unable To Change Preview Setting In Eclipse BIRT Report Designer - eclipse

I've just begun using the BIRT report designer for Eclipse to create reports from data in a MySQL database. When attempting to preview the result set from a created data set, I receive the following error:
SQL error #1:You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'OPTION SQL_SELECT_LIMIT=500' at line 1
I understand that this syntax is invalid with MySQL, as it should be
SET SQL_SELECT_LIMIT=500
However, I cannot figure out if/where I can make this correction, as it is added automatically by the report builder when generating the preview.
Furthermore, in the IDE preferences, I have selected the 'No Limits of number of rows to display' option, trying to bypass this statement altogether, but continue to receive the same error, indicating that it still is trying to preview 500 or less rows, even after deleting the first data set definition and remaking it after the option was changed and restarting Eclipse.
If anyone has any suggestions for either changing the syntax or getting the No Limits option to work correctly, I would greatly appreciate it.

Was actually able to figure out the issue with getting the correct syntax thanks to this SO post regarding Netbeans. The MySQL JDBC driver simply needed to be updated. Preview no longer generates depreciated syntax.

Related

How to remove Routine Group error from workbench?

I'm using MySQL Workbench and I am trying to create a routine. However, At the time of creating routine some error comes,then i deleted that routine. Now I synchronize the model with the existing database, the Routine group error is coming, though i remove that routine group. Can anyone help me how to remove this error from Model?
The _SYNTAX_ERROR suffix is added by MySQL Workbench to indicate that it found a syntax error in your routine code. Once you fixed that the name will change back to what you gave it. And then you can also synchronize your model.
I faced the same issue, cause i copy&pasted some c# code into a routine group, and it immediately became invisible by workbench. Synchronization now always reporte errors, even after deleting the whole routine group. The faulty code was stuck somewhere, inaccessible through the Workbench UI.
Just found a solution atm:
Do a regular synchronization and tell Workbench to change the sync-direction on the error entries. This will remove the faulty lines of code, even if they are not accessible through the Workbench UI.

Jasperreports: how to gracefully handle or ignore SQL error?

Our runtime environment is Tomcat with thin jasperreports servlet with compile/get connection/fill/generate PDF functionality.
Reports usually consist of several tables, each with its own dataset (SQL query).
JR version is 6.2.0.
Is there a way to:
gracefully handle SQL error in a dataset - ie. to catch it and to
display error code/message
or
ignore SQL error so that report execution doesn't get interrupted
(of course, if other report parts depend on erroneous sql query,
report will break eventually)
Is it possible to do this using custom scriptlet class, custom data adapter, datasource or something like that (overriding some engine class/method)?
With regards,
Goran
JasperReport is only a viewer on data. Error management must be done elsewhere.
Two ideas: Materialize the functions into a "business" table and select with JasperReports on the table. Results in more tables, of course. If a job isn't finished yet, there won't be any data. This is the way we usually tackle this requirement.
Or you could use the JasperReports API, select the data in Java code and handle the errors there. In the report you could use the "No data" field or an "Error" parameter, which is usually empty. If an error happens, it will be filled with the error message. This could be done with a Custom data source, as seen in the documentation. In the custom data source you can select the data using your own methods and handle any errors. Then you can control the results given back.
Note: We haven't implemented a custom data source yet, so there still might be a better way.

Data for some bound fields not appearing on report

I'm creating a 'SectionReport' (Active Reports V.9), and am dragging bound fields from the 'Report Explorer' directly onto the report. I've written the SQL query, which executes and returns the correct results as expected.
However, only a small portion of the bound fields are displaying data from the table.
Again, when I execute this in the 'Query Designer', I see all data. When I save that exact query, only some of the data is populated on the report.
This process seems so straight forward and yet I seem to be missing something.
Please help and thanks in advance!
So you're saying the data is returned but not showing up in some of the fields? Have you checked the binding for each of those fields?
Can you step with the debugger and verify that in the detail_format even there is data in report.fields for those records that have missing values.
can you add debug statements that print each field value in the detail_format event.
based on what you described all I can offer is some diagnostics techniques. If you'd like please send your report to our support team and we can properly inspect it and help you out http://arhelp.grapecity.com/
If you are using the enduserdesigner sample or the pre-compiled exe that comes with the installer, can you please make sure that the PreviewPages to a larger number instead of 10.
You can change the value by follwing these steps. in report exploer, double click the settings node. go to gloabal settings tab and change the previewpages value.
If this is not the case, please attach the report. There are no other settings that will cause this.

error running iReport designed report in JasperReports Server (postgresql)

I designed a report in iReport that has a straight forward query as the main report and a sub report with another simple query. Neither query has any parameters passed to it, however they both deal with timestamps extensively.
The combined report runs fine within iReport and if i remove the sub-query and load both into JasperReports Server they will run independently. However, when I try to run the full report that includes the sub-report, I get the following error and stack trace:
The server has encountered an error. Please excuse the inconvenience.
Error Message
net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist.
Error Trace
net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist.
at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:606)
at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:621)
at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.getValueParameter(JRTimezoneJdbcQueryExecuter.java:150)
at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.<init>(JRTimezoneJdbcQueryExecuter.java:134)
at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuterFactory.createQueryExecuter(JRTimezoneJdbcQueryExecuterFactory.java:50)
at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:728)
at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:629)
at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1159)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:640)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205)
at java.lang.Thread.run(Thread.java:619)
This is is a known bug as far as I can tell, but isn't receiving much attention. Has anyone encountered this error and come up with a workaround or at least an explanation of what is going on?
Just so that this question has an answer:
My solution was to modify my SQL query to return all my data in one query and remove the sub-report. This seems like a silly work around for a fairly important feature but it is working in the meantime.

Crystal Reports - Failed to open a rowset

What can be done to resolve the exception:
CrystalDecisions.CrystalReports.Engine.InternalException: Failed to open a rowset.
This is a generic error in Crystal Reports whenever the report query fails. There can be a number of causes. If your report was targeted to a specific database and then the database was changed without updated the report, this can cause it. It can also be caused by something in the query itself failing, such as if the report is based on a stored procedure that doesn't exist on the database against which the report is running. Try verifying the database for the report.
As said this is a generic error, and like all such errors it's a very frustrating one. The problem is that VS 2003 has no preview option for crystal reports so it's hard to track down the source of the problem. So best way to solve this is to create a blank project in vs 2005 or later, import the crystal report, and run preview. You will get a more specific error then.
I had the same issue, and received this error message:
One ore more fields could not be found in the result set. Use Verify Database to update the report.
Error in File filename {9FEE6406-1613-409A-B9BD-C5FDA24E3DEE}.rpt:
The rowset column could not be found.
I was using a stored procedure to collect data for the report, and sure enough I was passing an invalid parameter for the SP. Double check the type and value of the parameters if you are using a SP to populate the report data.
Good luck!
I have also gone through same error with report having sub reports. Issue resolved as i switch to each sub report and make it verify again with database/tables/views.
This is caused by some discrepancy in your relations, like opposite left joins or something similar. CR has also the bad habit to create 'default' links each time you modify the list of tables and views needed for the report. It can even sometimes automatically create recursive links that might not be viewable 'at once' in the relations screen.
If you cannot find which relation(s) is causing the trouble (sometimes it is not so obvious), you'll have to make some trial & errors test by adding/removing tables from your report.
Every time you add a new table in crystal it adds its own links on already linked tables, some times it even links the 2 fields from the same table.
Make sure you know your links in order to go through after you add a table and scroll all tables to see for any links create from to the same table
I received :
CrystalDecisions.CrystalReports.Engine.InternalException was unhandled
Message=The Report Application Server failed
Google brought me here. For those that have similar problems.
For the record: I had a byte[] array with an image and removed the log from the report and the error stopped. I now have to figure out what I have done wrong with the logo.
I had this problem - we use SQL logins for our security (not integrated / DSN connections)
By granting execute permissions to the user for my stored procedure I fixed the problem.
Really, really couldn't hate Crystal more for their exception masking - let this be a lesson to all programmers;
Try
'your code here
Catch
Throw new exception("Hey, here's a really friendly but completely useless error message")
End Try
will result in pain for future developers - DON'T DO IT!
When you verify your database it might tell you that it is up to date, in that case you have two more options to check for:
a) Refreshing the report (a lightning-shaped icon), if you have a problem with a field, such as a SQL Field, it will give you the error and then show you the edit window for the field.
b) Running the query directly on SQL, if there is a problem with the query itself you will also get this message in Crystal but SQL will tell you exactly what went wrong.
Check Changing Crystal Report Database logon information at runtime in VS2005 for help.
Important line in it is:
table.Location = Database & ".dbo." & table.Name
For me, the problem was fixed when I logged of and logged back to the SQL server that the report was connecting to
In your store procedure If you are using
SET NOCOUNT ON;
Then just remove this
--SET NOCOUNT ON;
Now verify your report database, build & run your solution.