Page 1 of 1

Selecting and Merging

Posted: Thu Aug 09, 2012 1:59 pm
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.

Re: Selecting and Merging

Posted: Fri Aug 10, 2012 6:07 am
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.

Re: Selecting and Merging

Posted: Fri Aug 10, 2012 8:16 am
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.

Re: Selecting and Merging

Posted: Fri Aug 10, 2012 9:14 am
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.

Re: Selecting and Merging

Posted: Fri Aug 10, 2012 12:43 pm
by HighAley
Hello.

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

Thank you.

Re: Selecting and Merging

Posted: Mon Aug 13, 2012 6:14 am
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).

Re: Selecting and Merging

Posted: Tue Aug 14, 2012 5:45 am
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.

Re: Selecting and Merging

Posted: Tue Aug 14, 2012 6:31 am
by Niqu
This is what i needed. Thank you for help.

Re: Selecting and Merging

Posted: Tue Aug 14, 2012 12:25 pm
by Andrew
Hello,

Great!

Thank you.