Showing posts with label click. Show all posts
Showing posts with label click. Show all posts

Monday, March 19, 2012

How to create a PopUp Report

Hi Friends,

No I m not looking for a drill down report.

I want a hiperlink on my country sales reports. When user will click on this hiperlink one popup window will open(Popup report). This popup report will contain some input parameter eg list box of sales person name and list of country to be selected select.

One user will select country germany and sales person as Mr Bin and click go on the poup report I want the popup report to be closed and based on the input(country germany and sales person as Mr Bin ) want my country sales reports to get updated.

Hope you undestand my qn.

thanks

Novin

You should be able to achieve this, except the popup would not be a report. It would need to be some custom html page that collects user input and then submits it to opener page with the selection.

To navigate to the popup:

In your report add a textbox with an action of "Jump to URL" and set this to

javascript:window.open()

OR

javascript:window.showModalDialog()

To pass parameters from the popup:

Call a javascript function onclick of the submit button that does something like

Code Snippet

function loadReport(param1)

{

window.opener.location.href = opener.location.href + "&param1=" + param1;

window.opener.focus();

window.close();

}

I've not tried this but theoretically it should work.

|||Hi Adam,

Thanks a lot for your kind and quick reply.

I will try this out. One qn. then the popup page(which must not be a report) need to be a php or JSP page which will have some database connection code and it will fill the input parameters listboxes.

Correct me if I am wrong and also suggest me the popup page implementation bcas I m new to microsoft technologies.

Thanks
Novin
|||

You are in control of the popup and it's implementation is totally up to you as long as your web server can handle it. Possible options are:

static html with hard coded lists of options

dynamic webpage, the technology is immaterial but you're likely to get better integration using ASP.NET 2.0

parametrs could be queried directly from database tables

OR you can connect to the RS web service and use the queries and connections defined within the report RDL to retrieve a collection of ValidValues (recommended)

|||Hi Adam,

As per your explaination it looks possible to me.

But I have one more doubt regarding the parameter passing to the parent report from the popup report and auto refreshing the parent report.

Using following code I can pass the selectede parameters back to the detail report but I want that detail report be get refreshed(hit the dabase and re executing the report sql) without user intervantion with new parameters. Is that possible or the user need to manually again click the some controll to get the new data with passed parameters from the popup page.

function loadReport(param1)

{

window.opener.location.href = opener.location.href + "&param1=" + param1;

window.opener.focus();

window.close();

}

Thanks
Novin
|||

Whenever you change the value of location.href in javascript IE automatiacally posts back. This would be driven from the javascript and no user intervention is required.

How to create a PopUp Report

Hi Friends,

No I m not looking for a drill down report.

I want a hiperlink on my country sales reports. When user will click on this hiperlink one popup window will open(Popup report). This popup report will contain some input parameter eg list box of sales person name and list of country to be selected select.

One user will select country germany and sales person as Mr Bin and click go on the poup report I want the popup report to be closed and based on the input(country germany and sales person as Mr Bin ) want my country sales reports to get updated.

Hope you undestand my qn.

thanks

Novin

You should be able to achieve this, except the popup would not be a report. It would need to be some custom html page that collects user input and then submits it to opener page with the selection.

To navigate to the popup:

In your report add a textbox with an action of "Jump to URL" and set this to

javascript:window.open()

OR

javascript:window.showModalDialog()

To pass parameters from the popup:

Call a javascript function onclick of the submit button that does something like

Code Snippet

function loadReport(param1)

{

window.opener.location.href = opener.location.href + "&param1=" + param1;

window.opener.focus();

window.close();

}

I've not tried this but theoretically it should work.

|||Hi Adam,

Thanks a lot for your kind and quick reply.

I will try this out. One qn. then the popup page(which must not be a report) need to be a php or JSP page which will have some database connection code and it will fill the input parameters listboxes.

Correct me if I am wrong and also suggest me the popup page implementation bcas I m new to microsoft technologies.

Thanks
Novin
|||

You are in control of the popup and it's implementation is totally up to you as long as your web server can handle it. Possible options are:

static html with hard coded lists of options

dynamic webpage, the technology is immaterial but you're likely to get better integration using ASP.NET 2.0

parametrs could be queried directly from database tables

OR you can connect to the RS web service and use the queries and connections defined within the report RDL to retrieve a collection of ValidValues (recommended)

|||Hi Adam,

As per your explaination it looks possible to me.

But I have one more doubt regarding the parameter passing to the parent report from the popup report and auto refreshing the parent report.

