Results 1 to 5 of 5

Thread: [RESOLVED] ActiveReports Question - passing data to an unbound report, in a variable, from VB6

  1. #1

    Thread Starter
    Member AndreiMhz's Avatar
    Join Date
    Dec 2010
    Location
    Romania
    Posts
    53

    Resolved [RESOLVED] ActiveReports Question - passing data to an unbound report, in a variable, from VB6

    Hello, again.

    So, i got started with ActiveReports.
    Basic theory of operations seems to be clear... There's only one thing i could not figure out:
    - how do i pass data from VB6 directly to the report, without binding it to a database?
    All database handling is done by the app i work on.

    My app itself does the reports / documents and all data is stored in a UDT with a header, a footer and details.
    Details usually consist of a couple of lines (grouped in an array).

    Private type InvoiceStruct
    Header as string
    Lines() as string
    Footer as string
    end type

    How can i pass a data type (whatever type) to an unbound report, for it to print?
    Do i really have to export to a XML / MDB and bind the report to that, separately ?
    If this post solved your problem, please mark your thread as [SOLVED] and rate the post. It's a good way to show appreciation.

  2. #2

    Thread Starter
    Member AndreiMhz's Avatar
    Join Date
    Dec 2010
    Location
    Romania
    Posts
    53

    Re: ActiveReports Question - passing data to an unbound report, in a variable, from V

    Nevermind, i after some googling i found my answer.

    To all those wondering, one can create a public UDT in a module, make it public, then use the callback FetchData to populate the report.
    If this post solved your problem, please mark your thread as [SOLVED] and rate the post. It's a good way to show appreciation.

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    13,623

    Re: [RESOLVED] ActiveReports Question - passing data to an unbound report, in a varia

    Pretty sure you can create an ADO recordest in memory and pass that to the report as well.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,501

    Re: [RESOLVED] ActiveReports Question - passing data to an unbound report, in a varia

    You can also create a custom data source object Class and use that. But if somebody is fumbling with arrays of UDTs (QBasic coding) we're already far over his head.

    I'd trash the UDT array entirely and just use a fabricated Recordset from the beginning.

  5. #5
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,094

    Re: [RESOLVED] ActiveReports Question - passing data to an unbound report, in a varia

    Array of UDTs is not QBasic but more like C/C++ coding being the basis of ADTs in computer science.

    It is more performant compared to Recordsets (or Collections) and the comparison between them is very similar to early-bound calls vs late-bound calls.

    cheers,
    </wqw>

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