Can someone explain to me what is the purpose of a TTX file in Crystal Report? What advantage it offers and an example of real scenarios to use it?
Thanks
Printable View
Can someone explain to me what is the purpose of a TTX file in Crystal Report? What advantage it offers and an example of real scenarios to use it?
Thanks
Reports are typically created by logging into a database server and selecting fields from its tables.
A TTX file allows you to create a report without the need for a database at design time. Basically, it contains the field definitions that will be used by your report. The file specifies the field names, datatypes and sizes. This allows you to create the formulas, groupings, sorting as per usual. However, you cannot preview your report from within the Crystal IDE.
At runtime your VB application will create an ADO Recordset (for example) and then tell the report to use the recordset as its data source. The recordset layout must match the definitions in your TTX file.
TTX files are very useful when working with programmatic recordsets.
Thank You for your support.
Can I ask another favor? Can you give me step 1 to 10, from starting to end when your manager tells you to start a report with ttx and called it by VB?
I don't need you to provide codes but really like to see how this fit into the cycle of reports. I got a better understanding now but still a little bit unclear.
Thank You
In the apps I develop sometimes we display data from the DB in a listview. The listview has checkboxes that allow you to select which records you want to print. After the user selects them and hits the print button, I have code that creates the programmatic recordset and loops thru the listview adding the checked rows to the recordset as records. This also means that the report itself will not be connected to the database.
When I define the programmatic recordset I give the fields the same name as the ones in the TTX file. Look for info on the subject and let me know if you want to see some code.
Thank You for your consistence on this thread.
Yes, please let me see a working sample with code.
ok ill post it on monday unless somebody else does it first.
Here you go. Sorry for the delay. This has a very basic example of using a programmatic recordset.
Thank You for your reply.
Thanks a lot.....
I really needed something like this.