Using following code I can pass the selectede parameters back to the detail report but I want that detail report be get refreshed(hit the dabase and re executing the report sql) without user intervantion with new parameters. Is that possible or the user need to manually again click the some controll to get the new data with passed parameters from the popup page.

function loadReport(param1)

{

window.opener.location.href = opener.location.href + "&param1=" + param1;

window.opener.focus();

window.close();

}

Thanks
Novin
|||

Whenever you change the value of location.href in javascript IE automatiacally posts back. This would be driven from the javascript and no user intervention is required.

How to create a PopUp Report

Hi Friends,

No I m not looking for a drill down report.

I want a hiperlink on my country sales reports. When user will click on this hiperlink one popup window will open(Popup report). This popup report will contain some input parameter eg list box of sales person name and list of country to be selected select.

One user will select country germany and sales person as Mr Bin and click go on the poup report I want the popup report to be closed and based on the input(country germany and sales person as Mr Bin ) want my country sales reports to get updated.

Hope you undestand my qn.

thanks

Novin

You should be able to achieve this, except the popup would not be a report. It would need to be some custom html page that collects user input and then submits it to opener page with the selection.

To navigate to the popup:

In your report add a textbox with an action of "Jump to URL" and set this to

javascript:window.open()

OR

javascript:window.showModalDialog()

To pass parameters from the popup:

Call a javascript function onclick of the submit button that does something like

Code Snippet

function loadReport(param1)

{

window.opener.location.href = opener.location.href + "&param1=" + param1;

window.opener.focus();

window.close();

}

I've not tried this but theoretically it should work.

|||Hi Adam,

Thanks a lot for your kind and quick reply.

I will try this out. One qn. then the popup page(which must not be a report) need to be a php or JSP page which will have some database connection code and it will fill the input parameters listboxes.

Correct me if I am wrong and also suggest me the popup page implementation bcas I m new to microsoft technologies.

Thanks
Novin
|||

You are in control of the popup and it's implementation is totally up to you as long as your web server can handle it. Possible options are:

static html with hard coded lists of options

dynamic webpage, the technology is immaterial but you're likely to get better integration using ASP.NET 2.0

parametrs could be queried directly from database tables

OR you can connect to the RS web service and use the queries and connections defined within the report RDL to retrieve a collection of ValidValues (recommended)

|||Hi Adam,

As per your explaination it looks possible to me.

But I have one more doubt regarding the parameter passing to the parent report from the popup report and auto refreshing the parent report.

Using following code I can pass the selectede parameters back to the detail report but I want that detail report be get refreshed(hit the dabase and re executing the report sql) without user intervantion with new parameters. Is that possible or the user need to manually again click the some controll to get the new data with passed parameters from the popup page.

function loadReport(param1)

{

window.opener.location.href = opener.location.href + "&param1=" + param1;

window.opener.focus();

window.close();

}

Thanks
Novin
|||

Whenever you change the value of location.href in javascript IE automatiacally posts back. This would be driven from the javascript and no user intervention is required.

Monday, March 12, 2012

How to create a new SQL account that just has rights to a specific database?

