User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Aug 2006
Posts: 5
Reputation: jaay is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jaay jaay is offline Offline
Newbie Poster

crystal report related.........simple one......Please take 2 min to read this...

  #1  
Aug 26th, 2006
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2006
Posts: 4
Reputation: sarathcbit is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sarathcbit sarathcbit is offline Offline
Newbie Poster

Hi

  #2  
Sep 10th, 2006
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 6:04 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC