FileMaker Pro 13: How to get a summary variable to display an accurate total - database

I am working on a database of records that includes a step that only needs to be performed for some of the records (about a fourth of them). To keep track of which records needs the extra step, I created a boolean field with 0 for "doesn't need the step" and 1 for "needs the extra step" (these are assigned before importing the information into the database). There is also an option for the user to click a button and change the boolean from 0 to 1 (in case the record needs the extra step in the future).
The database also has a report feature that shows the total number of records that needs this extra step. I need this field to display the current total number of these records, so I have tried setting up a summary variable called Total PLQA that is defined to give the "Total of" and then the boolean variable (PLQA Bool). Somehow, I got the total to work once, but it seems that the reporting variable "Total PLQA" does not update when new records are added to the database or when users change the boolean value. Somehow, I need to get the variable to update whenever the report script is run and I can't figure out how to get it to work.

I have tried setting up a summary variable called Total PLQA that is
defined to give the "Total of"
That would be a summary field, not a variable.
it seems that the reporting variable "Total PLQA" does not update when
new records are added to the database or when users change the boolean
value.
A summary field always displays the summary value for the current found set (unless you place it in a sub-summary part, where it will display the sub-summary value for each sorted group).
Make sure your report layout is based on the same table where the summary field is defined, and that the summary field's instance placed on the layout is coming from the same table occurrence.
Note also that:
After import, only the imported/updated records will be found;
If you modify the Boolean field, you must commit the record before you will see the summary field reflect the change.

Related

Where does the value of 'Last changed on/by' is stored for any element in 'se11' (Inside attributes tab)

I want to find out 'last changed on/by' for a large number of elements going in 'se11' and checking it's attribute value .
So instead of copying each elements name and checking it's attribute for the same value, is there any table or database in which i can get the values for multiple entries at once?
Picture is attached in the question for the reference.
With the cursor placed in the field you're interested in, press F1, then select the technical info. This will show you the table name or - as in this case - a structure named RSDXX, which is not what you're looking for - but it is the fastest way in some cases.
Alternatively, start transaction ST05, enable the SQL trace and navigate to the display in a separate window. Then stop the trace and examine it - you will find a list of all tables accessed for the process. Very near the top of the trace list, you will find a table named DD02L which is the one you're looking for in this case.

Printing records with condition Crystal reports

I am using stored procedure in mssql as backend, vb.net as frontend (just info).
There are a lot of records in the database and I am printing in crystal reports.
Now I want to filter the records from crystal report and not by adding a new parameter to procedure or changing database structure or else.
For now,Say there are columns : Name , Amount.
I want to put filter in amount like only display records whose amount above 100 or something. So other records with less than 100 should not be displayed.
This filter will be passed by the user so it'll be random.
I can't find a proper answer on internet. Might be a duplicate question, if so please post the link of the question if it is duplicated.!
Thanx anyways...!
In general the idea is to:
Create the parameter (user choose what will be the input/value) - link
Set filters, what values should be displayed in regards to parameter - link
On right side there is a DataExplorer window, where You need to add a Parameter (define his name, what question will be shown to user and what type the param will be / what values can be set inside).
Once done, You can jump to Data tab of a report, click Interactive Filter and specify which column must fit what condition with what value = Parameter (that one user will enter in Report).
Example: I will create AmountParam, with message "What should be the minimum amount?". Type will be set to Integer. Going to Report->Data->Interactive Filter, choose Amount as a Column, AmountParam as a Parameter and set condition Greater then (>).

MS ACCESS Report - Using CODE to change a value in a field from an OPTION Group to a different value

