|
-
Feb 11th, 2001, 07:36 PM
#1
Thread Starter
Fanatic Member
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?
-
Feb 11th, 2001, 11:27 PM
#2
Thread Starter
Fanatic Member
Anyone know how to create an unbound data report?
-
Feb 12th, 2001, 02:58 AM
#3
Thread Starter
Fanatic Member
Maybe I should give up on Report Designer in vb6 and go Crystal?
-
Feb 12th, 2001, 03:16 AM
#4
Addicted Member
Hi JamesM,
In VB6, how can I use Crystal Reports. Is that a separate software (Crystal) or does it comes with VB6?
Cheers,
Parasuraman
-
Feb 12th, 2001, 03:22 AM
#5
Thread Starter
Fanatic Member
Parasu Raman
I think Crystal ships with Visual Studio, but you can also buy it stand alone.
Regards
James
-
Feb 12th, 2001, 03:31 AM
#6
Addicted Member
James,
Im afraid I can't find Crystal with Visual Studio. Anyways, thankx
Parasuraman
-
Feb 12th, 2001, 04:33 AM
#7
Junior Member
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...
-
Feb 12th, 2001, 04:35 AM
#8
Addicted Member
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
-
Feb 12th, 2001, 04:46 AM
#9
Junior Member
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..
-
Feb 12th, 2001, 04:52 AM
#10
Addicted Member
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
-
Feb 12th, 2001, 05:07 AM
#11
Junior Member
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...
-
Feb 12th, 2001, 05:13 AM
#12
Addicted Member
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
-
Feb 12th, 2001, 05:21 AM
#13
Junior Member
Sorry but no..
I think to create reports without designer is too much work.. I will never do that..
But, You know....
-
Feb 12th, 2001, 05:25 AM
#14
Addicted Member
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
-
Feb 12th, 2001, 06:14 AM
#15
Addicted Member
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
-
Feb 12th, 2001, 06:21 AM
#16
Addicted Member
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
-
Feb 12th, 2001, 08:38 AM
#17
Junior Member
Ohhh...
Crystal Reports really on CD.
You can find on Visual Studio Disc3 !!!!
Thnks.. Im looking for it for a long time.....
-
Feb 23rd, 2001, 11:12 AM
#18
New Member
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???
-
Feb 23rd, 2001, 11:46 AM
#19
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|