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!

Using the RDC PrintOut Function Results in Visual Basic 6.0 Error

Status
Not open for further replies.

Afirth

Programmer
Feb 15, 2001
4
US
Crystal Report Version 8.0
Visual Basic Version 6.0

I developed a report in Crystal reports and then imported the report into Crystal Reports RDC. The Report worked before the conversion but when i go to print the reprot from the visual basic application the report or visual basic then chokes giving me this error message.

Runtime error -2147191862 (800473ca)
The ) is Missing. any help would be appreciated
 
The name of the imported report is LabReport.DSR. The report has 3 parameters for sql Selection
1) LotNumber
2) StackNumber
3) Testtype

I set the three parameters as follows

'Raw test report
Dim crstRepor As New LabReport
Dim parmDefs As CRAXDDT.ParameterFieldDefinitions
Dim parmDef As CRAXDDT.ParameterFieldDefinition
Set parmDefs = crstRepor.ParameterFields

For Each parmDef In parmDefs
With parmDef
Select Case .ParameterFieldName

Case "LotNumber"
.AddCurrentValue Val(plc0.Text)

Case "Test Type"
.AddCurrentValue LTestType

Case "StackNumber"
.AddCurrentValue Trim(txtstackNumber.Text)

Case "filename"
Dim s As String
s = StoragePrint(MTdeviation)
'.AddCurrentValue s
.SetCurrentValue StoragePrint(MTdeviation)
end select

crstRepor.PrintOut True
 
I think it might be the syntax of the parameter field assignment. Can you get the report to work without the parameter field logic? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Afirth: Like Ken I think it is your parameter - what happens if you use SetCurrentValue s rather than SetCurrentValue StoragePrint(MTdeviation)? What do you get if you display StoragePrint(MTdeviation) and is it what you wnat passed? David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
The StoragePrint(MTDeviation)

is a method that takes a reference of a MSchart Control and creates a bitmap which is saved to a file. The filename consist of the Lotnumber, Stacknumber, Testtype
i.e.
LOT# = 8192
Stack# = 15-28
Testtype = 1
bmp filename = 819215-281.bmp

then the bmp is then imported into the crstal report for show. The Original reprot labReport.RPT worked but didn't allow me to recreate the Chart shown in the application. Using the RDC component in Visual basic allows me to import the bitmap into it. But everytime i go to print without previewing i get a Error Message -2147191862 The ) is Missing. The Error only occurs when i use the Report.PrintOut true. I Browsed the object at run time and all the parameters are set but when the printOut method is stepped over the program chokes. Should i try previewing the report rather than printing it?
 
Is there another way to set the Parameter values. I get the same error messsage when i went to view the report using the crviewer control. the Report pulls form 7 different tables. The report worked great in CRystal Reports .RPT format calling from the a Acvtive x control by setting the connect propery with the Provider String. I was hoping to get it into the RDC. Unles anyone can think of a way to dynamially change an OLE link to a givin bmp based upon criteria in the report during runtime. any help is much appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top