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

How to Display 2 Table Record Simultaneously in Same Report

Status
Not open for further replies.

Cap2010

Programmer
Mar 29, 2000
196
CA
Crystal Report 4.6
Want to display records from two tables simultaneously.

Fields of Table 1 and Table 2
Table1 Table2
T1fld1 PK T2fld1 PK
T1fld2 T2fld2
T1fld3 T2fld3
T1fld4 T2fld4 FK of Table1 PK

Display of record is as follows
First page record display is from table1 than on NEXT PAGE record from table2 in the same report.

The display is on every equal value from Table1 with Table2
T1Fld1 = T2Fld4

Report Format is the same, certain field value will change
i.e.

T1Fld1 will change on next page to T2fld1
T1fld2 will remain same
T1Fld3 will change to T2fld3

Thanks,

Lad
 
The way you read two tables simultaneously is to link the tables together. This creates one large table made up of the records of one matched to the records of the other based on a matching field. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
HI,

I am linking the table. But the fact is part of the record from table 2 is to be displayed on next page.

The record will move after the second page.

First Page record from 1st Table
Second Page record from 2nd Table.

Format is the same on page 1 and 2.

Thanks,

Lad
 
Sorry, I don't follow you. Once they are linked there is only one record that includes both tables. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
hi,

I do agree with you it is one table.

Question is to display certain field
i.e. T1Fld1, T1Fld2, T1Fld3
on 1st page
and certain fields
i.e. T1Fld1, T2Fld1, T2Fld3
on 2nd page.

Two Pages 1 Record is the Condition way of looking at it.


It's like main form and sub form.

Tried all combination in Crystal Reports 4.6.
It has one option of If else, still the question remains
the same how to make it work.

Thanks,

Lad
 
If you group on something unique you can have one record per group. You can then print the GH on a separate page from the GF, getting two pages per record. Put the fields in the appropriate section. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
hi kanhamady,

1) Thanks, for your suggestion in GH, It works, when, I have
1 record for the GH. Apologize, didn't expect it, there is the 3rd Table, having transaction of table 1; which is displayed in the detail.

2) Want to change the field name in crystal report programmatically. is it possible, need a syntax/eg. to go ahead.

Thanks,

Lad


 
hi,

Want to change the field programmaticaly in crystal report.
How.

i.e. will rerun the report with change field.
need a syntax/sample code

thanks

Lad
 
Create a formula in the report, and then pass the selected field to the formula with the following line of code:

rptMyReport.Formulas(0) = "formula={myfield}" Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top