How to filter data in report based on current date on JasperReports Server? - jasper-reports

I've created a report in iReport 5.0.1 and trying to figure out how to select records from today. This will be a scheduled report to run at the end of the day without user intervention. I've tried searching and not found anything yet. I'm sure this is simple but I can't figure it out.

Related

Error while printing using crystal report

I have created crystal layout (invoice) which has been working ok for the last one month. i started getting an error "cannot retrieve data from database. vendor code number 339" the last two days. Going to the crystal report am getting this error while i try to preview the layout. Kindly help
I have tried to upload a working layout but getting the same error. I have not done any changes or updates to the system off-late.

Crystal Reports: Adding new data table to results data set

We are using SAP Crystal Reports with Visual Studio 2010.
To enhance our program with a new report, we have created a new data table and added it to our results data set. The problem however is that it is not possible to refresh the results data set in the Crystal Reports editor. As the screenshot shows, a window appears where we are supposed to enter connection credentials, and then we get an error message.
We have already had this problem several times before. Once, when we did essentially the same thing (add a new data table), it worked. So it seems to work sometimes, and sometimes it does not. But: How can we avoid this problem? It is really annoying and so far, I have been unable to add the data table which I have created today. This is a big problem.

crystal report 10 report header issue

I had a couple of reports which were working properly in crystal version report 9. While exporting the data to excel, it was working properly. But after upgrading to version 10, when we try to export to excel with data only option, the report header is not formating properly. The Report header has 3 rows, but wen I export it to excel(data only), it displays all in same line in version 10 and in different lines in version 9.
if I put it in different report header sections, issue is solved but there are many reports which makes it very difficult to make that change at all places. is there any other solution for this.
Can anybody help me with this.
Any help in this regard is welcome.
Thanks in Advance
Every version of Crystal Reports "tricks up" the Excel export settings and the formatting results they produce. Your only hope is to look at all the Excel output settings and find a way to recreate your expected output. There is a chance getting the EXACT output is not possible in the new version.
Note, your topic has nothing to do with Reporting Services and should not be tagged that way.

running a script from within crystal reports

I have an application that creates a report using crystal reports. The data for the report is created in db tables that are built on the fly and then deleted after the report has been created. I would like to save the database that create the report.
I have access to the reports, so I was wondering if it is possible to embed a script in the crystal report that would run when the report is created and move the data to another location, such as via a batch script.
Can anyone tell me if this can or cannot be done? Thanks for any thoughts.
Try this. In the .rpt, go to Database Export and Add Command as shown below.
I don't know what the proper SQL syntax is (the query in the sample image threw an error), but once you work it out, you could probably do it this way. This example from Business Objects uses this command as part of a larger question.
(However, since the original DB is immediately deleted, you'll have to specify a new database to put the table in. I don't know if that's possible.)

Changing Crystal Reports reports shipped with an application and a runtime version

We have a purchased application (I'm told it's .NET, it's client server, running on Windows XP, connecting to SQL Server 2005) that uses a Crystal Reports runtime and separate report files (.rpt) to do it's reporting function. I have a copy of the CR Designer program but we don't have the CR Enterprise software. I can open the reports in the designer, get to the SQL Server data source (and any others, I guess), add them to the report, run it, print it -- but I can't figure out how to use the same Datasource, which is a subset of the tables in the database that it's connecting to, to do it, and I can't figure out how to save the report files so they'll work with the application. Real gravy would be coming up with new reports.
Is this even possible?
If you open up the report and then go to Database, Set Datasource Location, under the Properties section you will find a lot of info about the datasource and where it is getting it's info from. If the purchased application is creating its own datasource internally though and supplying it to the report at runtime, the best option that I can think of is to start a trace on the SQL Server and then run a report. You should be able to see the SQL that is issued by the Datasource and replicate it in your own version.
You have the possibility to manage your connection's properties at runtime (ie while launching CR from your app). Here is a proposal: Crystal Reports Datasource remap
If you cannot access your app code, you should then do as proposed by #Anthony, by updating all your connection strings in your rpt files, save the rpt files, and copy then on the corresponding report folder of your app: you might have to find where it's located in your system.
First of all, you'd better make sure you're not violating the application's license agreement by attempting to add to it in this way.
It may simply not be possible to add reports to the app in any case - it depends how it loads them and what it does with them.
To use the same datasource, you should just be able to open one of the .rpt files, then go to File > Save As, and give it a new name. Then modify it to what you want. Of course, if you don't know the authentication credentials the app passes to the report to connect, it would be tricky to test it.
It would help greatly if you gave us the name of the purchased application, as we don't really know what you're up against.
It could be that the application is passing through a filter of the data. So when you run the report from Crystal Reports Designer you get the whole data base, however when run through the program the parameters being passed to the report restrict the data back down.
Create a backup of the report. Then edit the existing report, make the changes you require, preview the report to get an idea it looks right, save the report and run the report via the application.
Warning:
As it has already been stated some vendors may not allow you to edit existing reports, your warranty/sport may be voided by editing existing reports, or reports could even be overwritten on the next update.