Showing posts with label inside. Show all posts
Showing posts with label inside. Show all posts

Tuesday, March 6, 2012

Add javascript code to report page inside the report manager

Hi all,
Does anyone knows how can I add some javascript code into the html page
which contains a report into the report manager?.
Let's the following scenario, suppose that any user wants to execute some
reports from report manager, first the user goes to http://server/reports
after that he/she will be at home page configured due to his/her profile, the
user select a report with a click and, he/she executes it. The report will be
rendered in html inside the same window where the report manager is, but in
different frame.
I know using both htc and css files I can modify some behavior of the html
page but, the problem is that both report manager and the rendered report
coexist in the same window( I mean different frames for each of them ) I
don't know how to add some javascript code into the frame or page or whatever
the report lives in.
Any help will be appreciated.Hi
in the htc you can access the frame page which contain the report and the
report manager using the javascript dhtml code.
you can use like
frame[0].document.
or window.document.getelementbyID['asd'].
you dont have to insert script in the frame
you can put all the code in htc to call the code..
"jhcp" wrote:
> Hi all,
> Does anyone knows how can I add some javascript code into the html page
> which contains a report into the report manager?.
> Let's the following scenario, suppose that any user wants to execute some
> reports from report manager, first the user goes to http://server/reports
> after that he/she will be at home page configured due to his/her profile, the
> user select a report with a click and, he/she executes it. The report will be
> rendered in html inside the same window where the report manager is, but in
> different frame.
> I know using both htc and css files I can modify some behavior of the html
> page but, the problem is that both report manager and the rendered report
> coexist in the same window( I mean different frames for each of them ) I
> don't know how to add some javascript code into the frame or page or whatever
> the report lives in.
> Any help will be appreciated.|||Hi Bava,
thanks for your answer but, how can I know which frame contains the rendered
report?.
The htc file I coded is the following
<public:component tagName="test1">
<PUBLIC:ATTACH EVENT="oncontextmenu" onevent="f_CancelEvent()" />
<PUBLIC:ATTACH EVENT="onselectstart" onevent="f_CancelEvent()" />
<PUBLIC:ATTACH EVENT="ondragstart" onevent="f_CancelEvent()" />
</public:component>
<SCRIPT language="javascript">
function f_CancelEvent()
{
event.returnValue = false;
}
</script>
After that, I reference that piece of code in a css file as following
body {
margin: 0;
background-color: White;
font-family: Verdana, Sans-Serif;
font-size: x-small;
behavior: url(../js/test1.htc);
}
"Bava Mani" wrote:
> Hi
> in the htc you can access the frame page which contain the report and the
> report manager using the javascript dhtml code.
> you can use like
> frame[0].document.
> or window.document.getelementbyID['asd'].
> you dont have to insert script in the frame
> you can put all the code in htc to call the code..
> "jhcp" wrote:
> > Hi all,
> > Does anyone knows how can I add some javascript code into the html page
> > which contains a report into the report manager?.
> > Let's the following scenario, suppose that any user wants to execute some
> > reports from report manager, first the user goes to http://server/reports
> > after that he/she will be at home page configured due to his/her profile, the
> > user select a report with a click and, he/she executes it. The report will be
> > rendered in html inside the same window where the report manager is, but in
> > different frame.
> > I know using both htc and css files I can modify some behavior of the html
> > page but, the problem is that both report manager and the rendered report
> > coexist in the same window( I mean different frames for each of them ) I
> > don't know how to add some javascript code into the frame or page or whatever
> > the report lives in.
> > Any help will be appreciated.|||Hi,
are you using 2000 or 2005 reporting service?
in 2000 there is only one iframe so you can just use
window.frames.item(0)
or
window.document.getElementById(framid) if it is 2005
hope it helps
"jhcp" wrote:
> Hi Bava,
> thanks for your answer but, how can I know which frame contains the rendered
> report?.
> The htc file I coded is the following
> <public:component tagName="test1">
> <PUBLIC:ATTACH EVENT="oncontextmenu" onevent="f_CancelEvent()" />
> <PUBLIC:ATTACH EVENT="onselectstart" onevent="f_CancelEvent()" />
> <PUBLIC:ATTACH EVENT="ondragstart" onevent="f_CancelEvent()" />
> </public:component>
> <SCRIPT language="javascript">
> function f_CancelEvent()
> {
> event.returnValue = false;
> }
> </script>
> After that, I reference that piece of code in a css file as following
> body {
> margin: 0;
> background-color: White;
> font-family: Verdana, Sans-Serif;
> font-size: x-small;
> behavior: url(../js/test1.htc);
> }
>
> "Bava Mani" wrote:
> > Hi
> > in the htc you can access the frame page which contain the report and the
> > report manager using the javascript dhtml code.
> > you can use like
> > frame[0].document.
> > or window.document.getelementbyID['asd'].
> > you dont have to insert script in the frame
> > you can put all the code in htc to call the code..
> >
> > "jhcp" wrote:
> >
> > > Hi all,
> > > Does anyone knows how can I add some javascript code into the html page
> > > which contains a report into the report manager?.
> > > Let's the following scenario, suppose that any user wants to execute some
> > > reports from report manager, first the user goes to http://server/reports
> > > after that he/she will be at home page configured due to his/her profile, the
> > > user select a report with a click and, he/she executes it. The report will be
> > > rendered in html inside the same window where the report manager is, but in
> > > different frame.
> > > I know using both htc and css files I can modify some behavior of the html
> > > page but, the problem is that both report manager and the rendered report
> > > coexist in the same window( I mean different frames for each of them ) I
> > > don't know how to add some javascript code into the frame or page or whatever
> > > the report lives in.
> > > Any help will be appreciated.|||Hi Bava,
I'm using SSRS 2000.
Actually, I don't know how can I reference the iframe from htc file. Let me
explain.
What I want to do is to disable select any text or image inside the report
frame and, disable contextual menu too, that's why I posted the code
yesterday.
Could you please help me to do that?
I really appreciated your help.
"Bava Mani" wrote:
> Hi,
> are you using 2000 or 2005 reporting service?
> in 2000 there is only one iframe so you can just use
> window.frames.item(0)
> or
> window.document.getElementById(framid) if it is 2005
> hope it helps
> "jhcp" wrote:
> > Hi Bava,
> > thanks for your answer but, how can I know which frame contains the rendered
> > report?.
> > The htc file I coded is the following
> >
> > <public:component tagName="test1">
> > <PUBLIC:ATTACH EVENT="oncontextmenu" onevent="f_CancelEvent()" />
> > <PUBLIC:ATTACH EVENT="onselectstart" onevent="f_CancelEvent()" />
> > <PUBLIC:ATTACH EVENT="ondragstart" onevent="f_CancelEvent()" />
> > </public:component>
> > <SCRIPT language="javascript">
> > function f_CancelEvent()
> > {
> > event.returnValue = false;
> > }
> > </script>
> > After that, I reference that piece of code in a css file as following
> >
> > body {
> > margin: 0;
> > background-color: White;
> > font-family: Verdana, Sans-Serif;
> > font-size: x-small;
> > behavior: url(../js/test1.htc);
> > }
> >
> >
> >
> > "Bava Mani" wrote:
> >
> > > Hi
> > > in the htc you can access the frame page which contain the report and the
> > > report manager using the javascript dhtml code.
> > > you can use like
> > > frame[0].document.
> > > or window.document.getelementbyID['asd'].
> > > you dont have to insert script in the frame
> > > you can put all the code in htc to call the code..
> > >
> > > "jhcp" wrote:
> > >
> > > > Hi all,
> > > > Does anyone knows how can I add some javascript code into the html page
> > > > which contains a report into the report manager?.
> > > > Let's the following scenario, suppose that any user wants to execute some
> > > > reports from report manager, first the user goes to http://server/reports
> > > > after that he/she will be at home page configured due to his/her profile, the
> > > > user select a report with a click and, he/she executes it. The report will be
> > > > rendered in html inside the same window where the report manager is, but in
> > > > different frame.
> > > > I know using both htc and css files I can modify some behavior of the html
> > > > page but, the problem is that both report manager and the rendered report
> > > > coexist in the same window( I mean different frames for each of them ) I
> > > > don't know how to add some javascript code into the frame or page or whatever
> > > > the report lives in.
> > > > Any help will be appreciated.

