Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Multiple Database Conditions Post Reply Post New Topic
Author Message
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Topic: Multiple Database Conditions
     Posted: 10 Aug 2014 at 10:27pm
Good morning all,

I currently have multiple Databases, that hold different system performance statistics, that I would like to have in one report (rather than in multiple subreports) by using OR clauses in the formula.

At the moment I am trying to work this out with two Databases so I can get the foundations in place (as below);

1) Two Crosstab reports from two different databases (for the purpose of this question we'll name them Database1 and Database2).

2) Each Database has an identifier which I am trying to perform my formula on but has different values depending on the database (for the purpose of this question we'll name this field IdentifierValue)

So what I am trying to achieve is to tell Crystal Reports to look for values in Database1 or Database2 using the IdentifierValue.

Below are two examples:

 {Database1.IdentifierValue} in ["Value1","Value2","Value3") OR 
{Database2.IdentifierValue} in ["Value4", "Value5"]


 (NOT ISNULL({Database1.IdentifierValue}) and {Database1.IdentifierValue} in ["Value1","Value2","Value3"]) OR 
(NOT ISNULL({Database2.IdentifierValue}) and {Database2.IdentifierValue} in ["Value4", "Value5"]


I can get one of these to work on it's own (i.e. IdentifierValue is one of) but trying to put two databases together doesn't seem to work.

Is this something that is possible or is the only way to do multiple subreports?
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum