Report Designer: Show in a table only part of data

Stimulsoft Reports.WPF discussion
Post Reply
VitShim
Posts: 4
Joined: Tue Apr 14, 2020 1:27 pm

Report Designer: Show in a table only part of data

Post by VitShim »

Hello,

I am new here and have to create a report with the report designer (version 2020.2.1).
I would like to aks somebody to help me.
What I try is I create a table and link to a data source. This data source contains for example 100 rows.
I have to show only 10 rows sorted by some criteria.

My way:
1. I've put the table
2. linked to data source
3. defined table header
4. defined for every cell in the first row in the table the data source

Result: I've got all data in the table.
For example:
Name Number Description
a 1 abc
b 2 abc
c 3 abc
.
.
.
x 100 abc

In the table properties I can set a number of rows. But then I've got empty rows between data.
For example, I set 3 as a number of rows. Then I have:
Name Number Description
a 1 abc



b 2 abc



c 3 abc




.
.
.
x 100 abc

I could not really understand how it works. I hope someone could help.
Thank you!
VitShim
Posts: 4
Joined: Tue Apr 14, 2020 1:27 pm

Re: Report Designer: Show in a table only part of data

Post by VitShim »

So, I found the answer in the forum. I had to put this expression in the filter of the table: "Line<=10". Then only 10 rows will be displayed.
viewtopic.php?t=37041
VitShim
Posts: 4
Joined: Tue Apr 14, 2020 1:27 pm

Re: Report Designer: Show in a table only part of data

Post by VitShim »

Unfortunately, the solution in the forum is not exact what I want. With the expression "Line<=10" I get the first 10 rows from data source. But I need 10 rows from sorted data.

Example (with 4 rows):
What I have:

Number Text
2 abc
1 abc
6 abc
89 abc
42 abc
99 abc
3 abc

What I want (only 4 rows sorted by number descending):

Number Text
99 abc
89 abc
42 abc
6 abc

How could I do it?
I would like to ask to help me. Thank you!
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Report Designer: Show in a table only part of data

Post by Lech Kulikowski »

Hello,

Please try to use Condition instead of the Filter.
You can set your expression - "Line > 10" and uncheck the "Component Is Enabled" option.

Thank you.
VitShim
Posts: 4
Joined: Tue Apr 14, 2020 1:27 pm

Re: Report Designer: Show in a table only part of data

Post by VitShim »

Hello Lech Kulikowski,

your solution does work!

Many thanks for the fast support!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report Designer: Show in a table only part of data

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.
Post Reply