Dynamics AX 2009 X++ Page Counter Query - reporting

wondering how to carry out this requirement if at all possible.
I am modifying the Customer Account Statement morphx report, and the user has requested that we have a Page of Page, i.e. Page 1 of 10, Page 2 of 10 etc etc...
What we need is for the report to reset the total pages after it fetches a new customer. So Customer 00001 might have a 3 page statement, which would be "Page 1 of 3" "Page 2 of 3" and "Page 3 of 3". Customer 00002 might only have a page statement so it will be "Page 1 of 1".
As standard what happens is you get Total pages for the entire report i.e. "Page 1 of 140" "Page 2 of 140" "Page 3 of 140" then next customer "Page 1 of 140" etc etc...
I would assume that a total counter based on the standard counter would be required, but not sure where to capture this total value?

You can call the element.reset() method in fetch after each account statement.
This finalizes the report as a print job.
This not good if the output is going to a PDF or mail.
Also have a look on this and this question.

Related

How to identify Throughput from Summary report

I have created a simple script in Jmeter. I have used transaction controller to find out how much time is required to perform particular transactions. As you can see from the image, my api requests are divided in to 3 transactions namely: "Home Page", "Change freq to daily" and "Select brand".
Transaction controller "Home page" has 12 requests in it. Total number of enabled requests are 12.
Transaction controller "Change freq to daily" has 11 requests in it.
Transaction controller "Select brand" has 14 requests in it.
Setting for all the 3 transaction controllers is same which is as below. I have used only 1 thread group. Number of threads are 1 and loop count is also 1
Based on the execution summary report, I have below questions and will be very grateful if anyone can answer them correctly.
As you can see from the image, "Home Page" transaction controller shows number of samples as 1. Should it not show the total number of samples executed which are 12?
Throughput for "Home Page" transaction controller is 22.8/min. So, does this mean that in "Home Page" transaction, 22.8 requests were served per minute? How 22.8 is calculated? Is this the sum of Throughputs of all 12 requests under "Home Page" transaction controller?
In the row named as "Total" and in the "Throughput" column, it shows the Total as 3.7/sec. How the number 3.7 is calculated? What does it signify? Does this mean that for the entire performance test the Throughput is 3.7/sec? How do I find the Throughput for the entire performance test?
I guess "Average" for Home Page transaction controller is showing correct which is the sum of all 12 averages of the 12 api requests fired. Am I correct?
In the row named as "Total" and in the "Average" column, it shows the Total as 538. How where the number 538 calculated? What does this signify?
In the row named as "Total" and in the "Samples" column, it shows 40 samples. This also includes the Transaction Controller samples (which are 3 in total). Is this not misleading as only 37 samples expected (Adding samples in all 3 transaction controllers = 37). Why does it add the 3 samples for the transaction controllers as well? Can we not see the count as 37 which are the actual samples executed (api requests sent to server)?
It should not, it acts as an extra "pseudo" Sampler which holds the cumulative response time of its children, see Using JMeter's Transaction Controller for more details
As per JMeter Glossary:
Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.
The formula is: Throughput = (number of requests) / (total time).
See point 2
It's arithmetic mean of 12 child elapsed times (sum of all response times divided by 12)
See point 4 but instead of 12 sampler results all sample results are considered
See point 1, this is how Transaction Controller works, depending on the mode it can:
Either add an extra sample result containing cumulative response times of its children
Or substitute its children with a single sample result with the cumulative time
so you can choose of having 40 samples (37 + 3 transaction controllers) or 3 samples (transaction controllers only)

How should I display the record and hide the security constraint message in servicenow

Lets imagine first page of a table where 60 rows gets hidden by the ACL so the page shows 40 rows and a message at the end stating : "number of rows removed by security constraints: 60"
the other page shows 40 rows and the similar message...
So I want the page should display 100 rows which are accessible for the User so that the info message "number of rows removed by security constraints" is not visible at the bottom of the page.
I would say Query Business Rules are exactly what you want in this case (if you want to restrict entire records). They do not show the message at the bottom, don't make you go through 100 of pages to find the 10 records you need, and are generally faster than ACLs (a Query BR only gets evaluated once whereas an ACL has to be evaluated for every record).
If your "u_requested_for" field is a reference to user, the code you need is something like:
if(!gs.hasRole('admin') && gs.isInteractive()){
var q = current.addQuery('u_requested_for', gs.getUserID());
}
The only ways I know to do this, is to also write Query Business Rules. Generally the effort isn't worth it.

Insert records based on "Row Selector" in Oracle APEX

