Crystal Reports Recordselection formula not working while exportin

Discussion in 'ASP .Net' started by =?Utf-8?B?U3Jpaml0aCBBdWd1c3RpbmU=?=, Jan 5, 2005.

  1. Hi,

    Record selection Formaula is not working while exporting the report to Excel
    There is absolutely no problem while using a crystal report viewer but if i
    export it to a excel the selection formula dosen't seems to have any effect .
    For the Report I am using a Stored procedure . Selection Formula is working
    Fine
    wile I am using a Crystal report viewer .


    rpt1.SetParameterValue(0, line.Value)
    rpt1.SetParameterValue(1, agents.Value)

    Dim name, cntype As String
    name = "IR-" & agents.Value & "-" & strblno & ".xls"
    cntype = "Application/x-msexcel"
    Dim str As Stream

    Dim rExpOpts As New ExportOptions
    rExpOpts.ExportFormatType = ExportFormatType.Excel
    rExpOpts.FormatOptions = New ExcelFormatOptions

    If strquery <> "" Then
    rpt1.RecordSelectionFormula = strquery
    End If

    Dim rExpReqContext As New ExportRequestContext


    rExpReqContext.ExportInfo = rExpOpts
    str = rpt1.FormatEngine.ExportToStream(rExpReqContext)
    Dim bArray As Byte()
    ReDim bArray(str.Length)
    str.Read(bArray, 0, str.Length)
    Response.ClearContent()
    Response.ClearHeaders()
    Response.Expires = -1
    Response.AppendHeader("content-disposition", "attachment;
    filename=" + name)
    Response.AppendHeader("Cache-Control", "no-cache")
    Response.AppendHeader("Pragma", "no-cache")
    Response.ContentType = cntype
    Response.BinaryWrite(bArray)
    Response.Flush()
    Response.Close()
    sri_007
     
    =?Utf-8?B?U3Jpaml0aCBBdWd1c3RpbmU=?=, Jan 5, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michelle Stone

    Formula fields in Crystal Reports

    Michelle Stone, Jan 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    36,030
    JohnPantoo
    Sep 19, 2011
  2. Peri
    Replies:
    1
    Views:
    3,074
    =?Utf-8?B?Um90aGFyaWdlcg==?=
    Jul 21, 2005
  3. Replies:
    2
    Views:
    941
  4. Rod
    Replies:
    2
    Views:
    1,843
  5. Replies:
    0
    Views:
    547
Loading...

Share This Page