Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6.0 SP4, CR 8.0 no output

Status
Not open for further replies.

PatAnn

Programmer
Jul 14, 2000
11
US
I am trying to print a picking ticket from data entered by an order taker. The data is stored in a database table using Access 2000, ADO, and VB 6.0 SP 4. I am able to view the data with Access and it looks correct. The table only contains the information for the order for which I wish to print a picking ticket.

The VB code to print the report is as follows:
strOrdNo = CStr(lngOrdNo)
strRecSelect = "{PikTik.PTOrderNo}= " & lngOrdNo & ""
PickTicket.DataFiles(0) = App.Path & "SalesInvent.mdb"
PickTicket.SelectionFormula = ""
PickTicket.SelectionFormula = strRecSelect
PickTicket.Action = 1

I have tried both Action = 1 and PrintReport. PrintReport does nothing - output either preview or print. Action =1 yields runtime error 20500; not enough memory for operation.

The report was created in CR8 with data bound to the Access table and the preview looks correct. Therefore I assume that I am missing something on the VB side to activate the report correctly.

Any help is greatly appreciated.
[sig][/sig]
 
strOrdNo = CStr(lngOrdNo)
strRecSelect = "{PikTik.PTOrderNo}= " & lngOrdNo & ""

Shouldn't the second line use the strOrdNo instead of the lngOrdNo?

Does it work if you comment out the line:

PickTicket.SelectionFormula = strRecSelect

That tells you that the formula is bad [sig]<p>Ken Hamady- href= Reports Training by Ken Hamady</a><br>[/sig]
 
Thanks for the suggestions.

I commented the line defining the string selection and the same problems occurred, but I believe you are correct about the selection formula causing the problem. I will attack it that way today.

Again, thanks for pointing me in the right direction. [sig][/sig]
 
After working with the selection formula for several hours and using the Seagate utility to insure the both Crystal Reports and Access were using the same System.mdw file, I am getting the same results.

Further info: the order number field in the Access table is defined as a long integer.

I would appreciate any further suggestions anyone might have. I'm stumped.

Thanks in advance. [sig][/sig]
 
PatAnn,

If the formula was the problem, then when you comment out the line that says:

PickTicket.SelectionFormula = strRecSelect

The report should revert to the formula from the saved report, which should work fine. If this doesn't work, then there must be another problem.

To confirm, can you replace the variable 'strRecSelect' with a literal formula, copied from the report design environment (record selection formula) and see if that gives you an error. If you get the same error using a formula that works in the design environment, then this isnt' the problem. Someone else may have an idea. [sig]<p>Ken Hamady- href= Reports Training by Ken Hamady</a><br>[/sig]
 
My company just upgraded to CR8. We are developing and in-house software package that, at the moment, contains over 70 forms. We were having problems with CR when we would add the designer to the project--it would take up all system resources and leave our machines at something like 2% or something. We contacted Seagate and the tech guy sent me a patch in email that I hadnt seen before. We had tried all the patches on their site and none worked. The file he sent me was a zip file with 2 dlls and a readme file. We had to manually rename the old files of the same names and then copy over the new dlls. My thought is that they haven't finished the patch or that not many people are having the problem so they arent releasing the patch on their site.

If it isnt a code problem you are having, run your report and then check your system resources...if they are low call the techs up and get the patch I have described.

I hope this post will help some people...
 
Thanks for all the help. You can color me inept and inexperienced in Crystal Reports.

I had neglected to add a data environment and crystal report to my application. A reference to Crystal Reports on the form and the report with code on a command button on the form was what I had done.

I am now intimately familiar with the Seagate website.

Sorry for any inconvenience and thanks again. I will not forget my goof. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top