Gurus,
You know how in SQL Enterprise Manager you click on Databases node and see
all the databases? And that the SA account has full access to all of these?
Well, if, from here on out, I wanted to create a database that beside the SA
account had a separate account that had public and DB owner rights on it,
how would I create such a SQL account? I guess what I am asking is how to
create new SQL accounts.
--
SpinHi
Check out the topic "Managing Security" in Books Online. To add a login to
your server see sp_grantlogin. To grant access to a database use
sp_grantdbaccess, to add users to a role see sp_addrolemember.
John
"Spin" wrote:
> Gurus,
> You know how in SQL Enterprise Manager you click on Databases node and see
> all the databases? And that the SA account has full access to all of these?
> Well, if, from here on out, I wanted to create a database that beside the SA
> account had a separate account that had public and DB owner rights on it,
> how would I create such a SQL account? I guess what I am asking is how to
> create new SQL accounts.
> --
> Spin
>
>|||Can this be done via the GUI?
--
Spin
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7783F616-4217-43D6-845A-B111A1DA042C@.microsoft.com...
> Hi
> Check out the topic "Managing Security" in Books Online. To add a login to
> your server see sp_grantlogin. To grant access to a database use
> sp_grantdbaccess, to add users to a role see sp_addrolemember.
> John
> "Spin" wrote:
>> Gurus,
>> You know how in SQL Enterprise Manager you click on Databases node and
>> see
>> all the databases? And that the SA account has full access to all of
>> these?
>> Well, if, from here on out, I wanted to create a database that beside the
>> SA
>> account had a separate account that had public and DB owner rights on it,
>> how would I create such a SQL account? I guess what I am asking is how
>> to
>> create new SQL accounts.
>> --
>> Spin
>>|||You first need to create a login for the account and then define the
account in the database. The general steps (In Enterprise Manager) are:
1) Expand the nodes on the left hand side of the console until you find
your SQL Server instance (e.g. \\CompName\InstanceName)
2) Expand the node for the instance & you should see a sub-node called
"Security". Expand the "Security" node and you should see a "Logins"
sub-node
3) Right click on the "Logins" node and select "New Login..." After
doing this the "New Login" window will appear
4) In the "New Login" window type in the name of the server login,
select the authentication type and set the default database (you
shouldn't need to worry about the default language)
5) Inthe "New Login" window, click on the "Database Access" tab to
bring up a list of databases on the server
6) Check the "Permit" text box next to the database you want to give
access to. A name for the user (same as the server login defined
previously) will appear next to the database name...Generally no need
to change this
NOTE: By default the server login will have access to a database on the
server IF the database has the "guest" account in it. If there is no
guest account then you need to explicitly give access as I've detailed
just now.
7) You'll notice in the bottom of the window that there is a list of
database roles. Your user will be in the "Public" role by default.
Select whatever roles are necessary.
8) That should be about it. Click OK to complete the process.
After doing the above steps you will have a server login that people
can use. This will have access to the database(s) you granted access to
in Step (6) with an access level as per the permissions you granted in
Step (7).
Hope that helps a little.|||That's great. With those steps, I do not need to go through the process of
sp_grantlogin, sp_grantdbaccess, and sp_addrolemember I take it?
Spin
<nate.vu@.gmail.com> wrote in message
news:1146956260.908362.69190@.i40g2000cwc.googlegroups.com...
> You first need to create a login for the account and then define the
> account in the database. The general steps (In Enterprise Manager) are:
> 1) Expand the nodes on the left hand side of the console until you find
> your SQL Server instance (e.g. \\CompName\InstanceName)
> 2) Expand the node for the instance & you should see a sub-node called
> "Security". Expand the "Security" node and you should see a "Logins"
> sub-node
> 3) Right click on the "Logins" node and select "New Login..." After
> doing this the "New Login" window will appear
> 4) In the "New Login" window type in the name of the server login,
> select the authentication type and set the default database (you
> shouldn't need to worry about the default language)
> 5) Inthe "New Login" window, click on the "Database Access" tab to
> bring up a list of databases on the server
> 6) Check the "Permit" text box next to the database you want to give
> access to. A name for the user (same as the server login defined
> previously) will appear next to the database name...Generally no need
> to change this
> NOTE: By default the server login will have access to a database on the
> server IF the database has the "guest" account in it. If there is no
> guest account then you need to explicitly give access as I've detailed
> just now.
> 7) You'll notice in the bottom of the window that there is a list of
> database roles. Your user will be in the "Public" role by default.
> Select whatever roles are necessary.
> 8) That should be about it. Click OK to complete the process.
> After doing the above steps you will have a server login that people
> can use. This will have access to the database(s) you granted access to
> in Step (6) with an access level as per the permissions you granted in
> Step (7).
> Hope that helps a little.
>|||Yes, that's correct...The above steps are for the GUI (Enterprise
Manager if you're on SQL Server 2000). Calling the stored procs is the
equivalent way of doing it by using T-SQL statements and using
something like Query Analyzer to execute them.
Both methods will achieve the same results.
Hope that helps a little.|||Hi
If you need to do this regularly then it will be a lot quicker if you use a
script and query analyser. The section on managing security in Books Online
will give you background information as well as tell you the different ways
of carrying out these activities this includes how to use Enterprise Manager.
John
"Spin" wrote:
> That's great. With those steps, I do not need to go through the process of
> sp_grantlogin, sp_grantdbaccess, and sp_addrolemember I take it?
>
> --
> Spin
>
> <nate.vu@.gmail.com> wrote in message
> news:1146956260.908362.69190@.i40g2000cwc.googlegroups.com...
> > You first need to create a login for the account and then define the
> > account in the database. The general steps (In Enterprise Manager) are:
> >
> > 1) Expand the nodes on the left hand side of the console until you find
> > your SQL Server instance (e.g. \\CompName\InstanceName)
> >
> > 2) Expand the node for the instance & you should see a sub-node called
> > "Security". Expand the "Security" node and you should see a "Logins"
> > sub-node
> >
> > 3) Right click on the "Logins" node and select "New Login..." After
> > doing this the "New Login" window will appear
> >
> > 4) In the "New Login" window type in the name of the server login,
> > select the authentication type and set the default database (you
> > shouldn't need to worry about the default language)
> >
> > 5) Inthe "New Login" window, click on the "Database Access" tab to
> > bring up a list of databases on the server
> >
> > 6) Check the "Permit" text box next to the database you want to give
> > access to. A name for the user (same as the server login defined
> > previously) will appear next to the database name...Generally no need
> > to change this
> >
> > NOTE: By default the server login will have access to a database on the
> > server IF the database has the "guest" account in it. If there is no
> > guest account then you need to explicitly give access as I've detailed
> > just now.
> >
> > 7) You'll notice in the bottom of the window that there is a list of
> > database roles. Your user will be in the "Public" role by default.
> > Select whatever roles are necessary.
> >
> > 8) That should be about it. Click OK to complete the process.
> >
> > After doing the above steps you will have a server login that people
> > can use. This will have access to the database(s) you granted access to
> > in Step (6) with an access level as per the permissions you granted in
> > Step (7).
> >
> > Hope that helps a little.
> >
>
>

