Showing posts with label internet. Show all posts
Showing posts with label internet. Show all posts

Wednesday, March 21, 2012

Name of report in title bar?

Hi everybody,
is it possible to show the name of the report in the title bar of
Internet Explorer? My users have muliple IE-applications open, all
with different reports. They would like to see the name of the report
in the windows taskbar instead of "Report Manager - Microsoft Internet
Explorer".
Anybody any thoughts?
Thanks in advance, Vivian.The reason it says Report Manager in the title bar is because the WEB
application sets it to do so. This isnt controlled by the report.
I have a solution for you although it will require some development.
All Reports are generated from the Report.aspx located under the
"ReportManager\Pages\" folder
You CAN add a <title>Report Name</title> title tags in the ASPX file.
The actual ASPX file looks empty, but you can place HTML code in there.
You can write javascript code to read the ItemPath parameter - this is
the parameter for the path of the report. It is in the query string.
This will allow you to get the Report Name.
Then you just use the following code to set the title:
document.title = "Report Name"
regards,
Stas K.|||Here add this into report.aspx:
<script>
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
//alert('Query Variable ' + variable + ' not found');
}
</script>
<script>
var query2 = getQueryVariable("ItemPath")
document.title =query2.substring(query2.lastIndexOf('%2f')+3,query2.length);
</script>|||Heh,
I never thought of this. This helped me too. The executives were very
appriciative.
regards,
Stas K.|||Looks good Stas! Will test it first thing monday morning.
Thanx, Vivian|||Great code.
I extended it a bit, to replace the +s between each word with a space.
This is my updated script:
<script>
// function getQueryVariable and page script found at
//
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/39e5747688f51268/d0a6a49f6891dfd4
// function replace found at
//http://www.rgagnon.com/jsdetails/js-0043.html
//Purpose of code: Replace page title "Report Manager" with the report name
in Report Manager
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
//alert('Query Variable ' + variable + ' not found');
}
function replace(s, t, u) {
/*
** Replace a token in a string
** s string to be processed
** t token to be found and removed
** u token to be inserted
** returns new String
*/
i = s.indexOf(t);
r = "";
if (i == -1) return s;
r += s.substring(0,i) + u;
if ( i + t.length < s.length)
r += replace(s.substring(i + t.length, s.length), t, u);
return r;
}
</script>
<script>
var query2 = getQueryVariable("ItemPath")
query2 = query2.substring(query2.lastIndexOf('%2f')+3,query2.length);
query2 = replace(query2, '+', ' ');
document.title =query2
</script>
- Again, great idea and great code. :)
Kaisa M. Lindahl Lervik
"Sorcerdon" <sorcerdon@.gmail.com> wrote in message
news:1144426083.140501.223890@.v46g2000cwv.googlegroups.com...
> Here add this into report.aspx:
> <script>
> function getQueryVariable(variable) {
> var query = window.location.search.substring(1);
> var vars = query.split("&");
> for (var i=0;i<vars.length;i++) {
> var pair = vars[i].split("=");
> if (pair[0] == variable) {
> return pair[1];
> }
> }
> //alert('Query Variable ' + variable + ' not found');
> }
> </script>
> <script>
> var query2 = getQueryVariable("ItemPath")
> document.title => query2.substring(query2.lastIndexOf('%2f')+3,query2.length);
> </script>
>|||Hello I am trying this function and it is not working for me. I get a
javascript error message that says query2 is null or not an object. What am I
missing?
Thanks!
--
Kevin
"Sorcerdon" wrote:
> Here add this into report.aspx:
> <script>
> function getQueryVariable(variable) {
> var query = window.location.search.substring(1);
> var vars = query.split("&");
> for (var i=0;i<vars.length;i++) {
> var pair = vars[i].split("=");
> if (pair[0] == variable) {
> return pair[1];
> }
> }
> //alert('Query Variable ' + variable + ' not found');
> }
> </script>
> <script>
> var query2 = getQueryVariable("ItemPath")
> document.title => query2.substring(query2.lastIndexOf('%2f')+3,query2.length);
> </script>
>

Wednesday, March 7, 2012

my whole company and customer info/credit cards on the internet

I've been searching for a new ERP solution for my company for a while and I
think I've finally found the best one for us. But now I'm being cautioned
about some things so I need some good arguments about how I should setup the
database server.
The application is written in .net it is a N tiered application (I guess
that's what it's called) and it also has a tightly integrated commerce site.
The system was designed to work best with the app db and commerce db on the
same sql server. Desktop clients can connect by internet access if that
server isn't on the LAN and the website can even connect to the LAN but this
obviously wouldn't work because we're only using DSL here.
I've been cautioned that I shouldn't have internet access on my database
server. I somewhat understand the reasoning for this but to me it seems most
data is about as secure as the applications that access them in the first
place. So even if I had a state of the art network in place, a security flaw
in the app could screw me over regardless.
What is good business security practice for handling/storing sensitive
customer information on the internet and what is overkill/paranoia? This is
a serious questions so I'd appreciate not to be mocked.
I'm not a DBA so maybe I'm a little off on my terms, feel free to correct me
where I'm wrong. But it seems to me that if didn't use the same db server
for both the website and main system I'd have a lot of extra work like
replicating web data to web enabled sql server in our office and from the
"live server" on our LAN and then back again.
Thanks in advance for your advice/criticism/suggestions.
RobertForgot to mention. I was assuming to set it up like this
[dedicated sql server] - the only port enabled on this box is for mssql
would probably use a non default port
[dedicated web/email/application server] ports, email and web/ssl
(25/80/110/443)|||Normally what you do is expose the middle-tier (or even yet another system)
to the Internet, and then you only allow that system to connect to your
database server. Yes, if that system is compromised, there can also be
issues, but if you code correctly the only things exposed would be those tha
t
stored procedures or view expose. There are several good books on designing
secure web applications, so I suggest you check out your local bookstore for
one that fits your style.
"Rob" wrote:

> I've been searching for a new ERP solution for my company for a while and
I
> think I've finally found the best one for us. But now I'm being cautioned
> about some things so I need some good arguments about how I should setup t
he
> database server.
> The application is written in .net it is a N tiered application (I guess
> that's what it's called) and it also has a tightly integrated commerce sit
e.
> The system was designed to work best with the app db and commerce db on th
e
> same sql server. Desktop clients can connect by internet access if that
> server isn't on the LAN and the website can even connect to the LAN but th
is
> obviously wouldn't work because we're only using DSL here.
> I've been cautioned that I shouldn't have internet access on my database
> server. I somewhat understand the reasoning for this but to me it seems mo
st
> data is about as secure as the applications that access them in the first
> place. So even if I had a state of the art network in place, a security fl
aw
> in the app could screw me over regardless.
> What is good business security practice for handling/storing sensitive
> customer information on the internet and what is overkill/paranoia? This i
s
> a serious questions so I'd appreciate not to be mocked.
> I'm not a DBA so maybe I'm a little off on my terms, feel free to correct
me
> where I'm wrong. But it seems to me that if didn't use the same db server
> for both the website and main system I'd have a lot of extra work like
> replicating web data to web enabled sql server in our office and from the
> "live server" on our LAN and then back again.
> Thanks in advance for your advice/criticism/suggestions.
> Robert
>
>