Link to home
Start Free TrialLog in
Avatar of brianrodda
brianrodda

asked on

More than one IF in a VB script.

Hi,
I am using a report designer (C1 Report Designer) that uses SQL behind it. In the report I have several group headers. Within each header I have VB script that does various things. What I want to do is create VB script that allows me to have more than one IF condition relating to that header - but how ? The If's are unrelated except that the conditions are all in the header.
Thanks.
Avatar of jackmcbarn
jackmcbarn
Flag of United States of America image

Can you show me the VB script?  If it's pretty big, post it on EE-Stuff.  Otherwise, post it here.
Avatar of brianrodda
brianrodda

ASKER

Hi,
Unfortunatley I cant show it exactly for another 10 hours, but its along the lines of:

[Level3PartNumber Header].Visible = true
[Level4PartNumber Header].Visible = true
[Level5PartNumber Header].Visible = true
If LEN (Level3PartNumber) = 0 THEN
[Level2PartNumber Header].Visible = false
ELSE
[Level2PartNumber Header].Visible = true
END IF

and I wish to add something like:

If VAL (PartLocation) = "STORES" THEN
[Level2PartNumber Header].Visible = false
ELSE
[Level2PartNumber Header].Visible = true
END IF

Does that help ?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of acekracker
acekracker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'll try it tomorrow and let you know.
Thanks for the input.
Hi,
Basically this works and answers my question.
Thanks for the solution.