•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 427,111 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,108 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 1950 | Replies: 1
![]() |
•
•
Join Date: Aug 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
I want to incorporate fields from 2 tables in a single crystal report.
I have no problems in incorporating from a single table. But when it comes to >1 table fields in a single report, I am stuck up..
For eg.:
Table 1 :"GENINFO"
----------------------
custno | mail id
-----------------------
Table 2 :"DETAILS"
--------------------------
custno | Listofcompaniesowned
-------------------------------
Now, I would like to write the RECORDSELECTIONFORMULA as part of the code,without using the editor.
I intend the user to choose the customer he wants to see, based on a common customer number that he will provide.
Report.DataDefinition.RecordSelectionFormula = "{GENINFO.custno}=" & i
[i is a variable which takes userinput for customerno.]
Report.DataDefinition.RecordSelectionFormula = "{DETAILS.custno}=" & i
This doesnot work...
The first problem is how to couple these both...I used "And". ...doesn't work..
The second problem is that I want only custno field from GENINFO table to be part of my report.
--------------------------------------------------
CrysReport1.rpt
--------------------------------------------------
custno | GENINFO.CUSTNO
mailid | DETAILS.MAILID
listofcompniesowned | DETAILS.LISTOFCOMPNIESOWNED
--------------------------------------------------
--------------------------------------------------
The custno field of DETAILS table is just meant for selecting the other fields in the table such as "listofcompniesowned" etc...
I noted that this field doesnot appear in the formula editor too...since it is not included in the report...(though I don't use the editor as I told before)
Hence, the record selection formula,viz.
Report.DataDefinition.RecordSelectionFormula = "{DETAILS.custno}=" & i
(after modification will it work ?)
In short,
What is the RecordselectionFormula like for incorporating fields from 2 tables ??
Thanks for the time.
I have no problems in incorporating from a single table. But when it comes to >1 table fields in a single report, I am stuck up..
For eg.:
Table 1 :"GENINFO"
----------------------
custno | mail id
-----------------------
Table 2 :"DETAILS"
--------------------------
custno | Listofcompaniesowned
-------------------------------
Now, I would like to write the RECORDSELECTIONFORMULA as part of the code,without using the editor.
I intend the user to choose the customer he wants to see, based on a common customer number that he will provide.
Report.DataDefinition.RecordSelectionFormula = "{GENINFO.custno}=" & i
[i is a variable which takes userinput for customerno.]
Report.DataDefinition.RecordSelectionFormula = "{DETAILS.custno}=" & i
This doesnot work...
The first problem is how to couple these both...I used "And". ...doesn't work..
The second problem is that I want only custno field from GENINFO table to be part of my report.
--------------------------------------------------
CrysReport1.rpt
--------------------------------------------------
custno | GENINFO.CUSTNO
mailid | DETAILS.MAILID
listofcompniesowned | DETAILS.LISTOFCOMPNIESOWNED
--------------------------------------------------
--------------------------------------------------
The custno field of DETAILS table is just meant for selecting the other fields in the table such as "listofcompniesowned" etc...
I noted that this field doesnot appear in the formula editor too...since it is not included in the report...(though I don't use the editor as I told before)
Hence, the record selection formula,viz.
Report.DataDefinition.RecordSelectionFormula = "{DETAILS.custno}=" & i
(after modification will it work ?)
In short,
What is the RecordselectionFormula like for incorporating fields from 2 tables ??
Thanks for the time.
•
•
Join Date: Sep 2006
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
DO it the same way as u do it for the single one
but select two tables and both of the tables shud have a comon thing
like porduct table has pdate
and scheme table has sdate
so when u select both of these u can see a relation ship shown between the two tables . now u can compare and generate a report
but select two tables and both of the tables shud have a comon thing
like porduct table has pdate
and scheme table has sdate
so when u select both of these u can see a relation ship shown between the two tables . now u can compare and generate a report
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- How add Crystal Report Version 11 in VB6 (Visual Basic 4 / 5 / 6)
- Crystal report in vb.net, printing problems (VB.NET)
- problem connection vb6 & crystal report 11 (Visual Basic 4 / 5 / 6)
- Crystal Report 11 and Visual Basic 6.0 sql query.... (Visual Basic 4 / 5 / 6)
- display data in crystal report using vb (Visual Basic 4 / 5 / 6)
- How to set database location via code in Crystal Report XI....? (Visual Basic 4 / 5 / 6)
- Issue about passing parameter to Crystal Report 11.. (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: creating an assembly
- Next Thread: Inserting a new Access Database Record


Linear Mode