Thursday, February 16, 2012

add a reference in scriptComponent

I would like to use a custom build class library written in C# inside of the vb script. Does anyone know how to add the reference to the scriptComponent project once you open script through design script button?

By the way I am using visul studio 2005.

Thanks!

Jun,

You'll need to have your class assembly added to the GAC. Procedure here.

After that, you can add it by selecting the Project > Add Reference... in the opened script editor.

|||

That's not the only thing that you need to do. Read this:

VSA requires DLLs to be in the Microsoft.Net folder (but not all the time)

(http://blogs.conchango.com/jamiethomson/archive/2005/11/02/SSIS_3A00_-VSA-requires-DLLs-to-be-in-the-Microsoft.Net-folder-_2800_but-not-all-the-time_2900_.aspx)

-Jamie

|||It may also be valuable to point out that this same process can be used to call web services from script components/tasks as well (helpful for complete control over web service calls instead of using limited built in SSIS web service task). You can use wsdl.exe to create the proxy class then go through the same steps outlined above.|||

ADMariner wrote:

It may also be valuable to point out that this same process can be used to call web services from script components/tasks as well (helpful for complete control over web service calls instead of using limited built in SSIS web service task). You can use wsdl.exe to create the proxy class then go through the same steps outlined above.

And (in case anyone is still reading/interested Smile ) in Katmai you'll be able use Web References just as you can in Visual Studio today. So no need to even use WSDL.exe

-Jamie

|||Thanks a lot! I will try.|||

I installed my dll into GAC and also put it under .net directory. But when I add reference to my dll in ScriptCommponent project. Before adding any code , I could not save project anymore. It complained "Object reference not set to an instance of an object". Anyone know what I missing here?

Thanks!

|||

Jun Fan wrote:

I installed my dll into GAC and also put it under .net directory. But when I add reference to my dll in ScriptCommponent project. Before adding any code , I could not save project anymore. It complained "Object reference not set to an instance of an object". Anyone know what I missing here?

Thanks!

You don't actually have to save the project. Just closing down VSA will store all of the code within your script task/component.

Try just doing that and see if you still run into problems.

-Jamie

|||

Wow, it works without save project. I can't believe it. Thanks very very much!

I am new from java world to window world. Do you mind light me some more?

What I am trying to do is that taking input columns and using script to build a object that my webservice recogonized and serialized object and store serialized data to database. I used transformation type of scriptComponent, and added output column named serializedObject as Byte Stream type from ScriptComponent. In VB script serializedObject is byte[] , so I assign byte[] return from serializing object to it. But when I run intergation service I go error complain "The value is too large to fit in the column data area of the buffer."

Anybody have suggestion?

Thanks!

|||

Jun Fan wrote:

Wow, it works without save project. I can't believe it. Thanks very very much!

I am new from java world to window world. Do you mind light me some more?

What I am trying to do is that taking input columns and using script to build a object that my webservice recogonized and serialized object and store serialized data to database. I used transformation type of scriptComponent, and added output column named serializedObject as Byte Stream type from ScriptComponent. In VB script serializedObject is byte[] , so I assign byte[] return from serializing object to it. But when I run intergation service I go error complain "The value is too large to fit in the column data area of the buffer."

Anybody have suggestion?

Thanks!

The default length of the byte stream type (i.e. DT_BYTES) when you add a column of that type to the script component is 50. My guess is that the length of the value you are tryig to put in there is more than 50.

-Jamie