Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Server Not Open
Message
From
22/08/2008 17:39:59
 
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
Miscellaneous
Thread ID:
01341241
Message ID:
01341259
Views:
16
Ignore the error. In the Error method of the form:
IF nError != 1440
   DODEFAULT()
ENDIF
>Hi, This is my case
>
>I have a crystal report 8.0 file, when I run it from Crystal not a problem since crystal asks me for user and password to connect to a MSSQL 2000 server, acctually it is conected using an ODBC
>
>now I built a form and dropped a crystal viewer, want to run the report, but it keeps on saying the server is not open.
>I know it is because the password for the odbc is not store, I have to give it to crystal somehow, the question is how do I do this??
>
>this is my code
>
>
>*** Assign the ReportName
> tcReport = "oeinvsum.rpt"
>	LOCAL oConn
>	LOCAL oCR AS CRAXDRT.Application
>    LOCAL oRpt AS CRAXDRT.Report
>    LOCAL ocParm AS CRAXDRT.ParameterFieldDefinitions
>    LOCAL oParm AS CRAXDRT.ParameterFieldDefinition
>    WITH This
>      .WindowState = 2
>      oCR  = CREATEOBJECT("CrystalRuntime.Application")
>      oRpt = oCR.OpenReport(tcReport)
>      * Get the Special Message Parameter
>      ocParm = oRpt.ParameterFields()
>      oParm = ocParm.Item(1)
>      oParm.SetCurrentValue('SAP')
>      oParm = ocParm.Item(2)
>      oParm.SetCurrentValue('SAP')
>      WITH thisform.oleCRViewer
>        .EnableExportButton = .T.
>        .EnableProgressControl = .T.
>        .ReportSource = oRpt
>        .EnableAnimationCtrl = .F.
>        .ViewReport()
>      ENDWITH
>      .Visible = .T.
>    ENDWITH
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform