Results 1 to 19 of 19

Thread: Report Designer

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804

    Question

    Is It possible to create a stand alone report unattached to a data environment?

    I have tried, but the error I get is: Invalid Data Source. But I don't want to link it to a data source, any suggestions?

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804

    Unhappy

    Anyone know how to create an unbound data report?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    Maybe I should give up on Report Designer in vb6 and go Crystal?

  4. #4
    Addicted Member
    Join Date
    Feb 2001
    Location
    Chennai, India
    Posts
    219
    Hi JamesM,
    In VB6, how can I use Crystal Reports. Is that a separate software (Crystal) or does it comes with VB6?
    Cheers,
    Parasuraman
    Om Nama Sivaya!!!

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    Parasu Raman

    I think Crystal ships with Visual Studio, but you can also buy it stand alone.

    Regards

    James

  6. #6
    Addicted Member
    Join Date
    Feb 2001
    Location
    Chennai, India
    Posts
    219
    James,
    Im afraid I can't find Crystal with Visual Studio. Anyways, thankx

    Parasuraman
    Om Nama Sivaya!!!

  7. #7
    Junior Member
    Join Date
    Jan 2001
    Location
    Budapest, Hungary
    Posts
    20
    Crystal report is not an microsoft product. It's not an
    element of VB6.

    You can't create an unbound DataReport.

    Tip.: Bound it to the blank database or table, or any table... You don't have to use its fields...

  8. #8
    Addicted Member
    Join Date
    Feb 2001
    Location
    Chennai, India
    Posts
    219
    zsombor,
    Can i create a report without using the report designer or data environment or crystal report. Creating a report only using code? Is that possible.

    Thanx in advance

    Parasuraman
    Om Nama Sivaya!!!

  9. #9
    Junior Member
    Join Date
    Jan 2001
    Location
    Budapest, Hungary
    Posts
    20
    You can print directly to printer.. But i think is too hard..

    The simplest way is the datareport.. Don't give up!!
    First time when I used the DataReport I got a lot problem too.. BUT NOW IT WORKS WELL..

  10. #10
    Addicted Member
    Join Date
    Feb 2001
    Location
    Chennai, India
    Posts
    219
    zsombor,
    But, I heard that data reports can't handle complexed conditions and other functionalities. Is that true? Is data reports enough for performing all the activities a compled report needs? Pls let me know where i could find all about data reports (other than msdn)

    Cheers,
    Parasuraman
    Om Nama Sivaya!!!

  11. #11
    Junior Member
    Join Date
    Jan 2001
    Location
    Budapest, Hungary
    Posts
    20
    Yes, maybe the DataRep is not the best tool to create reports. But I don't have any other..
    I learned it from MSDN.

    I tried to get a crystalreport, but i couldn't download it.
    I heard its very good. If you find it somewhere pls. reply me. I need it too...

  12. #12
    Addicted Member
    Join Date
    Feb 2001
    Location
    Chennai, India
    Posts
    219
    zsombor,
    Thanx for that. I'll surely let u know when i come across crystal report.
    But, my friend told me that he is using code for generating reports - no de, no data reports etc.
    Any idea about this?

    parasu
    Om Nama Sivaya!!!

  13. #13
    Junior Member
    Join Date
    Jan 2001
    Location
    Budapest, Hungary
    Posts
    20
    Sorry but no..

    I think to create reports without designer is too much work.. I will never do that..

    But, You know....

  14. #14
    Addicted Member
    Join Date
    Feb 2001
    Location
    Chennai, India
    Posts
    219
    I too don't have any idea about that. Anyway, I'll try carrying on with data reports and try to go into it as far as possible.

    And pls check my thread - Invalid data source. See if u can help.
    Cheers and thanx a lot for ur advise

    Parasuraman
    Om Nama Sivaya!!!

  15. #15
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138

    Thumbs up It's there!

    You can find crystal reports on disc 3 of visual studio 6.
    It's in <your drive>:\common\tools\vb\crysrept.

    I'm not sure what version it is but I think it's 4.6.
    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

  16. #16
    Addicted Member
    Join Date
    Feb 2001
    Location
    Chennai, India
    Posts
    219
    Hi Laurens,
    Thanx for that info. I can't find any folder for Crysrept. Anyway, I'll check out with the person who is incharge of the software installation.
    Can u pls tell me that thing u say is the crystal report builder or an object kinda thing??
    And do u have any idea of doing reports using code alone, without data report, crystal, data environment etc.

    Thanx again

    Cheers
    Om Nama Sivaya!!!

  17. #17
    Junior Member
    Join Date
    Jan 2001
    Location
    Budapest, Hungary
    Posts
    20
    Ohhh...

    Crystal Reports really on CD.

    You can find on Visual Studio Disc3 !!!!

    Thnks.. Im looking for it for a long time.....

  18. #18
    New Member
    Join Date
    Feb 2001
    Location
    florence
    Posts
    3
    Can anyone here help me?

    I am using the datareport to print 1000 copies.
    And using the following code:

    for i = 1 to 1000
    datareport1.printreport
    doevents
    unload datareport1
    next i

    I can get 1000 copies of datareport in InkJet printer.
    But It can only print one report in MicroLine 321 printer.
    what's wrong with MicroLine printer???

  19. #19
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    LoCal
    Posts
    280
    James,

    What you may want to try is creating a disconnected recordset and then setting that as the datasource for the datareport.

    What I've done is create a new class to serve as my 'datasource' and created a property of type recordset which is then assigned as the datasource of the datareport.

    CReportDS - class to serve as datasource
    (you'll need to reference ADO)

    Code:
    Option Explicit
    
    Private mrsData as RecordSet
    
    Private Sub Class_Initialize()
        Set mrsData = New RecordSet
        With mrsData
                .Fields.Append "name"
                .Fields.Append "address"
        End with
    End Sub
    
    Public Sub AddRecord(objPerson as Person)
         With objPerson
                 mrsData.AddNew
                 mrsData("name") = objPerson.Name
                 mrsData("address") = objPerson.Address
                 mrsData.Update
          End With
    End Sub
    
    Public Property Get Data() as RecordSet
         Set Data = mrsData
    End Property
    You just instantiate this object and keep calling it's AddRecord method to keep adding records to the recordset.

    Now to print the report use the following code:

    Code:
    Public Sub PrintReport(objDataSource as CReportDS)
         Dim objReport as DataReportYouCreated
         
         'this is where you set the datasource
         objReport.DataSource = objDataSource.Data
    
         objReport.PrintReport
    
         'this is so that you'll loop here until the report is done
         'printing, otherwise you get some memory exception
         'errors
         Do While objReport.AsyncCount
              DoEvents
         Loop
    
         Set objReport = Nothing
    End Sub
    Of course you don't have to use a separate class for this. You could just create the recordset, fill it with data, and then assign it directly to your DataReport from within a single procedure. This just worked out better for the way my project was setup.

    I hope this helps.
    Last edited by Achichincle; Feb 23rd, 2001 at 01:21 PM.
    Achichincle

    VB6 (VSEE SP5, W2KPro)
    ASP
    HTML

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