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?
Printable View
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?
Anyone know how to create an unbound data report?
Maybe I should give up on Report Designer in vb6 and go Crystal?
Hi JamesM,
In VB6, how can I use Crystal Reports. Is that a separate software (Crystal) or does it comes with VB6?
Cheers,
Parasuraman
Parasu Raman
I think Crystal ships with Visual Studio, but you can also buy it stand alone.
Regards
James
James,
Im afraid I can't find Crystal with Visual Studio. Anyways, thankx
Parasuraman
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...
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
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..
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
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...
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
Sorry but no..
I think to create reports without designer is too much work.. I will never do that..
But, You know....
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
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.
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
Ohhh...
Crystal Reports really on CD.
You can find on Visual Studio Disc3 !!!!
Thnks.. Im looking for it for a long time.....
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???
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)
You just instantiate this object and keep calling it's AddRecord method to keep adding records to the recordset.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
Now to print the report use the following code:
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.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
I hope this helps.