|
How about a seperate report for the FD which shows 4 DP?
Or, just ODBC into Sage and enter the figures yourself.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Richard Deeming wrote:
How about a seperate report for the FD which shows 4 DP?
It seems that using numeric(9,2) rounds it better. The other options you mentioned are also under consideration.
However, I was wondering how people like banks do it. They round our statements to 2 dec places, and yet they aren't usually out by a penny if you add them up (never in my experience anyway)
Throw in a bit of S&M or eye-ball sucking-Paul Watson on the merits of swearing, sex and obscenities in CP posts
...they assumed that reasonably intelligent adults would know enough to leave the building if it was burning. Those who did not were, presumably, expendable, and there was less paperwork involved than trying to fire them-Roger Wright on fire drills at work
|
|
|
|
|
In that case, they probably round (or more likely, truncate) the numbers before summing them.
You could do the same thing by using the VBScript Round or Fix functions, or the SQL ROUND function:- Round:
- VBScript: <nobr>
value = Round(value, 2) - TSQL: <nobr>
SET value = ROUND(value, 2)
- Truncate:
- VBScript: <nobr>
value = Fix(value * 100) / 100 - TSQL: <nobr>
SET value = ROUND(value, 2, 1)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Hi,
I am able to successfully detect and prevent KeyPresses for Page Refresh, Back and Forward Navigation. But since the toolbar is visible, I am not able to detect whether the Toolbar Counterpart of the above functionality has been activated or not. Meaning, I can detect and halt F5 or CTRL-R to prevent refreshes, but user can still click Refresh Toolbar button to refresh the page.
How to prevent this from happening?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Is opening a new window an option?
By opening a new window you can take out parts of the window that you don't want ... here is Microsoft's reference[^] for window.open()
A trick that can be used (I use this for a web app I made) is to have a simple page that opens the real page (main application) that you want in a new window, just without certain parts.
The problem is that (at least in IE) when you want to close the opening window with window.close() a message box will appear saying, "The Web page you are viewing is trying to close the window." and give you a yes or no option to let it do what it wants.
The trick, or fix, is to set window.opener = "something" which makes IE think that the window that is open must be a child window of something ... then you can kill it with ease
Hope this is something you can use ...
Wally Atkins Newport News, VA, USA
|
|
|
|
|
Hi, I need to:
1. User click data grid - first column is MsgID (GUID or uniqueidentifier) - it's effectively a row ID.
2. Client side script is invoked. The following happens within this client side handler.
2a. MsgID is retrieved
2b. MsgID is added to the form's collection of hidden variables on the fly.
2c. my_form.Submit();
3. One additional requirement: OnMouseOver for each ROW, I need to set the bgColor of that row to a different color. Then reset OnMouseOut.
I have posted these questions somewhere else. The following is the response PLUS my specific problem in achieving the above objectives.
<script language="jscript">
doDataGridClick(sourceButton, objForm)
{
STEP 1: How can I retrieve the row which has been clicked?
var strRowID = sourceButton.name; ??? Is this... anywhere close? I have the code to do this under C# server-side scenario but never done it on client side. I'm not familiar with DataBinder.Eval (BELOW in asp:itemTemplate) - I'm reading up on it now, but for this to work for me, I need to extract MsgID (first column on my datagrid - a hidden column. Datatype=uniqueidentifier - which I convert to string in C# in server side scenario.)
STEP 2: I need to add hidden variable to the form on the fly - I can do this provided I have objForm.
var objInput=document.createElement("Input");
objInput.type = "hidden";
objInput.name = "rowID";
objInput.value = strRowID;
objForm.appendChild(objInput);
STEP 3: Submit the form and post the hidden variables.
document.my_form1.Submit();
Or should I do:
objForm.Submit();
}
</script>
...
<asp:datagrid id="dg">
...
<asp:TemplateColumn HeaderText="Detail">
<itemtemplate><button name='<%# DataBinder.Eval(Containter.DataItem, "ColumnName") %>' onclick="doDataGridClick(this, this_form)"></itemtemplate>
</asp:TemplateColumn>
QUESTION 3: How do I get "this_form" as argument?... should I use 'document.my_form1' instead? Single quote? Double quote?
...
</asp:datagrid>
QUESTION 4: The solution provided requires a "button" column. What if I want to extract the row identifier (MsgID in GUID converted to string preferably), then post it along with other hidden form variables to another pages WHEN the user click on ANY cell in a row?
QUESTION 5: I need to set do:
<tr style="cursor:hand" OnMouseOver="this.bgColor='LightSteelBlue'" OnMouseOut="this.bgColor='Ivory'" OnMouseDown="SomeClientSideFunction()"><td align=center>
Where should I do this? There's no <tr> tags to work with in .NET realm...
This is a pretty lengthy list of questions, if you dont have time, please refer me to some article which you think is helpful given my particular situation.
Thanks!
|
|
|
|
|
hi,
I am getting the error when i run the asp page:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'Excel.Application'
i have written:
Dim ExcelFace
Set ExcelFace = CreateObject("Excel.Application")
and the excel driver has been installed,Can any one Please help me how to fix this problem?Is there any dll for excel so that i can download that and use it?I require all of ur help please.
Thanks for all in advance
|
|
|
|
|
|
Hi
My site in development is using a dynamic system that outputs metatag content and page titles stored in the database for each page, with defaults to catch any situation where no values exist for a particular page.
Now the crunch for me here is that the page is to be aimed at two audiences in particular. International and German speaking.
Currently it is outputing content in english but I need to somehow reliably determine (using ASP3) if the incoming user (or crawler/robot for that instance) is from a german domain so that meta tag content and page titles are in german.
This is especially important (in my situation) for indexing on google.de
Or does it not matter in this instance.
Cheers for any help in this matter.
John
|
|
|
|
|
johncogan wrote:
Currently it is outputing content in english but I need to somehow reliably determine (using ASP3) if the incoming user (or crawler/robot for that instance) is from a german domain so that meta tag content and page titles are in german.
This is especially important (in my situation) for indexing on google.de
Firstly there is no 100% reliable method, some Germans are going to slip through and some non-Germans are going to be tagged as Germans. So make sure you have a "English/German" toggle on the site that people can click.
Ok, if 100% of your traffic is coming from Google.de searches then just do a referrer check. It is available through the ASP Headers.
The other way is to get the IP and then ascertain if it might be of German origin. Have a look at GeoIP right here on CP for this.
Enjoy.
Paul Watson Bluegrass Cape Town, South Africa
Roger Wright wrote:
Using a feather is kinky; using the whole chicken is perverted!
|
|
|
|
|
Cheers for this Paul, on thinking on it, I think trying to seperate the two is going to be difficult so will probably have to translate the site into german at a later date. Now all I need to find is someone who can read/write german :/
Good to see there is a visible SA presence on this site. I am in the UK/London and missing the World Cup
|
|
|
|
|
Look for the "Accept-Language:" HTTP header, and see if it has "de" includes with higher priority than "en"
|
|
|
|
|
Hello guys ...
I am fasing a problem which I am unable to handle. I am using CDONTS object for mailling (since only object support by the server ). I am using HTML fromatting in that mail, when sending mail display on the HOTMAIL it is display good (all HTML formatting is worked) but when i saw this mail in any other mail server like YAHOO and in OUTLOOK box the HTML formatting did not WORK and worse is that the HTML TAGS also displayed in the message.
How can i handle this ... and what i should do ...
Waitting for your urgent reply ....
Thanx in advance
|
|
|
|
|
Ensure that the BodyFormat is set to 0 .
Here is the NewMail Object[^] for reference.
That is the only thing I can think of off-hand. HTH
Wally Atkins Newport News, VA, USA
|
|
|
|
|
Hi Syed Hassan,
Here is the solution.
<br />
<%<br />
dim strMessage myMail<br />
strMessage = "<center>Welcome My Friend</center>"<br />
strMessage = strMessage & "<br><font color=red>How are you?</font>"<br />
Set myMail = Server.CreateObject("CDONTS.NewMail")<br />
myMail.From = "somewhere@anydomain.com"<br />
myMail.To = "somefriend@anyotherdomain.com"<br />
myMail.Subject = "Hello"<br />
myMail.Message = strMessage<br />
myMail.Send<br />
Response.Write("Mail has been sent successfully.")<br />
set myMail = NOTHING<br />
%><br />
Zeeshan Mehmood
|
|
|
|
|
I design website in Dreamweaver MX and want to make a button "Download" so that users can download the file when they need. Please help me what to do.
I have never done it before so thinhking is very difficult. Could you give me the source code of it? (Javascript is OK) .
Any advice or idea appreciated.
Thank you very much in advance.
Thuydinh,
|
|
|
|
|
Thuy Dinh wrote:
I design website in Dreamweaver MX and want to make a button "Download" so that users can download the file when they need. Please help me what to do.
This is another misconception in web dev. I also had it when I first started.
To make a download link, you just use a normal A link. It is then up to the client as to how it is handled. If the link points to an HTML file then the client downloads it and opens it as a "normal" web page. If the link points to a file that the browser does not know how to handle, then it asks you to Save As or Save To or whatever. But it does not open it. That is the only difference when downloading say an HTML file or a Zip.
You can check this idea out by finding a machine that does not have Adobe Acrobat Reader on it, or does not have Microsoft Word. Click a link to one of those docs, you will see it asks to save the file and does not open it in the browser. Because the client does not know how to handle that file.
So you can make a download link like this:
<a href="files/downloadme.zip">Download</a>
Paul Watson Bluegrass Cape Town, South Africa
Roger Wright wrote:
Using a feather is kinky; using the whole chicken is perverted!
|
|
|
|
|
Thank you very much for your kind help me. I'll find what I want now.
Thuydinh,
|
|
|
|
|
|
|
|
Hi Guys,
Want to allow the public to upload jpg files to my webserver.
Does anyone have an ASP file upload component which calls a virus scanner.dll and scan the files as part of the upload process to the webserver? Or scans the files prior to completing the file-upload process? In that way you can send a message back to the web-user that their file contained a virus.
If I use just a normal virus scanner sitting on the server scanning memory, then end users don't get any feedback about the uploaded file. Plus you are left with a virus on your hard drive and hoping that the virus scanner will pick it up on the next scan.
Plus if you are wanting to do something with that file from another automated process and the virus scanner hasn't already killed or cleaned it, then you're in trouble.
Any suggestions??
|
|
|
|
|
Hi Andrew,
You may try this workaround. Normally all antivirus scanners have shell extensions, whereby you can scan from other application and have your application respond to the user depending on particular return value from the AntiVirus software. This way only WinZip works scanning the archives after you configure an antivirus scanner in its configuration.
Here are the steps:
- Use an object to execute the ShellExtension application of the antivirus software passing the file to scan as the argument. You can use http://www.serverobjects.com/ ASPExec too. This is free. For example on ShellExtensions for Antivirus, you may need to check up with the Antivirus Software Help files. For McAfee Viruscan, I think it is C:\Program Files\Common Files\Network Associates\On Demand Scanner\Scan32\scan32.exe. For AVG Antivirus from Grisoft, it is AVGSE.EXE from C:\Program Files\Grisoft\AVG\AVGSE.EXE
- After the file has been scanned, you may check out the return value, which should help you out to find whether the file has been infected or not and then suitably inform the user regarding the same.
Does this solve your doubt?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Thanks for this, will have a look at.
Andrew
|
|
|
|
|
Hi Guys,
Want to allow the public to upload jpg files to my webserver.
Does anyone have an ASP file upload component which calls a virus scanner.dll and scan the files as part of the upload process to the webserver? Or scans the files prior to completing the file-upload process? In that way you can send a message back to the web-user that their file contained a virus.
If I use just a normal virus scanner sitting on the server scanning memory, then end users don't get any feedback about the uploaded file. Plus you are left with a virus on your hard drive and hoping that the virus scanner will pick it up on the next scan.
Plus if you are wanting to do something with that file from another automated process and the virus scanner hasn't already killed or cleaned it, then you're in trouble.
Any suggestions??
Andrewpe
|
|
|
|