How to find out all the text elements in the report using Java?

How to trace the contents of an rpt file?
I am able to open the rpt file in my report viewer but can not trace it using the JAVA code.
Actually, I need to find out all the text elements of rpt (Report) file and replace them with the contents of resource bundle.
My Java code to open a report is given below:
import com.crystaldecisions.reports.sdk.ISubreportClientDocument;
import com.crystaldecisions.reports.sdk.ParameterFieldController;
import com.crystaldecisions.reports.sdk.ReportClientDocument;
import com.crystaldecisions.sdk.occa.report.data.ConnectionInfo;
import com.crystaldecisions.sdk.occa.report.data.ConnectionInfos;
import com.crystaldecisions.sdk.occa.report.data.Fields;
import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
import com.crystaldecisions.sdk.occa.report.data.ParameterField;
import com.crystaldecisions.sdk.occa.report.data.ParameterFieldDiscreteValue;
import com.crystaldecisions.sdk.occa.report.data.Values;
import com.crystaldecisions.sdk.occa.report.lib.IStrings;
import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
import com.crystaldecisions.sdk.occa.report.lib.PropertyBagHelper;
import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
public String viewRpt()
               //1.) Setting Database Infos
                        IConnectionInfo iConnectionInfoObj=setDatabaseConnectionInfos();
               //2.) Setting Report Path
               String reportPath=u201DE:
was60
rptFilesLocation
u201D;
               reportPath=(reportPath!=null)?                                             reportPath:AppConstants.CONSTANTS.BLANK;
               String reportName="report1.rpt";
               String reportFullPath = reportPath +   rptName;
             //3.) Setting Report Source
                         ReportClientDocument reportClientDoc = new ReportClientDocument();
                                          reportClientDoc.open(reportPath, 0);
              IReportSource reportSource = reportClientDoc.getReportSource();
              setReportSource(reportSource);
              reportClientDoc.close();
          //4.) Setting the Fields Starts
          setFieldsCrystal(null);
          Fields fields = new Fields();
          ParameterField pfield1 = new ParameterField();
          Values vals1 = new Values();
          ParameterFieldDiscreteValue pfieldDV1 = new ParameterFieldDiscreteValue();
          pfield1.setName("@parameter1");
          pfieldDV1.setValue(u201Cvalue1u201D);
          vals1.add(pfieldDV1);
          pfield1.setCurrentValues(vals1);
          fields.add(pfield1);
          pfield1 = new ParameterField();
          vals1 = new Values();
          pfieldDV1 = new ParameterFieldDiscreteValue();
          pfield1.setName("@parameter2");
          pfieldDV1.setValue(u201Cvalue2u201D);
          vals1.add(pfieldDV1);
          pfield1.setCurrentValues(vals1);
          fields.add(pfield1);
          setFieldsCrystal(fields);
          //Setting the Fields Ends
The sample jsp code to view the report is as follows:
<%@taglib uri="http://www.businessobjects.com/jsf/crystalreportsviewers"
     prefix="bocrv"%>
<bocrv:reportPageViewer viewerName="CrystalViewer"
                                             reportSource="#{CrystalReportBeanObject.reportSource}"
                                             displayToolbarRefreshButton="false"
                                             allowDatabaseLogonPrompting="false"
                                             allowParameterPrompting="false"
                                             databaseLogonInfos="#{CrystalReportBeanObject.connectionInfosCrystal}"
                                             parameterFields="#{CrystalReportBeanObject.fieldsCrystal}"
                                             displayGroupTree="false" displayToolbarLogo="false"
                                             displayToolbarToggleTreeButton="false"
                                             enablePageToGrow="false" height="540"
                                             zoomPercentage="100" width="750"
                                             allowDrillDown="false"
                                             displayToolbarPrintButton="true"
                                             printMode="PDF"
                                             ></bocrv:reportPageViewer>
Edited by: JayKumarSharma on Mar 23, 2011 12:42 PM

