Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding multiple TTX files to Crystal Reports

Status
Not open for further replies.

VBGuy

Programmer
May 23, 2000
3
US
I have Crystal Reports version 7 and I can't get the data to show up using multiple ttx files in VB 6. If I use one its fine - anybody know if there is special code to write to see all the data from these 3 files. This is an example of one recordset populating one ttx file - the rest are about the same. Any help is much appreciated.<br><br>&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;Dim rsDateDiff3 As Recordset<br>&nbsp;&nbsp;&nbsp;Set rsDateDiff3 = New Recordset<br>&nbsp;&nbsp;&nbsp;Set rsDateDiff3 = DataEnvironment1.Connection1.Execute _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&quot;SELECT DateDiff3, COUNT(DateDiff3) AS Frequency &quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;From tblComm_DptyOrders &quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;WHERE (HearingDate &gt;= CONVERT(DATETIME, '&quot; & Me.txtStart_Date.Text & &quot;', 102)) &quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;AND (HearingDate &lt;= CONVERT(DATETIME, '&quot; & Me.txtEnd_Date.Text & &quot;', 102)) &quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;GROUP BY DateDiff3 &quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ORDER BY DateDiff3, COUNT(DateDiff3) &quot;)<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;If rsDateDiff3.EOF Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;no data&quot;<br>&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;If CreateFieldDefFile(rsDateDiff3, App.Path & &quot;\crDateDiff3.ttx&quot;, True) &lt;&gt; 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;Field definition successfully created&quot;<br>&nbsp;&nbsp;&nbsp;Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'MsgBox &quot;Failed to create field definition file&quot;<br>&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;Set CrystalDatabase = crTimeStudyAnalysis.Database<br>&nbsp;&nbsp;&nbsp;Set CrystalTables = CrystalDatabase.Tables<br>&nbsp;&nbsp;&nbsp;Set CrystalTable = CrystalTables.Item(1)<br>&nbsp;&nbsp;&nbsp;Call CrystalTable.SetPrivateData(3, rsDateDiff3)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top