הצטרפו לקבוצות שלנו לקבלת עדכונים מרוכזים פעם בשבוע:

ווטסאפ:
http://wa.dwh.co.il
טלגרם:
http://telegram.dwh.co.il

פרומפטים

More
17 years 11 months ago #2252 by yogev_z
פרומפטים was created by yogev_z
שלום לכולם
בכל סוג של פרומפט שנשים בדוח, תמיד נקבל מתחתיו 2 אפשרויות,
DESELECT ו-SELECT ALL,
האם יש דרך להוריד אותם שלא נראה אותם בדוח ?

Please התחברות to join the conversation.

More
17 years 11 months ago #2253 by shahark

אהלן, מצורף למטה פיתרון שיש באתר של קוגנוס. לא הספקתי לבדוק את זה.
לא הצלחתי ליישר את זה לשמאל. סורי.
Title:
How to remove the Select All and DeSelect All links from a multi select value prompt

Document#:
1020989.1

Updated:
Feb 20, 2008

Applies To:
Cognos 8 BI Report Studio 8.1 | Cognos 8 BI Report Studio 8.2 | Cognos ReportNet 1.1 | Cognos ReportNet 1.1MR1 | Cognos ReportNet 1.1MR2 | Cognos ReportNet 1.1MR3


SRs:
15


Collection:
KB





Description:

When using a value prompt with Multi-select, it automatically displays "Select all" and "Deselect all" at the bottom right.  This document describes a technique for removing these links from the bottom of a multi select value prompt.

Solution:

The following script will remove these links from a Value Prompt named RemoveSelectAllDeSelectAll

<script>
    var a = document.getElementsByTagName("A");
    for(var i=0;i<a.length;i++){
alert(a.href.split("#")[0]);
        if(a.href.split("#")[0] == 'javascript:listBoxRemoveSelectAllDeSelectAll.selectAll()'){
      a.parentNode.removeChild(a);     
}
    }
    for(var i=0;i<a.length;i++){
alert(a.href.split("#")[0]);
        if(a.href.split("#")[0] == 'javascript:listBoxRemoveSelectAllDeSelectAll.deSelectAll()'){
      a.parentNode.removeChild(a);     
}
    }
</script>

Note:  Techniques which use JavaScript are not guaranteed to be forward compatible.

Steps:

  1. Add this script to an HTML item which is placed at the bottom of the prompt page.

  2. When the page loads this code will find the listbox by name and remove both the Select All and Deselect All links from under the Value Prompt.

Note:  The Cognos Application Firewall may need to be disabled to get this to function properly.



Please התחברות to join the conversation.

More
17 years 11 months ago #2256 by yogev_z
הכל טוב ויפה אבל....
איפה אני רושם את השם של ה-LIST BOX שלי בתוך ה-SCRIPT הזה?
כמו כן, חיפשתי את זה באתר של קוגנוס, ובנוסף רשום שם
שה-FIREWALL של קוגנוס צריך להיות מכובה?? מה זה??

Please התחברות to join the conversation.

More
17 years 11 months ago #2265 by Dana
Replied by Dana on topic בעניין: פרומפטים
צריך להחליף את הטקסט RemoveSelectAllDeSelectAll בסקריפט בשם ה-list box שלך.
ה-firewall של קוגנוס זו הגדרה ב-cognos configuration.

Please התחברות to join the conversation.

More
17 years 11 months ago #2269 by yogev_z
לא עובד!!!
איזה באסה...
אני לא חושב שזה קשור ל-FIREWALL כי יש לי הרבה סקריפטים
וכולם עובדים......
אלוהים יודע למה?!?!
איזה באסה.
נראה די פשוט!
עוד לא ניסית את זה אצלך?

Please התחברות to join the conversation.

More
17 years 11 months ago #2299 by shahark
Replied by shahark on topic עובד !
אהלן,

בדקתי אצלי וזה עובד.
גירסה ReportNet 1.1 MR3 אם אתה צריך את זה ל- 8 תגיד לי ואני אנסה לבדוק את זה גם שם.

זה מתחלק לשני חלקים:
בניתי prompt page עם list box ושמתי את הקוד הזה:
<script>
    var a = document.getElementsByTagName("A");
    for(var i=0;i<a.length;i++){
alert(a.href.split("#")[0]);
        if(a.href.split("#")[0] == 'javascript:listBoxRemoveSelectAllDeSelectAll.selectAll()'){
      a.parentNode.removeChild(a);     
}
    }
    for(var i=0;i<a.length;i++){
alert(a.href.split("#")[0]);
        if(a.href.split("#")[0] == 'javascript:listBoxRemoveSelectAllDeSelectAll.deSelectAll()'){
      a.parentNode.removeChild(a);     
}
    }
</script>

כאשר הרצתי קיבלתי 2 הודעות שגיאה כי יש בקוד 2 לולאות שנותנות alert. אצלי זה פנה ל:
listboxN52 (הוספתי תמונה של ההודעה).

אז השלב הבא היה לשנות את הקוד:
1. החלפתי את listBoxRemoveSelectAllDeSelectAll
ל: listBoxN52
2. הורדתי את 2 ההודעות בלולאות.

הקוד נראה ככה בסוף:
<script>
    var a = document.getElementsByTagName("A");
    for(var i=0;i<a.length;i++)
{
        if(a.href.split("#")[0] == 'javascript:listBoxN52.selectAll()'){
      a.parentNode.removeChild(a);     
}
    }
    for(var i=0;i<a.length;i++){
        if(a.href.split("#")[0] == 'javascript:listBoxN52.deSelectAll()'){
      a.parentNode.removeChild(a);     
}
    }
</script>

מקווה שאצלך זה יעבוד. אני משתמש ב IE 7 .

שחר

Please התחברות to join the conversation.

More
17 years 11 months ago #2305 by yogev_z
מוזר........
האמת שבדקתי ואצלי IE6....
אבל אני לא חושב שזה משנה....
כששמתי את הקוד הראשון לא קיבלתי הודעות שגיאה......אך הוא לא הוריד אותם....
וכששמתי את הקוד השני גם אותה תוצאה-ללא הודעות שגיאה וללא הורדה....
מבאס.
ודרך אגב אני לא מדבר על REPORT NET אלא על REPORT STUDIO 8...
למרות שזה לא נראה לי שזה משנה....
כי המון סקריפטים אצלי עובדים ללא בעיה...

Please התחברות to join the conversation.

More
17 years 11 months ago #2308 by yogev_z
שמתי לב שקיבלתי הודעת שגיאה על הדף עם הקוד השני...
מצב צילום של פירוט ההודעה...
אם תוכל לעזור לי אני מאד אשמח...
ה-SELECT ALL הזה הורס לי דוחות מדהימים.....

Please התחברות to join the conversation.

More
17 years 11 months ago #2309 by shahark
אני אנסה את זה ב- 8.
איזה גירסה? יש לי 8.2 ו- 8.3 .

אתה יכול לשלוח את כל תוכן הודעת השגיאה?

שחר

Please התחברות to join the conversation.

More
17 years 11 months ago #2313 by yogev_z
REPORT STUDIO 8.2
וזו כל ההודעה....!

Please התחברות to join the conversation.

More
17 years 11 months ago #2315 by shahark
אם זה מנחם אותך...אני מקבל את אותה הודעת שגיאה ב- 8.2.
כנראה שצריך לשנות את הקוד.

אני אנסה לבדוק את זה בהמשך היום.

שחר

Please התחברות to join the conversation.

Moderators: לינוּר
Time to create page: 0.342 seconds