Friday, March 9, 2012

How to create a DTS package in SQL 2005?

How Do I create a package in SQL Server2005? I have the eval copy. I saw an icon for DTS in Management Studio but when right click there is no option for New.

SSIS is the way to go in SQL 2005. DTS is pretty much phased out in SQL 2005, and but is supported for backward compatibility. See topic "Upgrading or Migrating Data Transformation Services" for more information.

How to create a button in Reports

Hello every one,
I am using reports 10g.In the Run time parameter form after given the
values for the parameters, i want to click a button so that the report
can run. we already have an option in the menu bar of the Run time
parameter form to run the report but our customers specfically needs
the button option. So how to create a Button in the Run time parameter
form?
Can anyone please help me on this,
Thanks
Balaji.On Nov 6, 12:27 am, rampal...@.gmail.com wrote:
> Hello every one,
> I am using reports 10g.In the Run time parameter form after given the
> values for the parameters, i want to click a button so that the report
> can run. we already have an option in the menu bar of the Run time
> parameter form to run the report but our customers specfically needs
> the button option. So how to create a Button in the Run time parameter
> form?
> Can anyone please help me on this,
> Thanks
> Balaji.
If you want to mix HTML Forms with ReportingServices Reports, I
suggest using ASP.NET. This way:
1. the page renders on your IIS server and is callable from a URL
2. you can have an HTML form with Inputs & Submit button
3. the Submit posts back to the IIS server which returns a page with
a RS Object rendered as an IFRAME in the HTML (ReportViewer I think it
is called)
4. The IIS takes the parameters from the URL using Request objects,
then passes those as Parameters to the ReportViewer object, which then
calls the Reporting Services RDL file, which renders in the web page.
Down side is that the report cannot be deployed to the Reporting
Services Server, but can be Navigated to via a URL to the ASP.NET
folder on your web server.
-- Scott

Friday, February 24, 2012

How to copy table in SQL Server 2000?

I want to make an exact copy of a table in SQL Server 2000.
If I right click on the table I can select copy, but paste does not show up?Hi

You're probably better off right clicking the database itself (in Enterprise Manager), and selecting All Tasks | Import Data. Even though the data source and destination are the same, you can make it copy to a table with a new name. When you get to the list of available tables, check the one you want then alter the destination to a new name - click on transform to get an idea of what's going on.
I find that I need to setup my identities and keys again, but otherwise works well.

An alternative would be to copy the table as you've done, then use the above to pull data into it (or an insert statement).|||How about just "select * into new_table from old_table"?|||rd is exactly right that syntax would do... 'Select * INTO'|||I was able to do it that way. I was wondering if there is an easy way to just copy and paste - similar to how you would do it in access.
I guess I don't understand why you can copy a table but not paste it.|||When you right-click copy a table name in Enterprise Manager, you are only copying the table design. If you go to your Query Analyzer window and paste, you will see the create table statement for that table. This is functionally equivalent to right-clicking on the table in the Query Analyzer object browser and choosing "Script object to Clipboard As >> Create."|||Be aware that "select * into new_table from old_table" does not make an exact copy of the TABLE. It makes an exact copy of the DATA. Any indexes, foreign keys, or triggers associate with the table will not be created.|||i think the effective question is the one we always end up asking

What do you want to copy a table for ?
or
what are you trying to do and maybe we can help you find an easier way to do it.