<div>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.
</div>
<div> </div>
<div>
<p>import sys<br>from win32com.client import Dispatch</p>
<p>server="C:\\xxxxxx" #only an example</p>
<p>app = Dispatch('CrystalRunTime.Application')<br>rep = app.OpenReport('C:\\testers.rpt')<br>rep.ReadRecords()<br>tbl = rep.Database.Tables.Item(1)<br>#prop = tbl.ConnectionProperties('Data Source')
<br>#prop.Value = 'server'</p>
<p>rep.ExportOptions.FormatType = 1 <br>rep.ExportOptions.DestinationType = 1 <br>rep.ExportOptions.DiskFileName = "C:\\Testerss.rpt"<br>rep.Export(False)<br>rep.PrintOut(promptUser=False)</p></div>