Results 1 to 17 of 17

Thread: vb6 and crystal report 8.5 msslq 2008 r2

Threaded View

  1. #7

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    10

    Re: vb6 and crystal report 8.5 msslq 2008 r2

    Hi,

    Please see the attached zip file contained .rpt. If I open this file in CR 8.5 and preview its work fine. but in vb its giving error '20599' Cannot open SQL server. If I try for single table in report and call in VB its work fine. The problem is with multiple table used in report.

    Code:
    If Option5.value = True Then
         Rep_form.cr1.Reset
         Rep_form.cr1.LogonInfo(0) = rep_con
         Rep_form.cr1.WindowShowPrintSetupBtn = True
         Rep_form.cr1.WindowShowExportBtn = True
         Rep_form.cr1.WindowShowGroupTree = True
         Rep_form.cr1.WindowShowSearchBtn = True
         Rep_form.cr1.WindowShowRefreshBtn = True
         Rep_form.cr1.WindowShowZoomCtl = True
         Rep_form.cr1.WindowState = crptMaximized
         Rep_form.cr1.DiscardSavedData = True
         Rep_form.cr1.SQLQuery = ""
         
        
       Rep_form.cr1.SQLQuery = " SELECT Mfg_PRICES.PQPRIQUO,    ITEM_ITEMCOST.ITEM,    ITEM_ITEMCOST.ITEM_DESC,    ITEM_ITEMCOST.FMLY_NAME,    ITEM_ITEMCOST.RL_MAT_CST,    ITEM_ITEMCOST.RL_LAB_CST,    ITEM_ITEMCOST.RL_VR_OVHD,    ITEM_ITEMCOST.RL_FX_OVHD,    ITEM_ITEMCOST.PACK_SIZE,    ITEM_ITEMCOST.ITEM_UOM,    ITEM_ITEMCOST.SP_GRVT,    ITEM_ITEMCOST.ITEM_DRWG " & _
                               " From   FSDBMR.dbo.Mfg_PRICES Mfg_PRICES INNER JOIN FSDBMR.dbo.ITEM_ITEMCOST ITEM_ITEMCOST ON   Mfg_PRICES._PRICQUOT_OwnRow = ITEM_ITEMCOST.ITEM_ROW "
        
        
        
        Rep_form.cr1.ReportFileName = MRCREPORT & "ITEM_SALES_PRICES.rpt"
        
        Rep_form.cr1.WindowTitle = "MASTER"
        Rep_form.cr1.ReportTitle = "ITEM SALES PRICES LIST "
        Rep_form.cr1.Action = 1
        Screen.MousePointer = 0
        
    End If
    Attached Files Attached Files
    Last edited by gep13; Feb 11th, 2013 at 02:52 AM. Reason: Added code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width