Page 1 of 1

Print based on count

Posted: Tue Feb 21, 2012 7:42 am
by Fabio Pagano
I have a flat table (is the report's data source) that contains the orders data, with the following structure:

Agent | Customer | Order_id

In each row, that represents a single order, i have the agent, the customer and the order_id.

In the report i need to group by agent, then by agent's customers, showing for each agent and customer the count of their orders, then for each customer i must show the detail of the orders id.

Report's structure is as follows:

Group Band (Agent)
Group Band (Customer)
Data band (Orders)

Example or report (i use "code" tag for showing indentation):

Code: Select all

Agent "1": Number of orders: 4
	Customer "A": Number of orders: 3
		Order_Id: 1
		Order_Id: 2
		Order_Id: 3
	Customer "B": Number of orders: 1
		Order_Id: 4

Agent "2": Number of orders: 2
	Customer "C": Number of orders: 2
		Order_Id: 5
		Order_Id: 6
I know how to obtain this.

I ask your kind help because i need to consider only the customers that have a count of orders greater than 2: the total of the agent must consider only the customers effectively printed.

So, if i consider only the customers that have a count of orders greater than 2, the report above should be as follows:

Code: Select all

Agent "1": Number of orders: 3
	Customer "A": Number of orders: 3
		Order_Id: 1
		Order_Id: 2
		Order_Id: 3
Customer "B" of Agent "1" and Customer "C" of Agent "2" are not printed because their count of orders is not greater than 2.

Note that the orders count of the Agent "1" considers only the orders of the Customer "A" that is printed, while the Agent "2" is not printed at all because it has not Customers that have a number of orders greater than 2.

May you kindly help me on how i can accomplish this?

Thank you.

Print based on count

Posted: Tue Feb 21, 2012 8:23 am
by Fabio Pagano
I should add that i'm using version 2010.3.900.0 of 2 december 2010.

Print based on count

Posted: Wed Feb 22, 2012 7:34 am
by Alex K.
Hello,

Please see the sample report in attachment.

Thank you.

Print based on count

Posted: Mon Feb 27, 2012 10:57 am
by Fabio Pagano
In the meantime i've installed the version 2012.1.1213.0 of 23 february 2012.

The datasource you have provided contains the additional "Name1" that contains "OrderID.Count"

Image

I cannot modifiy my datasource structure, outside or inside the report, so it can contain only "Agent", "Customer", "OrderID".

To exclude the customers that have a number of orders lesser than 3, in the customers' group (GroupHeaderBand2) i've added the condition:

"Count(GroupHeaderBand2) < 3" that disables the component (checkbox "Component is enabled" not selected).

It works, but if the GroupHeaderBand1 (Agents' group) has no GroupHeaderBand2(s) groups (customers) under it (because none of its customers has more than 2 orders) i need to not print the GroupHeaderBand1 (agent). In GroupHeaderBand1 (Agents' group) i've added the condition:

Count(GroupHeaderBand2) == 0 that disables the component (checkbox "Component is enabled" not selected)

but the agent is always printed though it has no customers with more than 2 orders, see the screenshot (in red square the agent without any customer).

Image

Is there a way to not print the agents' group if it has not any customer (group) under it, without modifying the original datasource?

If required i can send you the report design.

Thank you.

Print based on count

Posted: Tue Feb 28, 2012 10:07 am
by HighAley
Hello.

Sorry for the delay with response. We need some additional time to prepare the answer for you.

Thank you.

Print based on count

Posted: Wed Feb 29, 2012 4:18 am
by HighAley
Hello.
Fabio wrote:In the meantime i've installed the version 2012.1.1213.0 of 23 february 2012.

The datasource you have provided contains the additional "Name1" that contains "OrderID.Count"

I cannot modifiy my datasource structure, outside or inside the report, so it can contain only "Agent", "Customer", "OrderID".
You should create the Data Source from other Data Source like in the report we sent you. And the you could create "OrderID.Count" field.
Please, look at the DataSource2 Edit window.
Then you should create a relation between these two Data Sources.

If you have some additional questions, please do not hesitate to contact us.

Thank you.