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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting data from unlinked tables

Status
Not open for further replies.

chris777

MIS
Jan 3, 2002
228
US
I have a table which is a 'control' table. It has one row of data with some system settings. There is no way to link this table with the one in my report.

I need to get a single datetime field from that table and use it in the report select statement. This means a shared variable from a sub report won't do it since they have to be evaluated at print-time.

I tried simply referencing the field I need in the select, leaving the table unlinked, however that returned nothing. If I put that field on the report, it comes back NULL (which it is not).

Any ideas? Chris
DFW Crystal User Group
 
Dear Chris,

Hmmm, can you post more information?

Is there a datetime field in the table you are trying to link to?

If not, what is the purpose of the "control" file - in other words what purpose does the datetime field in this control file server?

If you will please post more information, I will be happy to help you.

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
If the Control table has only one record, leaving it unlinked is just fine. It simply means that every record in your other Table would be "joined" to that record (since there is no contraint on how the records are joined).

Can you select and view that column in a Crystal report using ONLY the control table?

hth,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
IdoMillet- I thought I could leave it unlinked however, when I drop the datetime field in the report, no matter what section, it comes up NULL. Yes, if I only have the control table in the report I can view the data just fine. Everything that should be there, is there.

rosemaryl-There is a datetime field that I could link to, and we tried a GREATER THAN OR EQUAL join (from the data table to the control table) because we wanted all dates that were greater than or equal to the control date; the select statement looks like this:

{RentableItemDescription.ridDisplayBit} = 1 and
(isnull({LeaseBasedScheduledTransaction.lbstEndDate}) or {LeaseBasedScheduledTransaction.lbstEndDate} >= {AccountsReceivableSetting.arsDailyCtlDate})

The problem is we are not getting records that are NULL for the {LeaseBasedScheduledTransaction.lbstEndDate}. Chris
DFW Crystal User Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top