Results 1 to 10 of 10

Thread: Ttx

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Ttx

    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
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    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.

  3. #3
    Lively Member adBSTRD's Avatar
    Join Date
    Oct 2003
    Posts
    116
    TTX files are very useful when working with programmatic recordsets.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157
    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
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  5. #5
    Lively Member adBSTRD's Avatar
    Join Date
    Oct 2003
    Posts
    116
    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.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157
    Thank You for your consistence on this thread.

    Yes, please let me see a working sample with code.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  7. #7
    Lively Member adBSTRD's Avatar
    Join Date
    Oct 2003
    Posts
    116
    ok ill post it on monday unless somebody else does it first.

  8. #8
    Lively Member adBSTRD's Avatar
    Join Date
    Oct 2003
    Posts
    116
    Here you go. Sorry for the delay. This has a very basic example of using a programmatic recordset.
    Attached Files Attached Files

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157
    Thank You for your reply.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  10. #10
    New Member
    Join Date
    Oct 2005
    Posts
    15

    Re: Ttx

    Thanks a lot.....

    I really needed something like this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width