Results 1 to 13 of 13

Thread: How to get an Excel looking daily schedule to print from VB6

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    16

    How to get an Excel looking daily schedule to print from VB6

    I'm new to this board, but not programming. I've been working on quoting a job for a couple of days. It's kind of like a turin test. It's easy for a 5 year old to do (granted, laborious), but difficult for a computer to do.

    Not impossible, just a lot of variables and special conditions. I've figured most everything out, but the end result is a printout of the next day's class schedules. Preferrably a new page per class.

    Now I'm self taught, and have been programming since B.A.S.I.C. on the TRS-80, so this could be something I missed in VB 101.

    I need to create something like this, that fits on paper to be printed (or prints automatically without screen view)..

    Class #: xxxx
    Class Name: My Class
    --------------------------------------------------------------
    Student Name | (blank for sign in) | time in | etc.
    --------------------------------------------------------------
    Student Name | (blank for sign in) | time in | etc.
    --------------------------------------------------------------
    ad infinitum... (or to bottom of page, then gen new page with header, continuing where left off...)

    The customer I'm quoting, is tired of writing in the student names by hand. I've figured how to compute who's in what class, when, but I've never had to print something out 'pretty' before.

    Any help would be appreciated..

    A URL, an object name, a smack upside the head. <g> I hate feeling stupid. I have no problems figuring out logic/syntax for problems, but have never walked this particular road before. <sigh>

    Thanks for any help...

    Chris "Blue Dragon"

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    16
    I thought it might be something to do with Crystal Reports, but I've never used it. <sigh>

    I do have one question... When I compile, does the CR portion go with the program? No problem with licensing?

    Thanks..

    If anyone else has more info, please I can use *all* the help I can get. Even pointing out a CR tutorial online...

    Chris - Blue Dragon

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    You could use Crystal Reports, or just about any other reporting tool (capabilities & price vary)..... to do this.

    When you compile, all that's stored in the EXE is a reference .... which means you would need to include the additional files needed for a CR report to run properly.
    the Package and Deployment Wizard (PDW) that comes w/ VB should be able to pick it up properly, but it isn't perfect. I don't know about INNO (it's the other preferred setup app by folks here) since I've never used it, but from what I have heard, it's better than PDW.

    If you have Excell, you could build it using that.... You might even see about using the Access reporting ..... jsut a thought...

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    16
    Thanks... I don't believe the customer has Office, or I would do the whole thing in Access. <sigh> It's got to be a compiled, stand-alone VB app. (have I sighed yet? <g>)

    Chris - Blue Dragon

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    If the report isn't too fancy, you could also just use the Printer object in VB to send text and graphic lines to the printer.
    It takes some doing, but it's possible.

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854
    You need to use crystal reports. It is the best report expert I have ever used. If you want you can try to use VB6's report wizard. Go under project and clikc add report wizard...
    From there you are on your own. I have never used the wizard. But Crystal Reports works wonders.

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by cid
    You need to use crystal reports. It is the best report expert I have ever used. If you want you can try to use VB6's report wizard. Go under project and clikc add report wizard...
    From there you are on your own. I have never used the wizard. But Crystal Reports works wonders.
    you don't need to use anything.
    I agree that CR is wonderfull.... but for such a simple appl;ication, it maynot be worth the cahs needed to get a developer's copy.....

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    16
    Techgnome, I take it the version that shipped with my vb6 then will not work for what I need?

    Do you have or know of any resources for the printer object? An indepth look, reference or tutorial?

    Thanks,

    Chris - Blue Dragon

  9. #9
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854
    You can get a free 30 day trial of Crystal Reports 9 on the website. But you can always use the built in report expert.

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  10. #10
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    Or you could easily create your report in HTML as they are certain to have a browser installed aren't they?

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    16
    MartinSmith...

    Funny, most of the programming I do is ASP and ColdFusion for web. I *never* thought of doing it in HTML.

    The only problem I see is that when I create the report in HTML, how do I format it for the printer? I know I can format it for the screen, but page breaks, etc?

    Thanks for all your help - everyone...

    Chris - Blue Dragon

  12. #12
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    I'm not sure that you can specify page breaks (apart from of course by splitting the report into multiple documents) and you would be delegating quite a lot of responsibility for rendering to the browser so maybe this wouldn't be such a suitable approach if you need a fine level of control over how it looks/prints.

    The advantages though over a 3rd party tool would of course be that it is a non proprietary format and free!

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    16
    Thanks for everyone's help.. I've been playing with the 'Data Report Designer'. It seems to be *exactly* what I need. Now I need to find a way to feed it the info I need it to print 'on-the-fly' rather then drag/drop from a query or table.

    But that's the fun part.. The digging into the code and making it work.

    Again, thanks for EVERYONE's input.

    Chris - Blue Dragon

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