Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying a chart in PPES 7.1

Status
Not open for further replies.

Draoued

MIS
Aug 1, 2002
378
FI
It s difficult to copy a chart in IE from PPES 7.1 as the Right click is disabled.

I have created a small javascript which can be added into PPWBCUSTOM.JS in between {} of a function. Then the function needs to be enabled for all the cubes.

----------------------------
Code:
var ListImage = new Array;
t=1;
chartinfo=0;
if (!fh.YS)
{
	for (var i = 1; i < fh.document.images.length; i++)
	{
		PictureName = fh.document.images(i).src.substring(fh.document.images(i).src.length-4,fh.document.images(i).src.length);
		if (PictureName != '.gif')
			{
			ListImage[t] = fh.document.images(i).src;
			chartinfo=5;
			t++;
			}		
	}
	if (chartinfo == 0)
	{
	alert(&quot;No Chart to be copied&quot;);
	}
	else
	{
		if ( t > 2)
			{ 
			Number = t-1;
			wantedimage = 0 ;
			while (( wantedimage <= 0 ) ||  ( wantedimage > Number ) || (isNaN(wantedimage)) )
			{ 
			var wantedimage = prompt(&quot;Which picture to you want, number between 1 and &quot; + Number , &quot;Type the number of the chart&quot;);
			}
			var fenetre = window.open('','','toolbar=&quot;yes&quot;,scrollbars=&quot;yes&quot;,width=400,height=400');
        		var texte = &quot;Right-Click the picture and Select Copy&quot;;
			fenetre.document.open(&quot;text/html&quot;,&quot;replace&quot;);
        		fenetre.document.write(&quot;<IMG src=&quot; + ListImage[wantedimage] +&quot; width=400 height=350>&quot;);
			fenetre.document.write(&quot;<Center><font color=red><b>&quot; + texte + &quot;</b></font></Center><br>&quot;);
			fenetre.document.write(&quot;<Center>Picture will be properly scaled when Pasting it&quot;);
        		fenetre.document.close();
			}
		else
		{	
		var fenetre = window.open('','','toolbar=&quot;yes&quot;,scrollbars=&quot;yes&quot;,width=400,height=450');
        	var texte = &quot;Right-Click the picture and Select Copy&quot;;
		fenetre.document.open(&quot;text/html&quot;,&quot;replace&quot;);
        	fenetre.document.write(&quot;<IMG src=&quot; + ListImage[1] +&quot; width=400 height=350>&quot;);
		fenetre.document.write(&quot;<Center><font color=red><b>&quot; + texte + &quot;</b></font></Center><p>&quot;);
		fenetre.document.write(&quot;<Center>Picture will be properly scaled when Pasting it<p>&quot;);
        	fenetre.document.close();
		}
	}
}
else
	{
	alert(&quot;Disable the Split View before copying the Chart&quot;);
	}

----------------------


You can use it on your own risk and I will not offer any support.
 
Apologies for dragging this old thread up, but I note that in the enhancements for PPES7.3, MR2, the ability to right-click and copy has been added (see page54)

Was wondering how similar the code is...[ponder]?

Also wonder when the French-speaking Canadians in Cognos will suggest that releases go from MR1 to MR3...[wink]

soi la, soi carré
 
True , I noticed it also.
Even so, I m french, I m not in Cognos.
Are you suggesting that I should ask for some royalities ?? :)
 
If I were you, I'd certainly be curious about the code, but rather than an IP fight, you might be better off suggesting a role as a consultant for product enhancement [happy].

The other comment was related to 'em-er-deux' sounding slightly offensive to some...


soi la, soi carré
 
got it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top