Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Problems Connecting to Crystal Reports table

Reply
Thread Tools

Problems Connecting to Crystal Reports table

 
 
James_Dean James_Dean is offline
Junior Member
Join Date: Jun 2007
Posts: 7
 
      08-23-2007
Below is the my code so far. I have one table with 7 fields in my report
and i want to clear these fields and then save the report as a different
name and then print. The saving and printing part seem fine but i cannot
seem to access the connection properties at all. I have the
ConnectionProperties lines commented out because they give an error and
there is no password or user name so thats not the problem it just gives an
error saying connection properties was not recognized function name which it
should be??. Also finally how can i change these field names inside the
"tbl" table below.


import sys
from win32com.client import Dispatch

server="C:\\xxxxxx" #only an example

app = Dispatch('CrystalRunTime.Application')
rep = app.OpenReport('C:\\testers.rpt')
rep.ReadRecords()
tbl = rep.Database.Tables.Item(1)
#prop = tbl.ConnectionProperties('Data Source')
#prop.Value = 'server'

rep.ExportOptions.FormatType = 1
rep.ExportOptions.DestinationType = 1
rep.ExportOptions.DiskFileName = "C:\\Testerss.rpt"
rep.Export(False)
rep.PrintOut(promptUser=False)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems using ASP and Crystal Reports 8.5 to create dynamic PDF reports PughDR@gmail.com ASP General 0 10-23-2006 02:50 PM
Is it possible to get Crystal Reports to print multiple reports in ASP.NET? Rod ASP .Net 2 05-25-2006 02:12 PM
How to launch reports (done with Crystal Reports) from a Java application? minjie@excite.com Java 2 03-15-2006 08:40 PM
First time crystal report user - How do i create a crystal reports from asp.net web form? Learner ASP .Net 1 01-11-2006 08:20 PM
Calling Crystal Reports in ASP.NET using the rptserver.asp given by Crystal Reports Peri ASP .Net 1 07-21-2005 12:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57