CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Can I create a report without having any database... Pls don't rate it negative.. :-)

    Can it be a report without having a database?
    I mean: can I design a report which will print not fields from database, but fields from my form?



    Michael Vlastos
    Automation Engineer
    Company Modus SA
    Development Department
    Athens, Greece

  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Can I create a report without having any database... Pls don't rate it negative.. :-)

    Yes, you can!
    You can even use data-binding!
    That's because with ADO you can create recordsets on the fly, i.e. recordsets that have NO CONNECTION to a database.



  3. #3
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Dont you think you might tell me how to?

    waiting your post with details on how to print text boxes (values from) of a form to a data report!

    Michael Vlastos
    Automation Engineer
    Company Modus SA
    Development Department
    Athens, Greece

  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: Dont you think you might tell me how to?

    here is an excerpt of code and documentation from one of my projects:
    add a DataReport to your project.
    name it "dr"
    right click on the Data report design window and "insert control/textBox"
    set the DataField property to "Subject"
    repeat this process for all your fields.

    add the following code:

    myrs.Fields("Body") = "Body"
    set dr.DataSource = myrs
    dr.Show



    That's it.
    well, kind of. You still need to create the recordset in your vb program. This looks similar to the following pcode
    dim rs as new adodb.recordset
    rs.fields.append fieldname, fieldtype
    rs.fields.append fieldname, fieldtype
    ...
    rs.open
    rs.addnew
    ...
    and so on.

    Some assembly required. Should help you getting started...


  5. #5
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Thanx Lothar...

    one more time. Well I'll try it tomorrow (must go to dentist now). Thanx a lot, I think it will work (spent some time on it). I'll try and let you know if I need any further help. Thank you!!!

    Michael Vlastos
    Automation Engineer
    Company Modus SA
    Development Department
    Athens, Greece

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

Featured