Selecting and Merging

Stimulsoft Reports.WPF discussion
Post Reply
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Selecting and Merging

Post by Niqu »

Hello.

I have a bit problem and i do not knowhow to do it. For example: I have 3 bool variable (e.g. a, b, c). I have 3 string variable (e.g. a_name, b_name, c_name).
Now i want to generate report:
- If a is true and b is true and c is true, report should look like:
=======
a_name
b_name
c_name
=======
- If a is true and b is false and c is true, report should look like:
=======
a_name
c_name
=======
- If a if false and b is false and c is true, report should look like:
=======
c_name
=======

So if bool variable is true show string variable, if it is false do not show and merge other.
I do not want something like that:
- If a is true and b is false and c is true, report look like:
=======
a_name

c_name
=======

I hope you understand what i want to do.

Thanks in advance for any help.
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Selecting and Merging

Post by Niqu »

I found temporary solution - puting all string variables in different data source each and add condition (e.g. if (a == false) dataSource_a.enable = false) to each data source.
It work fine, but look (in code) terrible and it takes a lot of time.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Selecting and Merging

Post by HighAley »

Hello.

You could also follow next steps:
1. Put each text component on different Panel.
2. Set the Can Shrink property of the panels to true.
3. Enable the Decreasing Size Shift Mode property of the Panels.

Look at the attached report template.

Thank you.
Attachments
Report.mrt
(7.26 KiB) Downloaded 239 times
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Selecting and Merging

Post by Niqu »

It looks good, but i can not find property "Decreasing Size Shift Mode". Can you tell me where i can find it?

Edit: When i change Properties from Basic to Professional i got it.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Selecting and Merging

Post by HighAley »

Hello.

It's good. We're glad to help you.

Thank you.
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Selecting and Merging

Post by Niqu »

Shrink work as i wanted, thank you once again for this idea.

But now i have some problems with grow. I modified your report a bit and add attachment with it to show my problem - i think it will be much easier to understand what i want to achvie.

In this correct report i want get something like that:
a_name
b_name
c_name
c_name
c_name
c_name
c_name
d_name

Is it even possible?
(ofc i still want to have enalbe/disable option working)

Edit: I add new attachment (ReportPro2.mrt) to show my final report (it do not work as i want).
Attachments
ReportPro2.mrt
(24.72 KiB) Downloaded 231 times
Report.mrt
(9.26 KiB) Downloaded 223 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Selecting and Merging

Post by HighAley »

Hello.

The panels which is on the page are static. They are moved when one of them is changed. But if there is a Band then it is rendered later.

As we see now you should change panels on data bands like in the attached report template.

Thank you.
Attachments
Report_modified.mrt
(10.14 KiB) Downloaded 216 times
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Selecting and Merging

Post by Niqu »

This is what i needed. Thank you for help.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: Selecting and Merging

Post by Andrew »

Hello,

Great!

Thank you.
Post Reply