Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restriction on universe objects usage

Status
Not open for further replies.

cfusion

Programmer
Jun 21, 2001
3
SG
Hi,

I have a universe which has total 12 tables of two different groups, say loans and deposits each containing 6 tables(or classes). The tables are linked within the groups, in the sense, loans table are not linked to deposits tables.

Now, how can I control user to pull objects from these 2 different groups at a time. They should be allowed to either query on loans group or deposits group. Is there any way that I can disable/grey out the other group of tables the moment user select an object from one group?

Thanks a lot for any information provided, in advance.

Best regards,
 
Which Crystal? What database access? Talking about a 'universe' is confusing.

But I'll try answering on the basis of what I think you are after. You can define a formula field that uses alternative fields, based on a parameter choice. E.g.
Code:
 if @param = "L"
then {loan.code}
else {deposit.code}

You can then group using this Formula Field - you can group on anything that uses data from just a single 'row', a record or collection of single records from different tables.

You'll first have needed to group the records using 'Database Expert'.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
You could set this up as two subreports in separate report header sections, where you use a parameter to suppress the unwanted report. Or you could use one set of tables in the normal fashion and use the other set in a subreport in the report footer, again using a parameter for conditional suppression.

If the tables have the same fields and you have a higher version of CR, you could also use add command to create a union query that combines the two sets of tables and again use a parameter to select which fields would be used.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top