Page 1 of 1

How to check if two values exist on the table

Posted: Tue May 21, 2013 3:01 pm
by ashar034
Hi,

I am using Stimulsoft Reports.web. I have a query.
Let's say I have 2 database tables, Table A and Table B
Tables and required output.png
Tables and required output.png (8.46 KiB) Viewed 1907 times
I have put a databand called "Databand1" with the datasource as Table A, and then inside "Databand1" i put "Databand2" with the master component as Databand1, the datasource as Table B, and the relation of Table A and Table B.

Till this stage everything is working fine... In my output I can see Table A and Table B data perfectly.

Now I want to add a bit of condition. In my report I want to check if there are 2 values exist in table B for Table A. and print something like "Both Exist" or if only 1 value exist then print "only 1 value exist" etc.

I want my output to be something like this

A_ID Output
1 Both Exist
2 One Exist
3 Both Exist
4 One Exist

Any help will be appreciated.

Thanks,

Ashar

Re: How to check if two values exist on the table

Posted: Thu May 23, 2013 11:24 am
by HighAley
Hello.

You should create a relation between tables, then create a master-detailed report and set a condition to the text component.
Please, look at the attached report template.
Report.zip
(2.24 KiB) Downloaded 147 times
Thank you.

Re: How to check if two values exist on the table

Posted: Thu May 23, 2013 2:48 pm
by ashar034
I clearly had no idea it was going to be this simple.

Thank you very much.

Re: How to check if two values exist on the table

Posted: Fri May 24, 2013 1:37 pm
by HighAley
Hello.

We are always glad to help you.
Let us know if you will need any additional help.

Thank you.