How to check if two values exist on the table

Stimulsoft Reports.WEB discussion
Post Reply
ashar034
Posts: 2
Joined: Tue May 21, 2013 2:20 pm

How to check if two values exist on the table

Post 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 1903 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post 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 146 times
Thank you.
ashar034
Posts: 2
Joined: Tue May 21, 2013 2:20 pm

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

Post by ashar034 »

I clearly had no idea it was going to be this simple.

Thank you very much.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post by HighAley »

Hello.

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

Thank you.
Post Reply