How can I iterate through the TextObjects of a Report object?

Post Author: EMoscosoCam
CA Forum: Other
Hello(Using Crystal Reports XI Release 2 and Visual Basic 6)I have the name of a TextObject as a string. I would like to make something like this:Dim objReport As CRAXDRT.Report' once initialized from an RPT fileobjReport.TextObjects(strName).Supress = TrueOf course, there is not such a thing as a TextObjects collection. Is there a similar way to do what I want? Consider that the TextObject's name to be supressed is a string, and that I do not have it before-hand.Thanks a lot.

Post Author: JonathanP
CA Forum: Other
Hi;
You can loop through every section, then through every object, and check to see if it is a TextObject or not.
ie:
Dim I As IntegerDim X As IntegerFor I = 1 To Report.Sections.Count    For X = 1 To Report.Sections.Item(I).ReportObjects.Count        If Report.Sections(I).ReportObjects.Item(X).Kind = crTextObject Then            Report.Sections(I).ReportObjects.Item(X).TextColor = vbRed        End If    Next XNext I
Regards,
Jonathan

Similar Messages

  • How can I iterate over the columns of a REF CURSOR?

    I have the following situation:
    DECLARE
       text   VARCHAR2 (100) := '';
       TYPE gen_cursor is ref cursor;
       c_gen gen_cursor;
       CURSOR c_tmp
       IS
            SELECT   *
              FROM   CROSS_TBL
          ORDER BY   sn;
    BEGIN
       FOR tmp IN c_tmp
       LOOP
          text := 'select * from ' || tmp.table_name || ' where seqnum = ' || tmp.sn;
          OPEN c_gen FOR text;
          -- here I want to iterate over the columns of c_gen
          -- c_gen will have different number of columns every time,
          --        because we select from a different table
          -- I have more than 500 tables, so I cannot define strong REF CURSOR types!
          -- I need something like
          l := c_gen.columns.length;
          for c in c_gen.columns[1]..c_gen.columns[l]
          LOOP
              -- do something with the column value
          END LOOP;
       END LOOP;
    END;As you can see from the comments in the code, I couln'd find any examples on the internet with weak REF CURSORS and selecting from many tables.
    What I found was:
    CREATE PACKAGE admin_data AS
       TYPE gencurtyp IS REF CURSOR;
       PROCEDURE open_cv (generic_cv IN OUT gencurtyp, choice INT);
    END admin_data;
    CREATE PACKAGE BODY admin_data AS
       PROCEDURE open_cv (generic_cv IN OUT gencurtyp, choice INT) IS
       BEGIN
          IF choice = 1 THEN
             OPEN generic_cv FOR SELECT * FROM employees;
          ELSIF choice = 2 THEN
             OPEN generic_cv FOR SELECT * FROM departments;
          ELSIF choice = 3 THEN
             OPEN generic_cv FOR SELECT * FROM jobs;
          END IF;
       END;
    END admin_data;
    /But they have only 3 tables here and I have like 500. What can I do here?
    Thanks in advance for any help!

    The issue here is that you don't know your columns at design time (which is generally considered bad design practice anyway).
    In 10g or before, you would have to use the DBMS_SQL package to be able to iterate over each of the columns that are parsed from the query... e.g.
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_rowcount  NUMBER := 0;
    BEGIN
      -- create a cursor
      c := DBMS_SQL.OPEN_CURSOR;
      -- parse the SQL statement into the cursor
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      -- execute the cursor
      d := DBMS_SQL.EXECUTE(c);
      -- Describe the columns returned by the SQL statement
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      -- Bind local return variables to the various columns based on their types
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
        END CASE;
      END LOOP;
      -- Display what columns are being returned...
      DBMS_OUTPUT.PUT_LINE('-- Columns --');
      FOR j in 1..col_cnt
      LOOP
        DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
                                                                                  when 2 then 'NUMBER'
                                                                                  when 12 then 'DATE'
                                                         else 'Other' end);
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('-------------');
      -- This part outputs the DATA
      LOOP
        -- Fetch a row of data through the cursor
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        -- Exit when no more rows
        EXIT WHEN v_ret = 0;
        v_rowcount := v_rowcount + 1;
        DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
        DBMS_OUTPUT.PUT_LINE('--------------');
        -- Fetch the value of each column from the row
        FOR j in 1..col_cnt
        LOOP
          -- Fetch each column into the correct data type based on the description of the column
          CASE rec_tab(j).col_type
            WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
            WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
          ELSE
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
          END CASE;
        END LOOP;
        DBMS_OUTPUT.PUT_LINE('--------------');
      END LOOP;
      -- Close the cursor now we have finished with it
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    Row: 2
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    JOB - VARCHAR2
    MGR - NUMBER
    HIREDATE - DATE
    SAL - NUMBER
    COMM - NUMBER
    DEPTNO - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    JOB : MANAGER
    MGR : 7839
    HIREDATE : 09/06/1981 00:00:00
    SAL : 2450
    COMM :
    DEPTNO : 10
    Row: 2
    EMPNO : 7839
    ENAME : KING
    JOB : PRESIDENT
    MGR :
    HIREDATE : 17/11/1981 00:00:00
    SAL : 5000
    COMM :
    DEPTNO : 10
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    JOB : CLERK
    MGR : 7782
    HIREDATE : 23/01/1982 00:00:00
    SAL : 1300
    COMM :
    DEPTNO : 10
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from dept where deptno = 10');
    -- Columns --
    DEPTNO - NUMBER
    DNAME - VARCHAR2
    LOC - VARCHAR2
    Row: 1
    DEPTNO : 10
    DNAME : ACCOUNTING
    LOC : NEW YORK
    PL/SQL procedure successfully completed.
    SQL>From 11g onwards, you can create your query as a REF_CURSOR, but then you would still have to use the DBMS_SQL package with it's new functions to turn the refcursor into a dbms_sql cursor so that you can then describe the columns in the same way.
    http://technology.amis.nl/blog/2332/oracle-11g-describing-a-refcursor
    Welcome to the issues that are common when you start to attempt to create dynamic code. If your design isn't specific then your code can't be either and you end up creating more work in the coding whilst reducing the work in the design. ;)

  • Firefox keeps prompting users to disable java plugins How can reinable them through the command line or registry?

    Windows users keep getting prompted about java version being insecure and are advised to disable the plugin. They then complain that java based websites no longer work. Can I disable / prevent this warning feature. And can I re-enable java plugin via command line or script? I need to do this on a large scale and various versions of firefox. Right now I will need to abandon firefox if I cannot easily resolve this. Yes I realize updating to latest version of java is a solution... but this will take too much time now and how long before another security fix for java and then I will have to update yet again.

    Tylerdowner, to say that Firefox 3.6 is no longer supported is not an answer. Apparently, the so-called block deployed for the Mac OS X version of Firefox, created to deal with a vulnerability in Oracle's Java, has now crept into the Windows version. Moreover, it is blocking the latest version of Java, which was not intended according to https://bugzilla.mozilla.org/show_bug.cgi?id=741592. The official text of the block follows:
    Java Plugin has been blocked for your protection.
    Why was it blocked?
    Outdated versions of the Java plugin are vulnerable to an actively exploited security issue. All Mac OS X users are strongly encouraged to update their Java plugin through Software Update, or disable it if no alternatives are available. For more information, please read our blog post or Oracle's Advisory.
    Who is affected?
    All Firefox users who have installed the Java plugin, JRE versions below 1.6.0_31 or between 1.7.0 and 1.7.0_2.
    What does this mean?
    Users are strongly encouraged to disable the problematic add-on or plugin, but may choose to continue using it if they accept the risks described.
    When Mozilla becomes aware of add-ons, plugins, or other third-party software that seriously compromises Firefox security, stability, or performance and meets certain criteria, the software may be blocked from general use. For more information, please read this support article.
    Well, whoever wrote the code to block the Java plug-ins specified above screwed up, since it is blocking even the updated Java plug-in.
    I have an enterprise with many computers, and we had deployed Firefox as our browsing platform. Based on the latest decisions at Mozilla, new version numbering, forced release cycle, and almost all add-on vendors just walking away from the maintainence nightmare created by this decision, I guess it's time to move over to the Dark Side and adopt Google Chrome.

  • How can I work through the limitations of the Premiere Elements 9 trial?

    Adobe has a number of suggestions for working with the trial download of Premiere Elements 9.
    http://kb2.adobe.com/cps/870/cpsid_87080.html

    yogawithlexi,
    Welcome to the forum.
    Im also needing to just edit the photos but adding text. Nothing fancy. I just want to make some flyers.
    For editing photos, to be output to the printed page (whether by a commercial printing service, or a desktop printer), I strongly recommend Photoshop Elements (PsE).
    If you need to output to a video file, then Premiere Elements (PrE) can possibly do what you want, but not for the printed page - at least not easily, and with the ultimate results. First, Video is not dependent on DPI/LPI (Dots Per Inch, or Lines Per Inch), where printed material will be. Also, while PrE can output a Still Image, the quality, when printed, will be far less, than what one can obtain with PsE.
    Do you currently have Photoshop Elements on your computer, or only Premiere Elements?
    Good luck,
    Hunt

  • I have had a reinstall nightmare getting my loops back they are in the apple library, I can access them through the media browser but I only have a few available through the loop browser, how do I get them all back there again? please help

    I have had a reinstall nightmare getting my loops back they are in the apple library, I can access them through the media browser but I only have a few available through the loop browser, how do I get them all back there again? please help

    "Where do I find my hundreds of dollars of downloads I have done since 2005?"
    They will only be where you put them  If you are doing the very basics, then they will be on your computer and they will be in your backup copy of your computer.
    The itunes store is not global at all, never has been. You cannot redownload your content from another country.  You can only use the countrys itunes store for the country that you are physically located.

  • I have made with iweb a website on my macbook, now i want to change it, through my imac, how can I get in the program , which is on the mac book. On both computer I have Lion

    i have made with iweb a website on my macbook, now i want to change it, through my imac, how can I get in the program , which is on the mac book. On both computer I have Lion

    You need to transfer your domain.sites file from your MacBook to your iMac.  This is the file where iWeb stores all info and can be found under User/Library/Application Support/iWeb/domain.sites.
    Transfer this file from your MacBook to the same place on your iMac and double click the domain.sites file and iWeb will open it on your iMac and you can update your site from there too.

  • A few years ago I bought music from Itunes.  Recently I deactivated all computers in order to add a new computer.  Most of the music I purchased came through, but I am still missing about 30% of it.  How can I download all the music I have purchased from

    A few years ago I bought music from Itunes.  Recently I deactivated all computers in order to add a new computer.  Most of the music I purchased came through, but I am still missing about 30% of it.  How can I download all the music I have purchased from Itunes?

    Might have luck with that here >  Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Previous purchases may be unavailable if they have been refunded or are no longer on the iTunes Store.
    Make sure and use the same Apple ID that was used for the original purchases.

  • How can I do that the background appears through the person who is on the pic

    how can I do that the background appears through the person who is on the pic

    Hi
    just decrease the opacity of the layer on which you have the person

  • How can one accept that the only way to sync with OSX 10.9 is through I cloud?

    How can one accept that the only way to sync with OSX 10.9 is through I cloud?
    One is now obliged to send private information to an external server...

    Thank you for the link but what a waist of time.
    Who is the idiot that decided to drop manual syncing of contacts and calendars?
    I am on the point of dropping all APPLE machines!
    I am looking to sync without having to worry about security issues, keeping my files and passwords locally on my machines, and not an external server such as a cloud drive.
    Do you know if Outlook syncs also over an external server?
    Do you know of this solution? http://www.codetwo.com/public-folders/share-windows-files-securely/

  • How can I turn off the Ipod 5g speaker so it just plays through the headphones?

    How can I turn off the Ipod 5g speaker so that it just plays through the headphones?

    First make sure your headphones are plugged all the way in, meaning no silver from the headphones plug can still be seen.
    If that's not the issue, try a hard reset of the Nano.  To do this, press and hold both the Select (Center) and Menu buttons together long enough for the Apple logo to appear.
    B-rock

  • How can I tell if the quicktime movie I export from Final Cut Express through Quicktime to IDVD is anamorphic

    How can I tell if the quicktime movie I export from Final Cut Express through Quicktime to IDVD is anamorphic

    Find the Seuence icon in the Browser that corresponds to the Timeline.
    Right click the Sequence icon in the Browser.
    Select Item Properties.
    All info is revealed.
    Al

  • Frequently I send an email to multiple contacts.....I'm constantly changing my selection of multiple contacts so using the "group" function doesn't get the job done.......so how can I go through m

    I guess I was not clear.....my fault....let me re-phrase:  frequently I send an email to multiple contacts.....I'm constantly changing my selection of multiple contacts so using the "group" function doesn't get the job done.......so how can I go through my list of contacts and quickly select those contacts that I want to receive that particular email....thx  

    You need an app that allows group messaging. Enter group messenger in the search bar in the app store.

  • HT1925 When I try to uninstall apple updater I get a message that says " The feature you are trying to use is on a network resource that is unavailable." I dont understand this. How can I finish uninstalling the apple update program?

    When I try to uninstall apple updater I get a message that says " The feature you are trying to use is on a network resource that is unavailable." I dont understand this. How can I finish uninstalling the apple update program?

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any Apple Software Update entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install using an iTunesSetup.exe (or iTunes64Setup.exe) downloaded from the Apple Website:
    http://www.apple.com/itunes/download/
    Does it go through properly this time?

  • How can I turn off the WLS 6.1 security in order to develop my own application-based security module?

    Dear Colleagues,
    I am currently developing a J2EE application using WLS 6.1.
    My team and I have to implement a security requirement to suit our company's needs.
    The security requirements are that, users' password need to be aged (30 days maximum) and we need to provided a GUI front-end (JSP) to allow users to change their password when these expire after 30 days.
    Our internal contacts in the company, have already taken the lead to find out about whether we will be able to use the WLS 6.1 platform to do this and the answer we got back, was.
    Now we need to develop our own security module.
    I have 2 questions:
    1. How can we turn off the WLS security in order develop our own application-based security module?
    2. How can we develop a security module that allows us to age users' password and provide them with facilities to change their passwords when these expire?
    At the moment, we are using the default BEA WebLogic login.jsp page and there some configuration in the web.xml for this. I will be grateful if you could advise me on how to turn this default security off so that we can write our own security module.

    hi,
    1.You can write your own realm in 61 which can plugged for your security
    calls.
    2. once you write your ownrealm.. you can access it through weblogic
    api/ur api..
    thanks
    kiran
    "Richard Koudry" <[email protected]> wrote in message
    news:3dd0d081$[email protected]..
    Dear Colleagues,
    I am currently developing a J2EE application using WLS 6.1.
    My team and I have to implement a security requirement to suit ourcompany's needs.
    >
    The security requirements are that, users' password need to be aged (30days maximum) and we need to provided a GUI front-end (JSP) to allow users
    to change their password when these expire after 30 days.
    >
    Our internal contacts in the company, have already taken the lead to findout about whether we will be able to use the WLS 6.1 platform to do this and
    the answer we got back, was.
    >
    Now we need to develop our own security module.
    I have 2 questions:
    1. How can we turn off the WLS security in order develop our ownapplication-based security module?
    >
    2. How can we develop a security module that allows us to age users'password and provide them with facilities to change their passwords when
    these expire?
    >
    At the moment, we are using the default BEA WebLogic login.jsp page andthere some configuration in the web.xml for this. I will be grateful if you
    could advise me on how to turn this default security off so that we can
    write our own security module.

  • How can I have all the numbers transfered from my old cellphone?

    In my old cell phone I have more than one number for each person: cell phone, land line, office etc. When I have transfered my telephone contacts from my old cell phone to my iphone, only one number for each name appears : how can I have all the numbers transfered?

    When transfer contacts through SIM only the first number is really transferred.
    What kind is your old phone?

Maybe you are looking for