I have a report in ACCESS that Is based on a query of a table populated by a form with an Option group. ( to try to explain this better - Table is inspector qualifications, the query pulls all of the qualifications for the inspector, the qualifications are selected via option group on a form that populates the fields of the inspector qualification table.) Of course, the choices are stored as numeric values, "1, 2, 3 or 4" in the table, but 4 actually designates a N/A or NONE. Since everything is already built out this way, I am trying to write a code that will run when the report is generated (or opened,) that will take the "4" value entered (if the field equals that) and change it to a Null value /blank in the report - not in the query or table. I still want this report to generate everything else as is - show all records - just change the value if that particular option is the one shown in that field for that particular record.
Anyone know of a good way to do this? Any help would be GREATLY appreciated!!!!
You would just place an 'IIF' in the query that tests for the value you want to change, then either changes it to something else, or retains the original value. The below will test field 'Nbr1' for the presence of a 4, and if found, change it to 'N/A', otherwise it stays the same.
Note! You will need to change the control source in the report to reflect the name you provide (i.e. 'MyChange') because you can't keep the original name.
SELECT Table1.ID, Table1.EMPID, Table1.TestResult,
IIf([Nbr1]=4,"N/A",[Nbr1]) AS MyChange, Table1.Nbr2
FROM Table1;

Pass field from one dataset to another dataset as parameter In SSRS 2008 R2

I have a scenario where one of my data-set returns multiple records. Now I have implemented grouping in my report so as to display each record from this data set on a different page.
Now I have an another dataset which loads some data using fields from dataset1 as parameter. That means I need to assign the fields from dataset1 to dataset2 as parameter for each record.
For a single record, we can assign the values from dataset1 to a report parameter and then use it for our dataset.
But in this case, parameter always holds the value 1st record and passes it for every page or group.
How can I achieve this?
I had the same problem, where the value was always from the first record in the parent report dataset for each subreport record.
In my case, the resolution was to remove the hidden parameter that I was using in the parent report. The default value I was assigning for that parameter were results from a query.
I then went into the properties of the Subreport, selected Parameters and in the Value dropdown where I originally assigned my parent report parameter, I switched it to the field name of the parent report dataset field so that it would pass the value to my subreport parameter.
Hope this helps.
I may be misunderstanding your question, but I think what you're looking for here is the LookUp() function. This basically fetches data from another dataset, matching on some primary key that you define.
The function has four arguments; the first is the data to match on in the "destination" dataset (I.E. the one that's currently powering your matrix, the second is the data to match on in the "source" dataset (I.E. the one you're fetching the data from). The third is the data you want to fetch, and the fourth is the name of the "source" dataset.
So as an example:
=LookUp(Fields!PrimaryKey.Value, Fields!PrimaryKey.Value, Fields!Data.Value, "DataSet2")
The result of this expression would be for the Report to bring back the data from the field called "Data" in "DataSet2", matching on the values in the fields called "PrimaryKey" in each dataset
Hope that makes sense.
From your explanation, it seems like you want to use a for...next loop but only the first item in Dataset1 is always returned. Did you try to clear the parameter before the loop goes to the next item? Another alternative is to create a Dictionary and add all the items in Dataset1 to it, then loop the Dictionary to get the records for Dataset2, and always clear your parameter before the loop goes to the next item. There should be much better options, but this is what I have for now.
Regards.

negative number in my datagridview

I'm having problem in my datagridview.
I'm using vb 2008 and an access database. When I create a new record for my item the No column (primary key and autonumber in access) always shows a negative number.
How can I make that a positive number and it should follow the numbering in the datagridview. Here's a screen shot of that:
Your "No" column will start out with an AutoIncrementSeed of -1 and an AutoIncrementStep of -1. The DataSet isn't smart enough to start with the Max value of the "No" column, so you need to programatically set it.
Me.MyDataSet.MyDataTable.Columns("No").AutoIncrementSeed = _
Me.MyDataSet.MyDataTable.Max(Function(Row) Row.No) + 1
Me.MyDataSet.MyDataTable.Columns("No").AutoIncrementStep = 1
The first line above finds the maximum value of the No column and sets the AutoIncrementSeed to 1 above the maximum value. The second line just sets the IncrementStep to 1.
Keep in mind that the No column in the DataGridView may not correspond to the actual value that the database creates. When your data is committed, the database will create a new AutoNumber value, ignoring any other values you may pass in. There are some pitfalls to doing this if your users expect the No value to stay the same after committing the new entry.
Just open the dataset designer and look for the increment parameter (-1) for the applicable datagriview of the table concerned and change it to (+1). Then, rebuild or recompile your application and the problem will done with.
if its showing in negative
check the logic why its converted to negative
changing - to + dosent matters, but logic ??
CONVERT AS put condition as column1>=0

Resources