Defining sort criteria using vb6 and CR XI

using vb6 and cr XI and I am trying to provide the user with the capability of defining sort options using options defined on a VB6 form.  The sample code I've found as described below doesn't seem to allow me to change the sort criteria by field name
'General Declarations
Dim CRXDatabaseField As CRAXDRT.DatabaseFieldDefinition
Private Sub Form_Load()
Set CRXDatabaseField = CRXReport.Database.Tables.Item(1).Fields.Item(8)
CRXReport.RecordSortFields.Item(1).Field = CRXDatabaseField
I would like the user to select an option to sort by say Client and then provide this information to the report like I could with CR 7 as follows
crReport.SortFields(0) = "+{Horse.Location}"
Thanks for any help
Gerry

Hi Gerry,
Have a look to  [Sample codes|https://boc.sdn.sap.com/codesamples] and [Dev Library|https://boc.sdn.sap.com/developer/library]
Hope that helps!!
Regards,
Shweta

Similar Messages

  • Defining sort order using parameter fields

    Post Author: vandersee
    CA Forum: General
    I've created a report, the contents of which is sorted depending on a parameter selected (method used is as described in the help topic entitled "Defining sort order using parameter fields".  Is it possible to vary the Sort Direction (ascending/descending) using parameters also, so that if I choose to sort by field A it will be ascending, but descending if I choose to sort by field B?

    Post Author: V361
    CA Forum: General
    You can create a Parameter {?Sort Order}  make it a string, and add items A to Z and Z to A and a formula and sort the group using the formula.
    Group Expert, select the group, select options, check use a formula as group sort order
    if {?Sort Order} = "A to Z" then crAscendingOrder else crDescendingOrder
    And your group will sort based on what is selected in the parameter.

  • Controlling NI2568 Switches using VB6 and DAQmx

    Can the NI-2568 (and similar) switches be controlled using VB6 and DAQmx?
    I got the impression from the "NI-DAQmx C API VIsual Basic 6.0" Help, that by using the "Digital Output API ",  it could be done very similarly to opening/closing a discrete , but no samples were included.
    I just need to close a few relays and don't know if I have to install the "NI-Switch" software or not.
    If it can be done, what would be the channel string to pass to the DAQmxCreateDOChan dll function
    (in place of "Dev<x>/Port<y>/Line<z>").  MAX shows my (simulated-don't have the hardware yet) switch device to be "PXI1Slot3" .
    Thanks,
    Jon 

    Hi Jon,
    You can also use NI-DAQmx Switch functions to control PXI-2568 rather using NI-SWITCH (NI-SWITCH installs ready-made VB examples)
    You can use functions such as
    DAQmxSwitchSetTopologyAndReset, DAQmxSwitchCloseRelays, DAQmxSwitchOpenRelays to control individual relays in PXI-2568. ANSI C Examples for DAQmx switches can be found at C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Switches. This can be used to write VB 6 code. Refer to  using "C Examples to create VB 6.0 Applications" in C:\Program Files\National Instruments\NI-DAQ\Docs\cvb60daqmx.chm for help on converting C examples to VB 6.0.
    Kalyanramu Vemishetty
    Automated Test Systems Engineer
    National Instruments

  • Query on sorting  XML using XSLT and getting the same XML as output !

    Hi,
    Looking for one information regarding sorting XML using XSLT , with the sorted XML as output. For eg. my XML is :
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="sort1.xsl"?>
    <levelone>
         <child ID="1" sort="5">
              <name>Paul</name>
         </child>
         <child ID="2" sort="1">
              <name>Adam</name>
         </child>
         <child ID="3" sort="2">
              <name>Will</name>
         </child>
    </levelone>
    and XSL :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/levelone">
         <xsl:copy>
         <xsl:apply-templates>
              <xsl:sort select="@sort"/>
         </xsl:apply-templates>
              </xsl:copy>
         </xsl:template>
         <xsl:template match="child">
              <xsl:copy-of select="."/>
         </xsl:template>
    </xsl:stylesheet>
    This does the sort based on Name. But I want to get the same xml as output with the name sorted. Eg.
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="sort1.xsl"?>
    <levelone>
         <child ID="2" sort="1">
              <name>Adam</name>
         </child>
         <child ID="1" sort="5">
              <name>Paul</name>
         </child>
         <child ID="3" sort="2">
              <name>Will</name>
         </child>
    </levelone>
    Any pointers will be highly appreciated.
    - Thanks

    Don't you want <xsl:sort select="name"/> rather than <xsl:sort select="@sort"/>?

  • Unable to Meke EXE using VB6 and CW

    I know that I will be a little bit long, but that's the only way to be precise.
    So please, maybe someone out there can help me, since th NI Knowledge Base
    didn't ...
    We use ComponentWorks 2.0.1 and we also got 3.0.1 update.
    My computer runs Windows98SE (German version) on an INTEL Pentium III - 600
    MHz.
    Using Visual Basic 6.0 (SP4) and trying to "Make EXE" the compiler stops
    when displaying "Writing EXE" at about 80% gauge. The error message will
    always be (I try to translate, since I use a German OS):
    "This application was closed due to an critical error". And: "VB6 caused
    an critical error 10H in module CW3DGRPH.OCX at 016f:07c5a14e. ..."
    If I click "Close" the whole VB6 environment will close. If I click "debug"
    C++ comes up and says: "Unhandled exception in VB6.EXE (CW3DGRPH.OCX): 0xC0000090:
    Float Invalid Operation". In the disassembly line stands: "07C5A14E fld
    qword ptr [esi+200h]"
    What did I try to resolve the problem?
    1. I installed a "clean" Windows 98 (First edition!), installed my components
    and VB6. The error did NOT occurre! After installing a newer dated application
    (Outlook Express) the error came. So I guess it will deal with some overwritten
    dll or so.
    2. I installed Win98 SE and the error always occurred.
    For Your information: I named my Windows directory "C:\WIN" and teh System
    directory is "C:\WIN\SYSTEM".
    3. I reinstalled CW2.0.1 and tried using CW3.0.1. No change. I still couldn't
    make the exe file.
    The OCX files seem to be registered properly.
    (BTW: Any other application not using Component Works can be made to EXE
    files.)
    4. In my office others are working on this project too. They use Windows
    95, Win2000 and Win NT4 WITHOUT any trouble. None is using Windows 98SE.
    I am almost changing to Win 2000, but first I don't think it is a secure
    way to handle the problem. Who knows, if it appears some day again when any
    specific dll or so had been changed in the system folder? And second, I might
    need a hardware based OS some day in near future and wish to have Win98 SE
    again on my disk.
    In all above cases the error message was the same.
    Thank You in advance.
    Siegfried Wessler

    To make ur Project an exe file u should have the full version of the cw works installed. As expected of exe files it should run on any machine. so the best way out ( the way i used in my project ) is to go to start -> programs -> measurement studio tools -> package and deployment wizard,click on it. It will ask u to select the project. chose it from ur dir and clik on the PROJECT button.
    the wizard will guide u through the rest of the set up. and it will create u a set up file which u can install like any windows application.
    This method has always worked for me.
    all the best
    partha

  • Simultaneously Connecting Multiple Tables of the same Database to Textboxes of the same Form using a single ADO Control Code using VB6 Enterprise Edition and MS Access 2007

    Iv 10 Tables consisting of atleast 10 fields each in a single Database. Bt, Im only able to connect 1 table at a time to a form using an ADO Control. Im able to add data from table 'student' to text-boxes in my form. Bt, hw can I add data from field(0) of
    Table 'Student' to Textbox1 and data from field(0) of Table 'Marks' to Textbox2 using VB6??
    This is the current sample coding iv got to connect a single table to a form:
    Global con As New ADODB.Connection
    Global rs As New ADODB.Recordset
    Public Function Connect()
    If con.State = 1 Then con.Close
    con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\bca.mdb;Persist Security Info=False"
    End Function
    Private Sub Add_Click()
    If rs.State = 1 Then rs.Close
    rs.Open "select * from student", con, adOpenDynamic, adLockOptimistic
    rs.AddNew
    rs.Fields(0) = (Text1.Text)
    rs.Fields(1) = (Text2.Text)
    rs.Fields(2) = (Text13.Text)
    rs.Fields(3) = (Text4.Text)
    rs.Fields(4) = (Text5.Text)
    rs.Fields(5) = (Text6.Text)
    rs.Fields(6) = (Text7.Text)
    rs.Fields(7) = (Text8.Text)
    rs.Fields(8) = (Text9.Text)
    rs.Fields(9) = (Text10.Text)
    rs.Fields(10) = (Text11.Text)
    rs.Update
    MsgBox " Record Added"
    End Sub
    What can I do to add fields from 2 different tables to different text boxes within the same form using a single ado control using vb6 and MS Access 2007??

    Hi,
    Since VB6 product is not supported in this forum, you may go to these forums for support:
    #Where to post your VB 6 questions
    http://social.msdn.microsoft.com/Forums/en-US/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b/where-to-post-your-vb-6-questions
    Thank you for your understanding.
    Best regards,
    Franklin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HOW TO KNOW SORT KEY USED IN CURRENT HOLIDAY CALENDAR

    Hi Experts,
    Could you please let me know how to know the sort criteria used in current Holiday calendar??
    Any easiest method please let me know.
    I know one way which is going to Public holidays and see where used but if there is any other way please do let me know.
    Regards,
    Vamshi

    Hello,
    Sort Key :Helps to group together all public holidays valid for a country. It is a 3 character key and I recommend its naming convention to be Znn where nn stands for country grouping. Hence, the sort keys for public holidays for Australia, India, New Zealand will be as shown below:
    Australia        -        Z13
    India             -        Z40
    New Zealand  -        Z43
    Read this blog for more info
    http://scn.sap.com/docs/DOC-52366
    Thanks

  • Defining job BBP_LOCATIONS_GET_ALL using SA38

    I have defined a job using SA38  and th eprogram is "BBP_LOCATIONS_GET_ALL". the job status is Released and then changing to Cancelled. It is never taking the status Finished.
    Any help is appriciated.
    Thanks,
    Eswar

    Hi,
       Maintain an entry in <b>SPRO>SRM server>technical basic settings-->Define backend systems</b> for your R/3 system.
    BR,
    Disha.
    Pls reward points for useful answers.

  • Sort Icon/option in ALV tree repot using classes and methods

    Hi all,
    I have done an alv tree report using the class cl_gui_alv_tree
    and i need to let users re-sort the report by using a sort icon(as visible in a normal alv report).Is there any possibility to create an icon and set the functionality such that the entire tree structure gets resorted depending upon the sort criteria?Please give me an example of doing so if there is an option.

    if u want without classes then i can  give an example of Sort Icon/option.
    example:-
    DATA:   wa_sortinfo TYPE slis_sortinfo_alv.
           i_sortcat TYPE slis_t_sortinfo_alv.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program     = report_id
                i_grid_title           = ws_title
               i_callback_top_of_page = 'TOP-OF-PAGE'
                is_layout              = wa_layout
                it_fieldcat            = i_fieldcat[]
                it_sort                = i_sortcat
                i_save                 = 'A'
                it_events              = i_events
           TABLES
                t_outtab               = i_reportdata1
           EXCEPTIONS
                program_error          = 1
                OTHERS                 = 2.
      IF sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      PERFORM sortcat_init CHANGING i_sortcat.
    FORM sortcat_init CHANGING i_sortcat TYPE slis_t_sortinfo_alv.
      CLEAR wa_sortinfo.
      wa_sortinfo-fieldname = 'EBELN'. (sales order)
      wa_sortinfo-tabname = 'I_REPORTDATA1'.
      wa_sortinfo-spos = 1.            " First sort by this field.
      wa_sortinfo-up = 'X'.            "   Ascending
      wa_sortinfo-subtot = 'X'.        " Subtotal at Name1
      APPEND wa_sortinfo TO i_sortcat.
      CLEAR wa_sortinfo.
      wa_sortinfo-fieldname = 'EBELP'.
      wa_sortinfo-tabname = 'I_REPORTDATA1'.
      wa_sortinfo-spos = 2.            " Sec sort by this field.
      wa_sortinfo-up = 'X'.            "   Ascending
      wa_sortinfo-subtot = 'X'.        " Subtotal at Name1
      APPEND wa_sortinfo TO i_sortcat.
    ENDFORM.                    " sortcat_init

  • HT204406 I used Match, and now there are artists missing when I search by artist, yet they are in my library when I search by song. If they are in many song list,  why aren't they in my artist list? Also I can't sort my songs by artist on iPhone,  so thes

    I used Match, and now there are artists missing when I search by artist, yet they are in my library when I search by song. If they are in many song list,  why aren't they in my artist list? Also I can't sort my songs list by artist on iPhone,  so their music is basically lost in space....help

    It's not clear from your post, but you do realise
    that if you import a cd as a compilation, it will not
    appear under artists? This is done to save the iPod
    being cluttered up with single artists entries who
    might have only one song listed.
    I wasn't aware of that. It's true that I haven't been using the "compilation" tag for a long time. I've only started using it with iTunes 7 as otherwise with Coverflow I would have one album cover for each artist in a compilation. Before that my compilations weren't tagged as such as that is quite probably why each artist from compilations showed up when browsing by artists.
    Message was edited by: Didou

  • Using SYSDATE in Pre-Defined View Criteria ADF BC

    I’m trying to setup a View Criteria to find records between two dates. So I create a View Criteria and Select my date field from the table and then choose the “Between” operator and then my operand is a Bind Variable. Then in my Bind variables I have SYSDATE and SYSDATE-7. So in my view.xml I have the following:
    <Variable
    Name="SystemDate"
    Kind="viewcriteria"
    Type="java.sql.Date">
    <TransientExpression><![CDATA[SYSDATE]]></TransientExpression>
    </Variable>
    <Variable
    Name="Bind_SystemDateMinusSeven"
    Kind="viewcriteria"
    Type="java.sql.Date">
    <TransientExpression><![CDATA[SYSDATE-7]]></TransientExpression>
    </Variable>
    However, when I try to run this View Criteria (using on an af:query component), I get the following error.
    Messages for this page are listed below.
    Error     
    Unexpected exception caught: java.lang.reflect.UndeclaredThrowableException, msg=null
    Error     
    Name SYSDATE not found in the given object: ViewRow [oracle.jbo.Key[877 ]
    Does anyone know how to do this using ADF BC and View Criterias? I've tried making my bind variables Strings and this doesn't work either. I basically want a predefined query that finds records within a specific week given the system date. Any ideas on how to make this work? Thanks.

    You can achieve SYSDATE in ADF BC View Criteria using IsSqlFragment="true".
    Below is the VO source code snippet for the same.
    <ViewCriteriaItemValue
                Name="ViewObjCriteria_ViewObjSubCriteria1_vcrow40_HireDate_vcval0"
                Value="sysdate-350" IsSqlFragment="true"/>
              <ViewCriteriaItemValue
                Name="ViewObjCriteria_ViewObjSubCriteria1_vcrow40_HireDate_vcval1"
                Value="sysdate" IsSqlFragment="true"/>
    </ViewCriteriaItem>

  • TUTORIAL: NSDictionary Sorting By Value using NSNumbers and NSStrings

    Even though this may be a basic topic for some, I struggled with it as usual, so here's what I learned.
    Very short, a few screen captures, and a half a page of text total.
    As usual shows the source code, and I included the project.
    This is what I learned today while hanging around the forum.
    Got some great help, and would particularly like to thank RayNewbie for getting me on the right track, and etresoft who tried to help me with the hybrid bindings problem that was eventually solved by xnav, and K T as well for trying to get me on the right path with my myriad of messages...
    ABOUT THE DICTIONARIES :
    http://www.journey-of-flight.com/bhxcode/how-to/0105_Sort_Array_ByValue/index.php
    I really am grateful to those who take the time to help.
    Thank You...
    Bill Hernandez
    Plano, Texas

    When I first created the project I was going to use arrays, and as it turned out I used arrays, and a couple of dictionaries, one original and one sorted with the results.
    I created a new project, and took some of the screen captures again.
    The corrected project, that reflects the correct topic is :
    http://www.journey-of-flight.com/bhxcode/how-to/0105_Sort_Dictionary_ByValue/index.php
    Sorry for the goof...
    Bill Hernandez
    Plano, Texas

  • In using Photos and iPhoto on iPad 3 - does not sort Albums in either program!  How do I sort?

    How do I sort Albums using Photos or iPhoto for iPad 3? 
    Thanks!
    D.

    Spare yourself the frustration of sorting photos with the Photo App.
    Use a 3rd party apps like Photo Manager Pro. You'll be able to drag the photos to any position you want.
    https://itunes.apple.com/sg/app/photo-manager-pro/id393858562?mt=8

  • Line details sort order when using Pick and Pack

    Hi,
    A customer of mine recently complained (very small complain) that when he used "Per date" as a sort when using Pick & Pack, that the line details where not grouped together by Sales Order Number.
    Example:
    2008/11/23   SO1001 - Line 1
    2008/11/23   SO1013 - Line 3
    2008/11/23   SO1001 - Line 2
    2008/11/23   SO1001 - Line 4
    2008/11/23   SO1021 - Line 1
    2008/11/23   SO1001 - Line 5
    etc...
    Is there a way to sort records on two columns instead of just one? or would there be another workaround this issue?
    Thanks
    Charles

    I think I found my answer, sorting data using the Data/Sort feature allows for sorting on multiple columns.

  • BPL - Define Selection Criteria (Selection Exit)

    We are using TDMS 3.0 with following patch level:
    DMIS             2006_1_700     0010
    DMIS_CNT     2006_1_700     0010
    DMIS_EXT     2007_1_700     0000
    We have a scenario where we want to transfer all sales transactions of particular plant in target system. We have selected package BPL scenario in TDMS with business context sales document.
    Under 'Define selection criteria' activity, we are getting only sales Document number as a filter criteria. We can extend the filter criteria to any column of table VBAK, but not any of the dependent tables (Like VBAP - containing plant)
    The operation guide shows an example of selection criteria for materials, filtering by the start table (MARA-MATNR) and at the same time by a dependent table (MARC-WERKS).  I want to apply the same logic to tables VBAK & VBAP. There are two problems in my way:
    1. As per operation guide, when you execute 'Define Selection Criteria', we should see three tab pages. 'Selections', 'Selection criteria' & 'Tables'. But I can see only two in my system i.e 'Selection criteria' & 'Tables'. There is no 'Selection' tab page in my system.
    2. Referring to forum Re: BPL: Filtering depending tables , we can use 'Selection Exit'. But can anybody guide me how that can be implemented and attached to the filter / process?
    Thanks & Regards,
    Audy.

    Hi again.
    Forum rules do not allow more than one question in the same thread, but anyway...
    TDMS BPL works by direct inserts in the database, so functional dependencies are not checked. This means that in VA01 you cannot create a sales order for a customer that does not exist but with BPL you can, though later of course you'll have problems when checking the sales order in VA03 (this is just an example: in practice the sales order context by default also includes the relevant customers). Unlike archiving, where you cannot delete a customer if sales orders for that customer still exist, in TDMS there are no such checks. This means there is really no sequence: in the end everything will be there.
    The direct inserts also mean that document numbers are kept the same, so existing objects with the same number are overwritten; check if that is a problem for you.
    About the last part of your question: first, don't forget that BPL does not include customizing, so make sure it is already there; second, BPL contexts are designed to include most tables related to a business process, but as you know R/3's data model is quite complex. After the copy you might realize that for your specific process maybe some tables were not considered. In that case I suggest you complain via OSS so that the context can be improved and we all profit.. ;). You must also be careful if you have Z tables that must be added to the context.
    Regards,
    Rui Dantas

Maybe you are looking for

  • Desktop Software 6.0 (PC) does not show OS 6 system software and core applications

    I have installed DM 600_b047 on my PC (running WinXP w/ SP3). I have also installed both OS 6.0.0_rel862 and 5.0.0_rel1385 on the same PC. When I connect my Bold 9000 to the PC, DM shows everything that is installed on the device. However, when disco

  • Ipod not recognized by my computer or itunes

    Just picked up a 8gb nano today, and my computer and itunes will not recognize it. The ipod charged completely off of my USB port. I have tried all of apple's suggestions on the support site, but they have not worked for me. I plugged it into my room

  • After I have Uninstall PS CC, the connection LR5.5 and PS CC2014 does not ok

    Hello, OSX 10.9.3, PS CC, PS CC2014 and LR5.5 in French version. After upgrade to PS CC2014, the connexion between LR and PS CC2014 is enable and no problem with edit in Photoshop CC2014, PS Open, PS clos the is in LR catalogue. I decide to remove PS

  • Powershell Coding vs C# Coding

    Hey all, I opened this thread to have a real discussion on coding. I myself use Powershell for everything, I love it and I think it can be used for nearly everything that C# can be used for (please correct me if i'm wrong). Though, I find myself comp

  • Executing URL and receiving XML response from ABAP

    Hi, I have a scenario where I need to execute a URL (along with some parameters) and this URL returns an XML onto browser. Now I want to achieve similar functionality through ABAP code. Ex: this is the sample URL to be executed --> http://localhost:8