This is how you retrieve all the text fields in the reort:
ReportObjects reportObjects = (ITextObject) oReportClientDocument.getReportDefController().getReportObjectController().getReportObjectsByKind(ReportObjectKind.text);
for(int i=0; i< reportObjects.size();i++)
ITextObject textObject = (ITextObject)reportObjects.get(i);
// use ReportObjectController to modify the text object.
If you want to modify the contents of the text element, you can do it as follows:
TextObject oTextObject = new TextObject();
Paragraphs oParagraphs = new Paragraphs();
Paragraph oParagraph = new Paragraph();
ParagraphElements oParagraphElements = new ParagraphElements();
ParagraphTextElement oParagraphTextElement = new ParagraphTextElement();
oParagraphTextElement.setText("This is the new text field");
oParagraphTextElement.setKind(ParagraphElementKind.text);
oReportClientDocument.getReportDefController().getReportObjectController().modify(textObject, oTextObject);
oReportClientDocument.save();

Similar Messages

  • How to find out all user exits edited

    Hi All,
    Would you know how to find out all user exits have been ever edited?
    Can we find out those user exit by some tcode or table?
    Thank you very much
    Best Regards,
    Calvin
    Edited by: Sam Sum on Mar 2, 2009 5:09 AM

    Hi,
    Just try this in your system.
    Go to SE38 and give ZX* and press F4.
    Have a look at table MODATTR to find the active projects in your system.
    Regards
    Edited by: Rajvansh Ravi on Mar 2, 2009 5:17 AM

  • How to find out who's texting you from an iCloud email address?

    how to find out who's texting you from an icloud email address?

    OK after a bit of research I found a way to achieve this.
    I simply looked up the email address in ADUC, then did a search in SP with the display name. I could locate the list and manually confirm it was configured with the incoming email address I was looking for.
    I also found the below script on Stackoverflow, but got "The 'using' keyword is not supported in this version of the language." when I tried to run it. Any idea how to fix that? I'd like to have a script to link a library to an email address istead of the
    manual approach described above.
    http://stackoverflow.com/questions/4974110/sharepoint-how-do-i-find-a-mail-enabled-list-if-i-only-have-the-email
    $SiteCollection = ""
    $EmailAddress = "" # only the part before the @
    # Load SharePoint module if not done yet
    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {Add-PSSnapin Microsoft.SharePoint.PowerShell;}
    cls
    using System;
    using Microsoft.SharePoint;
    namespace FindListByEmail
    class Program
    {a
    static void Main(string[] args)
    string siteUrl = $SiteCollection;
    string email = $EmailAddress;
    using (SPSite site = new SPSite(siteUrl))
    foreach (SPWeb web in site.AllWebs)
    try
    foreach (SPList list in web.Lists)
    if (list.CanReceiveEmail)
    if (list.EmailAlias != null && list.EmailAlias.Equals(email, StringComparison.InvariantCultureIgnoreCase))
    Console.WriteLine("The email belongs to list {0} in web {1}", list.Title, web.Url);
    Console.ReadLine();
    return;
    finally
    if (web != null)
    web.Dispose();

  • How to find out all active instances in a syste

    How to find out all active instances in a system

    Go to your basis team and ask them, as far as i know there is no other way then suggested in the other answer, but that is not a complete picture, And that is as designed, why should one want to be able to find out, the basis consultant will tell you!

  • How to find out if SQL execution plan is changed proactively using job/grid

    Hello,
    Can you help me on How to find out if SQL execution plan is changed proactively using job/grid control?
    Thank you..
    -

    The answers so far are supposed to show ways how to see that a plan changed after the fact - that is not really proactive but that was the question.
    A way to see a plan change proactively would be to create a SQL Plan Baseline for the SQL statement with the 'good old' plan and then watch DBA_SQL_PLAN_BASELINES for new rows with that SQL_HANDLE which would indicate that a new execution plan was computed - although not yet used.
    Kind regards
    Uwe Hesse
    "Don't believe it, test it!"
    http://uhesse.com

  • How to find out all the reports in production, ran how many times?

    Hi experts,
    I like to find out all the reports in production, ran how many time and by which user. Can I use st03n for this? if yes how and where to go?
    Thanks in advance.
    Sharat.

    Hi,
    You can use the statistics Cube 0BWTCT_C02. To get the Frequency of how many times a report has been executed, drill down the particular report by 0CALDAY and the frequency in 0FREQUENCY Keyfigure.
    Make sure the Cube is loaded,
    Thanks & Regards,
    Namrata

  • How to find out all the OKCODEs for a particular screen?

    I am working on t-code CL20N and trying to record with t-code SHDB, in the second screen when I press enter it is coming out, but when I run CL20N without SHDB it is going through all the screens perfectly, SHDB is not working for CL20N.
    Is there any other way to find out all the OKCODEs for a particular screen/s?

    Hi,
    First look for any push button or menu item which can take you to the second screen instead of hitting enter directly in tcode CL20N . If any such button exist in the TCode, u can use the same button in SHDB also for moving to the  second screen.
    Thanks,
    Rajinikanth G

  • How to find out all the tables in a schema with a particular column

    Hi
    Is there a way to find out all the tables in schema1 that has col1 as one of the columns?

    select table_name from dba_tab_cols where owner='schema' and column_name='col1';

  • How to find out all the tables associated with particular T-code or Program

    Hi All,
    In 4.6B we have a transaction code SE49, where we can see all the tables associated with particular Transaction code or Program.
    But in ECC 5.0 or in ECC 6.0 this transaction code is not available.So is there any alternative where i can find out all the tables associated with particular T-code or Program.
    Thanks
    Shubham

    Hi,
    you are right, Transaction SE49 as well as SE48 do not exist anymore I'm afraid, they        
    are discontinued.                                                              
    You might try to create a transaction variant:                                        
    1) Start SE93 to create a transaction variant                                         
    2) Specify a name, eg. ZSE49, and choose the first option:                            
       "program and screen (dialog transaction)                                           
    3) Here specify SAPMSEUZ as program, and 200 as screen number                         
    4) Choose a suitable development class (package) if you want it to be                 
       transportable or Local (=$TMP) if non-transportable                                
    5) press Save                                                                         
    Same applies for SE48, same program but dynpro 100.                                   
    Sorry for not being able the reasons behind the decision to discontinue            
    these transactions. I suppose at least part of the functionality was               
    integrated in SE38.           
    Best regards
    Erika

  • How to find out which jobs are connected to the user

    Hello, i have a question, but i was unable to find the answer. The problem is that our internal consultant left the company, and there are certain jobs that run under his account. We want now to switch this jobs to other accounts. The problem we are facing is how to find out what jobs, or job steps are connected with his account, so we can safely demote his account, so that no other jobs will be run under his account. Thank you very much
    Sincerely,
    Luka Prijic

    the only reliable way to do this is by scanning table TBTCP using the person's userID in field AUTHCKNAM and filtering by job statuses: scheduled, released, ready and active (sorry I can't remember the code#'s off top of my head, something like P=scheduled, S=scheduled...you have to look it up).   When you search SM37 it only permits you to scan by the userID who created the job, but it won't tell you if a different userID is defined in a job step.  That's why you need to scan TBTCP.  Don't forget that you should also check for a user's open Workflow items before deletion.
    I noticed some posts in this forum that suggest a userID should never be deleted, only locked, added to a special user group, and all role assignments removed.  However I've never worked somewhere that does this.

  • ADF table: How to find out which rows were modified by the user

    Hi,
    I am using ADF table to display data that can be modified by the user (ReadOnly = false in the input text). I need to find out which rows were modified by the user, and only update (persist) those rows in the database.
    Is there an easy way to find out which rows were modified by the user.
    I am NOT particularly concerned with which columns were modified as I would update the entire row (if any data in that row is modified).
    I am using Oracle JDeveloper version 11.1.1.3.
    Thanks,
    Ash K

    Thanks Timo.
    I am using ADF Data Control (which are created from Web Service proxy) to display/update the data.
    In the backing bean, the operation that is invoked at the time persisting data is as follows:
    public void commitOperation {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("operationA");
    DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("someIterator");
    for(int i=0; i<dciter.getViewObject().getEstimatedRowCount(); i++)
    Row row=dciter.getRowAtRangeIndex(i);
    SomeObject someObject= new SomeObject ();
    someObject.setAttr1(row.getAttribute("Attrbute1").toString());
    someObject.setAttr2(row.getAttribute("Attribute2").toString());
    objectList.add(someObject);
    operationBinding.getParamsMap().put("param1", objectList);
    ResultObject result = (ResultObject) operationBinding.execute();
    Inside the for loop (or any other place in the backing bean), I would like to figure out if the row was modified by the user. Please let me know if how to get that. If ADF provides this automatically, that would be GREAT.
    Thanks,
    Ash K

  • How to find out all SQLs executed by a procedure

    I need to find out all SQLs executed by a procedure. I can trace and check but in my case the issue happened 4 hours back and i know what procedure was causing it. There are multiple dynamic queries fired from this procedure. I need to track down all SQLs fired by this procedure constructed dynamically during the time issue was happening.
    I have the sql_id of the statement which was executing the procedure. How do I track down all "child" SQLs using this sql_id?
    Will appreciate any pointers.
    -ravi

    Thanks for your suggestion and looking into this.
    We already have that functionality built in. Version is 10.2.0.3...But the issue is the proc is called thousands of time in a day and we can not keep the tracking of sqls and parameters passed on all the time. When the issue happened we were not tracking. The bind variables are not captured as the SQL is constructed within the proc by looking up the values dynamically from secondary tables dynamically based on the parameters passed to the procedure. Now the SQLs which are generated from the proc will have the bind variables captured as they will come as predicates and will have no clob types (condition for the binds to be captured).
    I need a query to track down all "child" SQLs by using the sql_id of the parent process which is the procedure's sql_id.

  • SSRS Reports level how to find out All tables names & columns list to display dynamically SQL Query????

    Hi Team,
    I Have one requirement,In SSRS Reporsitory 3000 reports are available.
    My end user requirement All 3000 reports are used Table names & columns list of each wise to display single table or single result set.
    I find out all 3000 reports details are diplayed single results set like
    Report Id,Path,Dataset,Source Query Text,Datasource
    In Source Query Text  column level All reports Queries are available but I want Each Report wise Table name & columns List.If any solution Please share me.
    Regards
    Rama

    Hi Ramakoteswara,
    According your description, you want to show used tables and columns of each report, and display is into a single result set. Right?
    In this scenario, we don't know where to find a column contains the Source Query Text. With my understanding, in Reporting Services, we have Catalog table in ReportServer DataBase, it has a column called Content stores the report code (.xml). In the
    code we can find the Query and Fields. Then you need to use VB/C# code to parse each .xml code of each report and fetch out the table name and columns. We do not support writing any queries against SSRS DataBase or parsing data records in any
    table.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to find out all users accessing a schema

    Hi,
    How can I find out all the users which has accessed a schema for the last 30 days? Auditing is not enabled in the database.
    DB:10.2.0.4
    OS:AIX

    user13364377 wrote:
    Thanks Antonio.
    Is it possible to find all the users which have access to the schema?Do you mean OS users access .. ?
    Because from v$session we can find users sessions information, if thats what you mean.

  • How the text elements of the SMARTFORMS can generate a field?

    Hello guys
          I have got this problem of not getting the value of the fields from the smartform. i wrote the text element to populate the field by inserting as the following &IV_BID_HEADER-PROCESS_TYPE& first it comes with the shaded background but after i activate the smartform  the shaded part will gone and it remain as &IV_BID_HEADER-PROCESS_TYPE&  which basically cannot populate any value.
    can anyone help me on this,to keep the field remain shaded at the background which basicallly can populate the values of the fields.
    Thanks

    Hello,
    Please click on "FIELD LIST on/off" or ctrlshiftf4 and then drag and drop the same from the left bar.
    First find whether you have declared the value in Global Variables OR in Import/Export Interfaces.
    Hope this was helpful.
    Cheers,
    Suvendu

Maybe you are looking for

  • Multiple computers as one iTunes

    I've got two iBook G4's running 10.4.8, as well as a PC running XP, all three with iTunes. My original idea was to get an external hard drive to store all the music on, but since the PC's main use is media, I am debating whether or not to buy anythin

  • What kind of wireless bridge would work with Toshiba Regza HDTV & Toshiba Blu-ray DVD Player?

    What will provide wi-fi to Toshiba DVD player connecting using an ethernet cable, giving an internet connection. gholmes1936

  • OS Lion download issue.......

    I initiated an OS Lion download on my notebook which paused it selfafter about 30 minutes into the download. For technically reasons, I had to close the download window and now I am unable to re-connect to the download. After I log in to the App Stor

  • Pricing procedure not determined

    HI  When i tried to create sales order with sales area lg11/lg/lg.I am getting the error that pricing procedure is not determined,because no entry with keys lg11/lg/lg  'a'  'v' exists in table 683v. I am not able to move further. Can u pls help me.

  • Accessing to tasks belonging to my group when i wasnu00B4t part of it.

    HI Experts, i have a situation: There is a GP process running in my company, a group of people has to approve (approveres group) some tasks created by other people. My company realized that they needed to add more people in the approver group because