I have created a report and form on top of a table. The form page is "Tabular Form", in which all columns are editable. In the "Form" page, i have a Lookup button. On clicking this button it will navigate to new page which has a report on top of view with "Row selector".
When user can select list of rows and clicks submit, then the selected rows should get insert in to Tabular Form page.
Can you please explain how I can achieve this.
As noone replied to your question (yet), let me say a few words, based on my current knowledge & experience. Note that someone might have another, better idea and opinion.
A tabular form is created on a table, its source is a SELECT statement. Saying that you want to check row selector checkboxes on some report page and those values will then be transferred into a tabular form on another page is make-a-wish statement. I'd say that those values should be INSERTED into a table (on which that tabular form is created upon), and tabular form should then perform re-query in order to fetch those rows.
As of "checking row selector checkboxes" in a report and doing "something" with those rows: boy, I don't know how to do that. Yes, I have manipulated with rows selected by my own checkbox items in a tabular form (note the difference: not in a report, but in a tabular form) and it was much more a pain than a joy.
I'd suggest you to read the following Patrick Wolf's article: Which Tabular Form Column is mapped to which Apex_Application.g_fxx array?. Why? Because it explains what to do with g_fxx array. It is a mean to manipulate values in a tabular form. Just to show an example I used in one of 4.x Apex versions (no, I don't have any more recent code) so that you'd get the idea of how it is supposed to be done; this is a page process which fires on Submit.
"01 - ID" represents "apex_application.g_f01"
"02 - CB_NEDOSTATAK" represents "apex_application.g_f02"
and so forth; those are items in a tabular form
/* 01 - ID
02 - CB_NEDOSTATAK
03 - CB_HITNOST
04 - CB_OTKLONJEN
05 - NAPOMENA
*/
begin
for i in 1 .. apex_application.g_f01.count loop
update dg_pregled set
cb_nedostatak = case when apex_application.g_f02(i) = 1 or
apex_application.g_f03(i) = 1 then 1
else 0
end,
cb_hitnost = decode(apex_application.g_f03(i), 1, 1, 0),
cb_otklonjen = case when apex_application.g_f02(i) = 1 and
apex_application.g_f04(i) = 1 then 1
else 0
end,
napomena = apex_application.g_f05(i)
where id = apex_application.g_f01(i);
end loop;
end;
Basically, you'd do something like that; instead of UPDATE, you'd do INSERT.
As I said: this doesn't have to be an optimal solution to your problem, but that's what I can say about it. Good luck!

Mahout recommender returns no results for a user

I'm curious why in the example below the Mahout recommender isn't returning a recommendation for user 1.
My input file is below. I added blank lines to enhance readability. This file will need the blank lines removed before it's run through Mahout.
The columns in this file are:
User ID | item number | item rating
1 101 0
1 102 0
1 103 5
1 104 0
2 101 4
2 102 5
2 103 4
2 104 0
3 101 0
3 102 5
3 103 5
3 104 3
You'll note that item 103 is the only common item that all 3 users rated.
I ran:
hadoop jar C:\hdp\mahout-0.9.0.2.1.3.0-1981\core\target\mahout-core-0.9.0.2.1.3.0-1981-job.jar org.apache.mahout.cf.taste.hadoop.item.RecommenderJob -s SIMILARITY_COOCCURRENCE --input small_data_set.txt --output small_data_set_output
The Mahout recommendation output file shows:
2 [104:4.5]
3 [101:5.0]
Which I believe means:
User 2 would be recommended item 104. Since user 3 rated item 104 a 3 this may account for the 4.5 recommendation score vs. the result below…
User 3 would be recommended item 101. Since user 2 rated item 101 a "4" this may account for a slightly higher recommendation score of 5.
Is this correct?
Why isn't user 1 included in the recommendation output file? User 1 could have received a recommendation for Item 102 because user 2 and user 3 rated it. Is the data set too small?
Thanks in advance.
Several mistakes may be present in your data, the first two here will cause undefined behavior:
IDs must be contiguous non-zero integers starting at 0 so you need to map your IDs above somehow. So your-user-ID = 1 will be a Mahout-user-ID = 0. The same for items, your-item-ID = 101 will be Mahout-user-ID = 0.
You should omit the 0 values from the input altogether if you mean that the user has expressed no preference, this makes the preference "undefined" in a sense. To do this omit the lines entirely.
Always use SIMILARITY_LOGLIKELIHOOD, it is widely measured as doing significantly better than the other methods unless you are trying to predict ratings, in that case use cosine.
If you use LLR similarity you should omit the values since they will be ignored.
There are very few uses for preference values unless you are trying to predict a user's rating for an item. The preference weights are useless in determining recommendation ranking, which is the typical thing to optimize. If you want to recommend the right things in the right order toss the values and use LLR.
The other thing that people sometimes do with values is show some weight of preference so 1 = a view of a product page and 5 = a product purchase. This will not work! I tried this with a large ecommerce dataset and found the recommendations were worse when adding in product views, even though there was 100 times more data. They are fundamentally different user actions with different user intent and so can't be mixed in this way.
If you really do want to mix different actions use the new multimodal recommender based on Mahout, Spark, and Solr described on the Mahout site here: It allows cross-cooccurrence type indicator calculations so you can use user location, likes and dislikes, view and purchase. Virtually the entire user clickstream can be used. But only with cross-cooccurrence correlating one action to the canonical "best" action, the one you want to recommend.

Report Help: Crystal Reports

I am making one Crystal Report for bills.
Bills Table :
BillID(pk), PartyName, BillDate, Loading, Unloading.
BillDetails Table:
ID(pk),BillID(fk),Item, Quantity, Rate, Amount.
In the database expert I have joined the 2 tables.
I want the report like this:
BillID PartyName BillDate
SALE EXPENSES
ITEM QUANTITY RATE AMOUNT LOADING 10
toy 2 2 4 UNLOADING 20
doll 7 6 42
ball 8 6 48
cell 5 6 30
TOTAL : 160 30
NET: 160
- 30
130
The problem is that the loading and unloading appear only once per bill while the biil contains multiple items.
How I can mix details section with items that appear only once(loading and unloading) ?
You have at least two options for presented layout:
Use subreport for displaying loading/unloading values (link with bill ID)
Put your loading/unloading fields into special group header section (group by bill ID) and make that section "underlay following sections"
If you can dispaly loading/unloading values on separate row, then place them into appropriate group header/footer and you're done.
I think you'd need to use both of the options in Arvo's answer together to get what you are wanting.
I'd first create your subreport for "Loading and Unloading" and place it in the header with Item, QTY, etc and then set that header to "underlay following sections". This will get you the details of the subreport, but then you need to capture the total to send back to the main report.
To get this info you'll need to create a shared variable in the subreport for the total and then you can reference it in your formula in the main report's "Net" footer section.
Hope this helps.

Resources