How to get current rowindex of clicked object in cr2008 preview control

hi
i want to get selected raw data when user click on crystal report 2008 preview control.
i can achieve using following code for particular row no.
Dim repReport as new ReportDocument
repReport.Rows(RowIndex).Item(ColumnIndex)
how to get current rowindex ? 
Thanks
Sanjiv Sharma

Only way I can think of is to use the rowset controller from the InProc RAS SDK. Here is a snippet of a sample code on how to:
//Load the report
if (clientDoc != null) {
//create metadata structure
RowsetMetaData rowSetMetaData = new RowsetMetaData();  rowSetMetaData.setDataFields
(clientDoc.getDataDefinition().getResultFields());
       Fields fields = rowSetMetaData.getDataFields();
       String colName,colTypeName;
       int colType, len;
       Field field;
       HashMap colNames = new HashMap();
       HashMap colTypes = new HashMap();
       for (int i = 0; i < fields.size(); i++) {
               field = (Field) fields.get(i);
               colName =field.getDisplayName(FieldDisplayNameType.description, Locale
.ENGLISH);
               colNames.put("COL"+i,colName);
       colType = getColTypeFromVariant(field.getType().toVariantTypeString());
       len=field.getLength();
              //Placeholder
        //add column metadata to data structure or XML
        Object colValue;
        int rowCount=0;
        if (getMaxRows() != 0) {
               RowsetCursor rowsetCursor = clientDoc.getRowsetController(). createCursor
(null, rowSetMetaData);
              //Setting the batch size to make sure that you get back all the
              //rows by setting the batch size.
                    clientDoc.getRowsetController().setRowsetBatchSize (rowsetCursor
.getRowset().getTotalRecordCount());
           //Getting the Results back starting from the first row
           RowsetCursor resultCursor = clientDoc.getRowsetController(). createCursor(null,
rowSetMetaData);
           resultCursor.moveTo(0);
              while (!resultCursor.isEOF()) {
                  for (int i = 0; i < fields.size(); i++) {
                           colName=(String)colNames.get("COL"+i);
                           colTypeName=(String)colTypes.get("COL"+i);
colValue=record.getValue(i);
                            //Placeholder
//add row data to data structure or XML
resultCursor.moveNext();
For more details, consult the Report Application Server .NET SDK Developer Guide
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Similar Messages

  • How to get current view name on clicking device back button?

    Hi,
    iam wriing a function for handling device back button(in android) press in my app.controller.js .How to get current viewname when clicking device back button.
    code samples will be helpful.
    my app.controller.js looks like below
    sap.ui.controller("com.opensap.App", {
      onInit : function() {
      document.addEventListener("deviceready", onDeviceReady, false);
      onBeforeShow : function(evt) {
      navButtonTap : function(evt) { 
    function onBackKeyDown(){
      //alert("hai");
      //sap.ui.getCore().byId("SalesDetail").app.backToPage("ProductList");
      //sap.ui.getCore().byId("ProductList").app.backToPage("Dashboard");
      //sap.ui.getCore().byId("SupplierDetail").app.backToPage("Dashboard");
    function onDeviceReady(){
       document.addEventListener("backbutton", onBackKeyDown, false);

    I somehow managed to find the solution
    function onBackKeyDown(){
      var app = sap.ui.getCore().byId("LoginDetail").app;
      app.back();

  • How to get Date Format from Local Object.

    Hi All,
    I am new to Web Channel.
    I need to know Date format From date of locale.
    suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC. 
    Is there any way to get Date format from "Locale" object. I should get date format for local object
    I get local object from "UserSessionData" object but how to get Date format from it.
    I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format.  I could not find example which show how to get date format from "Locale" object.
    Any help will be appreciated with rewards.
    Regards.
    Web Channel

    Hi,
    You can get it from "User" or "Shop" business object.
    Try to get User or Shop Business Object as shown below.
    BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
    User user = bom.getUser();
    char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
    If you are seeing "1,234.00" then above code will return "."
    I hope this information help you to resolve your issue.
    eCommerce Developer.

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

  • How to get event when any library object added to indesign doc?

    I want to do some operation when any library object is added to doc. So please tell me how to get event when any library object is added to the doc. better provide some code snippet.

    Daves61,
    I need to clarify what kind of event you're interested in.
    1. When you click once on page/spead widget in the Pages panel and only widget becomes selected. The layout window remains unchanged. OR
    2. When you doubleclick on page/spread widget the selected master spread appears in the layout window.
    In the first case you work with Pages panel.
    Have a look to file PageTransitionsPanelObserver.cpp from SDK. 
    PageTransitionsPanelObserver::LazyUpdate()
    In the second case you work with Layout window.

  • How to get current time and date??

    How to get current time and date from my PC time and date to the java application??
    i use java.util.* package but got error, that is:
    - java.util.* and java.sql.* class are match
    - abstract class cannot be instantiated
    so what can i do, pls guide...thanks...

    There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
    Don't import *. Import the specific classes you need.
    Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother.

  • How to get the values of the objects inside an object??

    Hi,
    I am trying to write code to display name and memory usage of all session attributes, in a recursive way.
    I suppose reflection is needed here, but I can’t figure out how to get the values of the objects inside an object...
    private void handleIt(String attributeName, Object attributeValue) {
         boolean isPrimitiveOrNull = ((null == attributeValue) ||
              (attributeValue.getClass().isPrimitive()));                                         
         if (isPrimitiveOrNull) {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
         } else {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
              Field[] fields = attributeValue.getClass().getDeclaredFields();
              int lim = fields.length;
              String name;
              Object value = null;
              for (int i = 0; i < lim; i++) {
                   name = fields.getName();
                   //LOOK AT THIS LINE: !!!!!!!!!!!!!!!!!!!!!!!!!!!
                   value = fields[i].get(obj); //I don´t know what 'obj' should be??
                   handleIt(name, value);
              sb.append("}");               
    Any suggestions will be greatly appreciated...

    I realized that massive int objects called MAX_VALUE, MIN_VALUE and SIZE where causing the StackOverflow, so I removed them from the analysis.
    This is the resultant code. But I think it isn’t accurate in calculating the real size of objects being got using reflexion.
    Do you or somebody have any more suggestions?
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.ObjectOutputStream;
    import java.lang.reflect.Field;
    import java.util.Enumeration;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class SessionMeasurer extends HttpServlet {
         private static final long serialVersionUID = 1470488362727841992L;
         private StringBuilder sb = new StringBuilder();
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void performTask(HttpServletRequest request, HttpServletResponse response) {
              HttpSession     session = request.getSession(false);     
              String attributeName = "";
              Object attributeValue = null;
              for (Enumeration<?> attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
                   attributeName = (String)attributeNames.nextElement();
                   attributeValue = session.getAttribute(attributeName);
                   handleIt(attributeName, attributeValue);               
              System.out.println(sb.toString());
         private void handleIt(String attributeName, Object attributeValue) {           
              if (attributeValue != null) {          
                   boolean isPrimitive = attributeValue.getClass().isPrimitive();
                   if (isPrimitive) {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
                   } else {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
                        Field[] fields = attributeValue.getClass().getDeclaredFields();
                        String name;
                        Object value = null;
                        int lim = fields.length;
                        for (int i = 0; i < lim; i++) {
                             name = fields.getName();                                                                                                         
                             if (!name.endsWith("_VALUE") && !name.equals("SIZE") && !name.equals("serialVersionUID")) {
                                  try {
                                       value = fields[i].get(attributeValue);
                                  } catch(Exception e) {
                                       //PENDIENTE: Tratamiento excepción
                                  handleIt(name, value);
                        sb.append("}");               
         private int sizeOf(Object obj) {
              //Valid only for Serializables
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              ObjectOutputStream oos = null;     
              byte[] bytes = null;               
              try {          
                   oos = new ObjectOutputStream(baos);
                   oos.writeObject(obj);
                   bytes = baos.toByteArray();
              } catch(Exception e) {               
                   //PENDIENTE: Tratamiento excepción
              } finally {
                   if (oos != null) {
                        try {
                             oos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
                   if (baos != null) {
                        try {
                             baos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
              int size = -1;
              if (bytes != null) {
                   size = bytes.length;
              return size;          

  • How to get another jsp by clicking a h:commandLink in jsf page

    Hi,
    I am new to JSF. pls send sample code me how to get another jsp by clicking a commandLink in jsf.
    SUB: TO go to the page "report7.jsp"
    -->By getting help from samples i wrote for above in 2 ways.
    1)
    <td><h:commandLink id="RO0007" action="r7" >Sharing of Information from Foreign FIU</h:commandLink></td>
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    2) Sending request through bean method
    <td><h:commandLink id="RO0007" action="#{RBean.report7()}" >Sharing of Information from Foreign FIU</h:commandLink></td>
    in RBean the method form is
    public String report7(){          
         return "r7";
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    Some problem in both i think as it is not going to next page. i need to go to th next page by calling Bean Method.
    please get me out of this problem. It is very urgent. Thank you.
    **************************************************************

    What error is it throwing? If it is throwing a Page not found, then maybe you should try mapping to "report7.faces" instead of "report7.jsp"
    Can you post your faces-config please

  • How to get current version of safari. without having safari browser?

    how to get current version of safari. without having safari browser?

    I don't understand the question. Safari is a browser.
    Can you elaborate on what your are trying to do that initiated the question? People may be able to come up with some other option that gets you working the away you want.
    When you respond, please post the version of the Mac OS and the version of Safari you currently have. Otherwise, people are guessing and the quailty of help you get plummets.

  • How to get Current row of ViewObject in the DoDML methode

    Hi all
    I have two ViewObject EmplyesView and DeptView
    How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesView

    OK, we can play this game on and on...
    I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
    So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
    Timo

  • How to get current month and last month dynamically??

    how to get current month and last month dynamically
    like
    month = getCurrentMonth();
    lastmonth = getcurrentMonth() -1;
    please help
    thanks

    hi :-)
    /* depracated but can be still useful */
    java.util.Date dtCurrent = new java.util.Date();
    int month = dtCurrent.getMonth();
    int lastmonth = dtCurrent.getMonth() - 1;
    System.out.println("* " + month);
    System.out.println("* " + lastmonth);
    /* better to use this one */
    Calendar cal = new GregorianCalendar();     
    int imonth = cal.get(Calendar.MONTH);
    int ilastmonth = cal.get(Calendar.MONTH) - 1;
    System.out.println("*** " + imonth);
    System.out.println("*** " + ilastmonth);
    regards,

  • How to get current IUser (com.sapportals.portal.security.usermanagement)

    Hi,
    does anybody know how to get IUser for the current user?
    I know how to get current IUser from com.sap.security.api package:
    IWDClientUser wdcu = WDClientUser.getCurrentUser();
    IUser sapUser = wdcu.getSAPUser();
    but I need to have IUser from com.sapportals.portal.security.usermanagement package.
    Regards,
    Ladislav

    Ladislav,
    Try this:
    Get the IUser uisng the API com.sap.security.api.IUser and store it in a variable, say <i>sapUser</i>.
    Then,
    // Convert the logged in user to old EP5 usermanagement API
    com.sapportals.portal.security.usermanagement.IUser user = null;
    try
         com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(sapUser);
    catch (UserManagementException e)
         e.printStackTrace();
    Bala

  • How to get current assigned participant id?

    Hi mates,
    This might be a basic questions, but useful for me :)
    How to get current assigned participant id from screenflow? Or How to pass it as an argument from interactive activity?
    Below is what I tried.
    Participant.id or Instance.participant.id - returns login user id
    Thanks

    Hi,
    Please correct me if I understood wrong.
    You want to know whether an instance is assigned or not and if assigned then you want to fetch the assigned participant id.
    If this is your requirement then please find the code below and make the necessary changes into it.
    Write the following code in screen flow automatic activity but before that you need to pass the instanceid as argument to the screen flow.
    In the process as well as screen flow layer make an instance variable instanceid as Int.
    Then make an argument variable instanceidArg as Int in both the screenflow and process layer and map accordingly so that it will take the instanceid from process layer to the screen flow layer.
    Assign instanceid = id.number; in process layer automatic activity but before the global interactive activity where you have maped the screen flow.
    Write the following code in screen flow automatic activity.
    logMessage("============= instanceid ==============" + instanceid); //instanceid is the id of the instance that you have passed from process layer.
    ProcessService ps;
    InstanceFilter instF = InstanceFilter();
    ps.connectTo(url : Fuego.Server.directoryURL, user : "<userid>", password : "<password>"); //In studio the userid and password will be same
    logMessage("Connected");
    instF.create(processService : ps);
    instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
    //<ProessId Name> is the id of the process where you want to know the assighed participant id
    instF.addAttributeTo(variable : VarDefinition.processid, comparator : Comparison.CONTAINS, value : "/" + "<ProessId>");
    instF.addAttributeTo(variable : VarDefinition.INSTANCE_NUMBER, comparator : Comparison.IS, value : Int(instanceid));
    Fuego.Papi.Instance[] instances = getInstancesByFilter(ps, filter : instF);
    foreach (instance in instances) {
    logMessage("Assigned ?: " + instance.participantId.empty);
    logMessage("instance.participantId: " + instance.participantId);
    ps.disconnectFrom();
    Bibhu

  • How to get current date for posting date

    hi,
    how to get current date for posting date ? any sample code ?
    Thanks

    Hi......
    Use
    Select getdate()
    for current date.......
    Regards,
    Rahul

  • Urgent : How to get current user id

    Hello,
    fnd_global.user_id returns -1
    fnd_profile.get('user_id',x_user_id) return null
    can anyone help how to get current logged in user to apps.
    Regards,
    Dinesh.

    Hi Dinesh,
    You must also make sure you have initialised the app.
    If you run this from sqlplus then it will return -1.
    If however you run this from within a concurrent program then the user id will be returned.
    Try using this from sqlplus fnd_global.apps_initialize
    Eg.
    begin
    dbms_output.put_line(fnd_global.user_id);
    fnd_global.apps_initialize(user_id => 3551,
    resp_id => 1,
    resp_appl_id => 1);
    dbms_output.put_line(fnd_global.user_id);
    end;
    /

Maybe you are looking for

  • Is this an Apple Problem or a Denon Problem?

    I use the most recent Mac Mini as a media center in my living room. Using a DVI to HDMI adapter the Mac Mini video feeds into my Denon AVR-4306 Receiver. The audio is pumped out of the standard headphone jack. At the end of each viewing session, the

  • Adobe viewer / build help

    Can I test an app (for ipad) without buying the 395 subscription? I need to convince our executive director that this is what we need before she drops 400. I've built the test file, uploaded to the folio producer, went through the viewer builder proc

  • Blue squares over moving images and videos, Blue squares over moving images and videos

    https://www.youtube.com/watch?v=t9NmqnaHuWo&feature=youtu.be This issue is going on for a while and I have tried the usual means to fix it, like restarting, updating drivers, uninstalling gfxCardStatus completely... As you can see on the video, anyti

  • How do I identify and remove salware

    I have macbook air operating Yosemite .I have "Search only" taking over my browser .  How do i get rid of it?

  • Why does Firefox 8 hang every time I put my Mac to sleep?

    I recently switched to Firefox 8 on Mac OS v10.6.8. If I put my laptop to sleep with Firefox running, when I open the computer again Firefox hangs. It's unresponsive to any mouseclicks or keystrokes. I can force-quit Firefox and reopen it again, but