Issue with Report Footer Calculation - ms-access-reports

I have a table and am preparing a report. Each record in the table contains information about the submittal of a report. In the detail section of the report, there are multiple fields, two of which are: DueDate and SubmittedDate. I added a calculated field (name = ROT, for ReportOnTime) next to these fields to determine if the a report was submitted before the due date:
=IIf([DueDate]-[SubmittedDate]>=0,"Yes","No")
This works fine. In the report footer, I want to add up all of the instances where reports were submitted on-time. I have tried, without success, the following code:
=Sum(IIf([ROT]="Yes",1,0))
However, this just brings up a parameter entry dialogue window. I am assuming this isn't working because ROT is a calculated field, but really have no idea how to debug this. Any suggestions?

Related

Crystal Report not filtering SQL records based on selection formula

unfortunately I'm not an expert of Crystal Report, so I'll post here my question hoping for any help about my issue.
I want to display inside my report the result of a filter on a SQL RecordSet; this RecordSet is looked up from an a single table, of which I want to show some fields of my SQL table, while the filter I want to apply is based on a field parameter (defined static) that I'm trying to set programmatically.
Here below I attached my code where I'm applying the record selection formula, I tried also hard-coding the value instead of passing it through a dropdown selection:
ReportDocument RPT_Doc = new ReportDocument();
RPT_Doc.Load(RPT_Path_Name, OpenReportMethod.OpenReportByDefault);
ApplyConnInfos(ref RPT_Doc);
RPT_Doc.SetParameterValue("data_riferimento", "20161001");
RPT_Doc.RecordSelectionFormula = "{viaggi.data_part_pre} = '20161001'";
crystalReportViewer1.ReportSource = RPT_Doc;
In the first image attached you can find the field parameter definition, while second image is the record selection formula I defined inside my report:
The report always shows all the records of my table (more than ten thousand rows), instead of displaying a filtered RecordSet. The odd thing is Preview function from Visual Studio works like a charm; it prompts the field value, once I confirm the value the viewer displays the report with the rows filtered as I expect..
What am I missing from report/C# program configuration to make the record selection work?
Thank you in advance for any suggestion you can give me :)
Leonardo
Ok, finally we got the solution to our issue.
We found the CrystalReportViewer object used to display generated reports has 2 different properties, SelectionFormula and ViewTimeSelectionFormula; both has default value set to empty string.
Below I attached the picture of .Designer.cs file with the 2 properties valued:
We commented those 2 properties and the selection formulas and field parameters applied through code / report designer worked again.

Need access query to reflect the data with latest date/follow up field

I am creating the a database and almost complete. I have issue in creating the query to show the data with latest date from incident report number without repeating. If the date is same for the incident report number then need the data with latest follow up from incident report number without repeating.
I have attached the report showing the first data's as actual Actual Data and second data as required Required Data. Highlighted are the field which are need to concentrate on.
Apply a filter: [Follow Up] = ".1"

Calculated field value won't pass through as a parameter in report

I have a report that I already created in which this works. I have three parameters in my first report with a matrix. The matrix column and rows are based off of two calculated fields. The row field is called Time Summary and is basically a time range like follows (8AM-10AM,10AM - 12PM, 12PM-2PM,Etc.) The column field is just days of the week (Monday,Tuesday,Wednesday,Etc.) They were both calculated by a field called 'CreatedDateTime'. The value column is a count of request numbers so we can see when our call center is receiving the most service requests and at which times.
I'm drilling down to a detail report that lists each request and many of the request details. I created an action on the value (count of request) textbox in my matrix report that makes it drill into the detail report. In the detail report I have the same three parameters as in my first report, but I also have parameters for the row and column fields of my matrix (Time summary and day of the week respectively). Here is a screenshot of my text box properties screen in the action tab.
The problem I'm having is that when I run my matrix report and click on the value that I want to drill into, it will drill into the detail report and update the parameter values for the three that are also in my matrix report, but it won't update the parameters for the values in which I selected in my matrix.
Here is another screenshot of what happens when I select a value in my matrix and it drills into the detail report. I have the calculated fields in my detail report too and it filters the main data set based off of the Day parameter and Time Summary parameter. I made a report yesterday very similarly and it worked. I can't figure out why it I can't get this report to work. I'm almost positive it has to do with how I have my parameters defined in my detail report or something with the text box properties and the action. Any help in figuring this out would be appreciated.

Could a Matrix mimic this Crystal Report structure - SSRS

I'm trying to convert a Crystal Report to SSRS and I'm having trouble with this section of the report.
The first line of the report event information: date, name, recruiter, hours, etc.
And then under the summary, the report should list changes that are considered critical changes to information about the event. Within Crystal Report, these changes are in the Details section and all changes are listed under each event.
I am trying to accomplish the same task within SSRS but I'm having some trouble with the changes summary. The event summary displays for each record of a change. In the screen shot below, you can see that DriveID 682144 had three changes, but for each change, the event summary is displayed/printed. So instead of Evoqua listed once and the three changes made to the event listed underneath, I am getting the summary displayed for each and every change within the report.
I have a row grouping for DriveID since each event has an unique ID. And I also have a Details row group that displays the changes. I've tried adding a grouping on the Details row group, but if I group on SourceDriveID, it will only display one record for each drive. I am joining the two tables on DriveID (Drivemaster.DriveID=CriticalDriveChanges.SourceDriveID)
I think it would work if the Critical Drive Changes view had a unique identifier, but it doesn't so I am trying to work with what I have. Any suggestions on making this work?
If there is anything I need to explain better, please let me know. I've been stuck on this for two days and need to get through it.
Thanks,
Your second group needs to be grouped by the key of the “changes” and not the DriveID. It’s already grouped by the DriveID because of the parent group. Grouping by the same Field again effectively gives you an extra summary row, its showing the first of the changes.
This can be done by customized summary. You can have a global variable for the summary, and use expression to do the calculation. Some tricks are needed for this kind of report.

Browse field data shows value, but displays another value

I have a formula written for a field in Crystal Reports. When i refresh the report, i get a different value from the formula. The required value is always the last value in Browse Field Data dialog for that formula.
Isnt the formula supposed to have only one value as output? why are multiple values shown in browse field data dialog.? Is there a way to retrieve last value of Browse File Data dialog?
My formula looks like below:
WHILEREADINGRECORDS;
NumberVar CODTOTAL;
if {XXX.YYY} = 1 then
( CODTOTAL := CODTOTAL + {XXX.ZZZ};
);
CODTOTAL;
Browse field data shows all the values "CODTOTAL" acquires as a result of that formula and displays a random value amongst the assigned value.
Please help me out. I am amateur in crystal reports.
Any help would be highly appreciated.
~Regards.
First observation should be where have you placed the formula (Details, Footer.. etc).
why are multiple values shown in browse field data dialog.?
Browse field shows the data that is present in the table but in your case you are applying "If" condition of the filed. It can be possible that there is only one record that satisfies your condition.
I would suggest to run the report without the codition, Check the results and apply the condition and check results again.

Resources