Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
| Search | Today's Posts | Mark Forums Read
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 20th, 2004, 04:36 AM
Registered User
Join Date: May 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Addling table links from VB


I have a report that I access through RDC

At runtime, I add a temp SQL server view to the report

That works fine

I then try and add a link from the newly added table to an existing table on
report and get the following error

WArning - Fields in the report from the file """ cannot be linked

If I add the view in manaually in Crystal then the view and the table link

This is my VB code

Set mobjApplication = New CRAXDDRT.Application
mobjApplication.LogOnServer "PDSODBC.DLL", "VtsMain", "VtsMain", "sa",
subGroupChooseReport ' open selected report

X.ActiveConnection = "Provider=MSDASQL.1;Persist SecurityInfo=False;User
ID=sa;pwd=xxxx;Data Source=VTSMain"
X.Open ("Select * from tester")
'add view to report
mobjreport.Database.AddADOCommand X.ActiveConnection, X.ActiveCommand

Set tab1 = mobjreport.Database.Tables(1) ' table i want to link to
Set tab2 = mobjreport.Database.Tables(11) ' 11 being the new view added to
Debug.Print mobjreport.Database.Links.Count

'attempt to add link
mobjreport.Database.Links.Add tab2, tab1, 30, 1, crJTEqual,
crLTLookupProduct, False, 1

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table cells as links gjeardle HTML Code Clinic 16 January 24th, 2007 12:08 PM
Table Links samdavis HTML Code Clinic 2 November 30th, 2004 06:38 AM
links in table fields (td) amc Dreamweaver (all versions) 0 August 30th, 2004 09:20 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.