Create a warning prompt box that appears before parameters are set in Crystal Reports - crystal-reports

I have created a Crystal Report for some of my users with a date range parameter set. The volume of information that the SQL command returns means that anything over a 7 day period in the date parameter slows the report to unusable speeds and subsequently locks the DB for all other users.
Does anyone know of a way to create a prompt in Crystal Reports that will appear before the parameter set? I.e. As soon as they select the report and click "Open", the first thing they see is a box saying "Please ensure a maximum 7 day date period". Then upon clicking "OK" or something of my choosing, they are presented with the parameter fields and can continue with the report.
If this cannot be done, is there a way to restrict the parameters so that when the users select the start date, they can only select a maximum of 7 days after.
The other option, if it is doable, is to have them select the start date and then it auto complete the end date with a date 7 days after the start date.
At the moment i have just added (Must be a 7 day period) to the parameter title but i dont feel this does a good enough job at advertising it and as soon as i publish it i know someone will want to get 4/5 years worth of data...our clinicians will be most unimpressed if they PAS system locks up during a busy clinic.
I have attached a screenshot of the kind of thing i am after. It is a little crude as it was done in paint but it gets the point across.
I have searched high and low for this solution so i am not sure it even exists, but am asking out of sheer desperation.
Thanks in advance,
Mike

If you use Crystal Report solely (not within a program like .Net app) you can select your latest proposition. Get start date and in your SQL command (View, Stored Procedure, ...) select items from startDate to startDate + 7 days.
Depending on your DBMS there are ways to add some value to date (like dateadd function in MSSQL).
So its done.

Related

Financial formulation in Crystal Reports

I need help with creating a trial balance report for a specific tenure, from beginning of fiscal year to a selected period. I need this in Crystal Reports.
I am unable to formulate how can I get debit and credit amounts totalling from beginning of the fiscal year till the end of selected period (not YTD).
For example, I want to get a trial balance report till period 6 (June), I am able to get the balance at the end of period 6, but unable to formulate total credits and total debits for selected number of periods/months. Instead, it is either debit/credit amounts for June or it's for total debit/credits till date.
Can anyone help me please?
Create a formula that returns, for each record, it's dollar amount if it's within the target date range, otherwise, zero.
Sum that formula to get the total for that time period.
I'm a user of the DelmiaWorks/IQMS ERP solution as well. IQMS uses a stored procedure to populate a database table named "C_TRIAL_BALANCE_AS_OF". When you publish a report into IQMS, there is a field named "Execute Before Print" on the Edit Report Definition window that opens when edit a report. To run this stored procedure in conjunction with another report, you will want to choose "POP_C_TRIAL_BALANCE_AS_OF" in the drop-down box control for this field. This will ensure the procedure is run prior to the report so you have the account balances you need as of a specified date. When the report is executed, IQMS will present the user with a Date Picker for the As Of Date. Almost all of the data you need to do a Trial Balance report can be found on this calculated table. The only joins needed should be "V_GLYEAR_PERIODS", "V_GLACCT", and "EPLANT".
There is a built-in report that may do what you want already though. If you begin the Trial Balance module and then click "Reports" > "Print" to bring up the list of all reports, then look for one named "Trial Balance As Of". Even if this report is lacking some information you need, it will likely be much easier to edit this existing report than it would be to create one from scratch.
If you don't have this built-in report, you may be able to get a copy of the RPT file from their support department. As long as you have the Trial Balance module, you should have this report. Its a standard report that is included in every version of IQMS I've worked with. However, my experience is limited to the 15.3 and 2020 versions.

Google Sheets - Protect monthly range script needs monthly triggers at specified date and time

