Advertisement

08.28.2008 at 05:48AM PDT, ID: 23685192 | Points: 250
[x]
Attachment Details

Crystel Report with subreport using vb6

Asked by ISKPatel in Visual Basic Programming

I am using Cryatel Report 8.5 wiht a subreport in VB 6 , Both Report & Subreport use same stored procedure with paremeters.
I face problem to pass subreport's paremeters through VB6
i am using the fillowing code for call report
-----------------------
     CR_RedoRepCall.Connect = CN
     CR_RedoRepCall.ReportFileName = App.Path & "\Reports\RED_Aging_Flag_Summary_new.rpt"
     CR_RedoRepCall.ReplaceSelectionFormula ("")
     
   
        If txtCustName <> "" Then
        sSql = "select dbo.Cust_Name(null," & "'" & txtCustName & "')"
        rs.Open sSql, CN
        custname = rs.Fields(0)
       
       CR_RedoRepCall.Formulas(0) = "CustName = '" & custname & "'"
    Else
         CR_RedoRepCall.Formulas(0) = "CustName = '" & "" & "'"
    End If
   
    If txtParentID <> "" Then
        sSql = "select dbo.Cust_Name(null," & "'" & txtParentID & "')"
        rs2.Open sSql, CN
        custname = rs2.Fields(0)
        CR_RedoRepCall.Formulas(1) = "ParentName = '" & custname & "'"
        rs2.Close
    Else
        CR_RedoRepCall.Formulas(1) = "ParentName = '" & "" & "' "
    End If
     CR_RedoRepCall.Formulas(2) = "REDO_Reason = '" & ParentName & "' "
      CR_RedoRepCall.Formulas(3) = "Sub_Reason  = '" & SubCategoryName & "' "
 
    CR_RedoRepCall.ParameterFields(1) = "@VehCat;" & catg & ";True"
    CR_RedoRepCall.ParameterFields(2) = "@CustId;" & txtCustName & ";True"
    CR_RedoRepCall.ParameterFields(3) = "@Prod;" & Prod & ";True"
    CR_RedoRepCall.ParameterFields(4) = "@CustType;" & Cust & ";True"
    CR_RedoRepCall.ParameterFields(5) = "@ParentCustId;" & txtParentID & ";True"
    CR_RedoRepCall.ParameterFields(6) = "@RedoBranch;" & Branch & ";True"
    CR_RedoRepCall.ParameterFields(7) = "@RedoBranchName;" & BranchNmae & ";True"
    CR_RedoRepCall.ParameterFields(8) = "@ProdName;" & ProdName & ";True"
    CR_RedoRepCall.ParameterFields(9) = "@VehCatName;" & CatgName & ";True"
    CR_RedoRepCall.ParameterFields(10) = "@ReasonID;" & Parent & ";True"
    CR_RedoRepCall.ParameterFields(11) = "@ReasonSubID;" & SubCategory & ";True"
    'CR_RedoRepCall.ReportSource
   
    Dim crSec As CRAXDRT.Section
     
    CR_RedoRepCall.Action = 1
-----------------------
Where  CR_RedoRepCall is the Name of CR ActiveX control.
Now, How can i pass the subreport's perametes ?
Start Free Trial
[+][-]08.28.2008 at 07:15PM PDT, ID: 22341635

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 09:40PM PDT, ID: 22342388

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 07:46AM PDT, ID: 22345952

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 11:32PM PDT, ID: 22350880

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628