简体   繁体   中英

Crystal Report Join two tables with more than one condition

my challenge for this day is join a table on crystal without a database-command instead work based on grafic with selection of mysql-tables.

Sorry if i use the wrong translation for the menüs, but i only have a german version.

It means in the database-expert there are selected databasetables instead selecting "add command". Unfortunately, the report ist created from another person and now i have to alter it.

A simple join is not the problem based on ids. in the profiler i can see

inner join table2 on id = id

All right. But what i neer is a further condition:

on id = id AND (timefrom1 BETWEEN time_to AND time_end or time_to is null)

Is there a way to manage this with bumping pixels?

The problem is: If i change to a sql-command, all fields in the report and the formulars are become canceld. so ist extreamly hard to change the whle report to a sql command.

Hopefully you can help me.

Thanks Frank

how did you go with this one? I actually haven't defined my tables and links within the Crystal Report file before, so I had to have a play around first to see what you meant.

Rather than include this new filter in your join (which I don't think you can do anyway), have you tried defining this criteria in your Record Selection? Are you aware of how to do this? This article covers the Select Expert and Record Selection.

This should avoid the problem of losing fields when redefining your data set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM