CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Location
    Portugal
    Posts
    103

    pass filter to cristal report

    hi,

    I'm using Borland's C++ Builder and InfoPower Components,
    i need to passa the result of an execution of a filter dialog to a Cristal report,

    better, i want to print, the dataset of a grid, based on a filter,
    the fields displayed are the same ... just the filter change

    how can i do this, at run time ??

    thank's in advance

    need awnser as fast as you can, urgent!!!

  2. #2
    Join Date
    Apr 2004
    Posts
    10
    Hi ,
    I am trying for VB you try it out to ur code.

    Use

    CrystalReportViewerSL.SelectionFormula = Your Filter condition
    Before preview the report.


    eg.

    Dim StrStoreValue As String

    StrStoreValue = "STORE1"

    CrystalReportViewerSL.SelectionFormula = = "{STOCK_LEDGER.STORE_CODE} = '" & StrStoreValue & "'"

    It woll give the filtered output.

    Thanks
    Vilas

  3. #3
    Join Date
    Oct 2002
    Location
    Portugal
    Posts
    103
    i solve it other way

    i can convert the result of the query in a string tha i just

    (the string needs to be in crystal syntax ... )

    Code:
     
    CrpeReports->Selection->Formula->Clear();
    CrpeReports->Selection->Formula->SetText(filtro.c_str());
    as it is the only formula i need ... it works well ...

    but thanks anyway

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

Featured