I would like to request help with a script Im trying to put together.
Linked is my test spreadsheet including the script I currently have on the second sheet.
The idea is that this sheet will be copied individually to a group of people. Each person will get their own sheet, editable only by them and myself. It does not get shared any further. Each day the person will add a value into the corresponding day's cell.
On the last day of each month at 8pm, I would like to protect (lock) the cells for that month, to stop the person changing any values that they previously entered.
I have put a repeating script together with a function for each month, covering each range. The problem I'm having is creating triggers that will run the function on the required day. If I set a monthly trigger, they will all trigger at the same time at the end of the first month. Ideally I need individual triggers that will run once a year on the specified date and time for each individual function.
Is this possible? Is there a better way of doing this?
I also realise that I will need to give permissions for each function run, and possibly for each individual copy of the sheet I give to said persons. Is there a clever way around that?
Im also thinking another approach would be for the script to trigger each monthly function 'on open' if the relative date has passed. For example, on Open, if Date is Feb 1st, lock January range, and so on.
Any help provided would be greatly appreciated.
(Note: the true sheet I copied my script and layout from starts this section at Column U, which is why I have minimised Columns A-T).
Test Sheet Link: https://docs.google.com/spreadsheets/d/13z8eWpo6oislkGX3USifLWqh5sz3DsJpSY1YyqNLrx8/edit?usp=sharing

Eclipse BIRT Timeline for one Day in minutes

I am building reports with Eclipse BIRT and got to a problem with the scales of the x-axis. I am getting my input with a select-string out of a database table. There I have events from a Nagios-log-file, with timestamps for every events begin and end. Out of them I create a time like hh:mm, this is enough, it doesn't have to have the seconds or the date (These I select somewhere else). For every event I get a 1 or a 0, representing up- and downtimes.
Now I want to built the report so that I have the scaling of the x-axis for all 1440 Minutes of the day, just changing the state (to 0) when there is a downtime. I've already tried to format the scale, but it doesn't work at all. After days of searching and 'try and error' I am now asking for help. Is there a way to format the chart the way I need and how could it be done?
The last idea of mine was to have another table with every minute inculded from which I select the data and to update this table with the event-data from the nagios-log-table, but this doens't seem to be an adequate solution. Maybe there is something simple I am just not able to see right now.
P.S.: I am fairly new in this and the eclipse manual did not help me with this specific problem. I also know that there are easy, simply and amazing ways to get those kinds of report out of nagios, but I have to do it with BIRT...
I finally found a way to get the report the way I needed.
I am joining my data_table with "generate_series" to get the missing data for every minute.
The postgresql statement looks like:
select *, coalesce(updown, 1)
from generate_series ('19.12.2015 00:00'::timestamp, '19.12.2015 23:59', '1 minute')
left join data_table
on date_trunc('minute',to_timestamp(date_ts)) = generate_series
and host like '%host%';
This may not be the best way to do it, but it worked for me and maybe it is also helpful for others. To usw this with BIRT I just replaced the host and the dates with the parameter-sgn "?".

Real time alert for JasperServer

I am having two input for dates as below & want to set alert for that
Alert:- If difference between StartDate & EndDate is more than 6 months,it must generate alert / prompt panel showing text "Month Period exceed than 6",
& report should not proceed further, untill & unless the user select dates between six months.
As far as I know you cannot configure this in JaperReports Server as is, you'd need to implement some logic around import control validation which might be rather complex given the fact that input control rendering is based on a single template and lots of configuration.
However, you can implement the desired validation easily in the report itself:
create another parameter datediff that contains as default expression the calculation of the date difference in months (the parameter needs to be specified below the 2 date parameters)
The way to utilize this information depends now on your particular report design, here an example:
extend your report query with where clause and 6>=$P{datediff}. This would only return results if the date difference is less or equal to 6 months
add the no data band to your report and add there the desired error message.
modify your report configuration for when no data to no data section.
redeploy your report to JasperReports Server.
The desired behavior is now available.

Backward looking back log report

I'm trying to write a backlog report in Crystal Reports XI attached to Fluke Met/Track database (Sybase back-end)
I have it running between a start & end date, then grouped by Month and then Day.
I need it to show all of the units that were in the lab on the days between the start & end dates
October Units
2
22525
22526
3
22525
22526
22527
4
22526
22527
22530
The order of the units doesn't matter, just that the units are showing up.
Maybe I'm just having a rough day, but I'm not seeing how this can be accomplished.
You can accomplish this by adding a group for your date, opening up the Group Expert, click your Group click Options, then you should see something along the lines of "The section will be printed:" and you can select: for each day.. This should allow grouping for each day.