|
I m working in ASP.Net (1.0 Version ) in that i have problem
with reporting . Is there any better tool for reporting specially for Cross Tab Reports other than Crystal (Version 11.0)? In this Crystal Report, we are unable to make it in more customizable form like colors coombination for columns when particular condition is met.
|
|
|
|
|
image is stored in "C:\ms4w\apps\Dhanbad\map\map.PNG" this folder
now i want to give an option to the user ,so that they can download this map.png in their specified folder.
plz tell me the code
|
|
|
|
|
Just use an hyperlink with target as the path specified or use Response.Redirect(path).
|
|
|
|
|
Hi All,
I am developing a website using asp.net 2.0 and MSAccess.
it in under construction, but I want to test it.
It is for intranet purpose only,.
My application runs only when I open Visual Studio -> start debugging
If I stop debugging and close the Visual Studio, the browser shows "The page cannot be displayed".
How can I run it from another pc in my intranet ( for MSAccess as backend )
Any help is appreciated.
Thanks
Bye
Bajrang
Using .net 2.0 (VS2005)
|
|
|
|
|
Hi there,
You have to publish website in Build menu...
<< >>
|
|
|
|
|
salam,
I have a web page which have some field like first name ane lastname address etc that is save in a database table i have i also print button. I want when i will press the print button than a report generate and printer print the the report, without opening the print dialog.just i press the button and printer print the reports. i am wainting ur response.
suhail shahab
|
|
|
|
|
You can't.
Quite correctly, things are set up so that you, as a web programmer, can't do things on the user's machine without them allowong it - imagine if you could do what you want: you'd find web-pages suddenly sending out all sorts of nonsense to your printer - advertising gibberish, porn.. all sorts...
And anyway, the user may want to select print settings first - page size and type, draft or print mode etc
cheers
Fred
|
|
|
|
|
Hello All,
I'm getting the following error message in my ASP program.
Microsoft VBScript runtime error '800a0046'
Permission denied
/monthly/holdingsMD.asp, line 141
Previously this code is working fine on a different machine for years. Now we shifted this application to a new machine and got the above error message when we tried to insert some values from a file. The other pages in this application are working fine on the new machine (these pages are retrieving data from database.)
Here is the code were I’m getting the error message:
--------------------------------------------------------------------------------
set myfile=Server.CreateObject("scripting.filesystemobject")
Response.Write holdingspath &" "&mktdatapath& "transaction updated "
'******** Inserting Market data into tbl_mktdata **********
if mktdatapath <> "null" then
'mktdatapath="f:\monthly reports\holdings\01062006.MD" 'Server.MapPath()
set genfile = myfile.OpenTextFile(mktdatapath,1) -->This is line 141
ObjCon.Execute "delete from tbl_mktdata" 'delete previous contents from tbl_mktdata
--------------------------------------------------------------------------------
FYI: This application is running on our local system. With Windows XP Prof. And IIS configured.
Please let me know what is the possible reason for this error.
Many Thanks!!
Jagadeesh
hai all please clarify mny doubts
|
|
|
|
|
As it says: "Permission denied" - You need to get in touch with the administrator of that machine and ask him/her to give your application WRITE permissions on the folder where the files are that you want to write to.
cheers
Fred
|
|
|
|
|
Hi Fred,
The folder, in which the files were there, has all permissions granted to the user . (The user is having full control over the folder.) But still I’m getting the error message.
Please help me; your feedback is greatly appreciated.
Many Thanks!!
Jagadeesh
hi all please clarify my doubts
|
|
|
|
|
You have commented out this line:
'mktdatapath="f:\monthly reports\holdings\01062006.MD" 'Server.MapPath()
So where is the line where mktdatapath is set? Perhaps you have a) not set it at all or b) left it hard-coded pointing to your local machines path.
F
|
|
|
|
|
Fred,
That line of code was commented out.
Here is the full code we are using.
'*********************************** Inserting Market data into tbl_mktdata **************************
if mktdatapath <> "null" then
'mktdatapath="f:\monthly reports\holdings\01062006.MD" 'Server.MapPath()
set genfile = myfile.OpenTextFile(mktdatapath,1)
ObjCon.Execute "delete from tbl_mktdata" 'delete previous contents from tbl_mktdata
response.Write("Clear previous market data in tbl_mktdata <br>")
while not genfile.AtEndofStream
filecontent = genfile.readline
filearray= split(filecontent,",")
'Response.Write filearray(1) & " "&filearray(7) & "<br>"
'insert data into tbl_mktdata file
ObjCon.Execute "insert into tbl_mktdata values ('"&trim(filearray(1))&"',"&cdbl(filearray(7))&")"
wend
response.Write("end of market data<br>")
'' end of market data
else
Response.Write "<table align=center><tr><td height=250><font face=verdana size=2 color=red><b>No Market data File input</b></font></td></tr></table>"
Response.End
end if
'*********************************** End of Inserting Market data ************************************
~Jagadeesh
hi all please clarify my doubts
|
|
|
|
|
Yes, but where is the line that says what mktdatapath is? (Before all the above?)
|
|
|
|
|
Hi Fred,
Here is the code which we have used to set “mktdatapath”
mktdatapath=Request.Form("selmktdata")
For your Ref. I have also pasted the part of the code from the begining of this page below
------------------------------------------------------------------------------
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<STYLE>
a{text-decoration:none;}
</STYLE>
</head>
<BODY TOPMARGIN=10 LEFTMARGIN=10 MARGINHEIGHT="10" MARGINWIDTH="10" BGCOLOR="#ffffff" TEXT="#000000" LINK="#003399" VLINK="#003399" ALINK="#003399">
<OBJECT RUNAT="server" PROGID="ADODB.Connection" id="ObjCon" name="ObjCon"> </OBJECT>
<OBJECT RUNAT="server" PROGID="ADODB.Recordset" id="Objrsrate" name="objrsrate"> </OBJECT>
<br>
<table width=750 border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center>
<!-- Start main content here -->
<table align="center">
<tr>
<td><form action="holdingsMD.asp" method="post" id=form1 name=form1>
<font size="2" face=verdana color="darkBlue"><b>Select Month and Year</b></font>:
</td>
<td> </td>
</tr>
<tr>
<td>
<%
dim mktdatapath,holdingspath,ask
ObjCon.Open "Provider=MSDAORA.1;Password=*****;User ID=******;Persist Security Info=True"
ask=Request.QueryString("ask")
'Response.write("current month" & month(date()))
thmonth=month(date())+1
thyear=year(date())
thday=day(date())
%>
<Select NAME="fdobm" id="fdobm" tabindex=1>
<OPTION value="01" <%if thmonth=1 then Response.Write "selected"%>>Jan</OPTION>
<OPTION value="02" <%if thmonth=2 then Response.Write "selected"%>>Feb</OPTION>
<OPTION value="03" <%if thmonth=3 then Response.Write "selected"%>>Mar</OPTION>
<OPTION value="04" <%if thmonth=4 then Response.Write "selected"%>>Apr</OPTION>
<OPTION value="05" <%if thmonth=5 then Response.Write "selected"%>>May</OPTION>
<OPTION value="06" <%if thmonth=6 then Response.Write "selected"%>>Jun</OPTION>
<OPTION value="07" <%if thmonth=7 then Response.Write "selected"%>>Jul</OPTION>
<OPTION value="08" <%if thmonth=8 then Response.Write "selected"%>>Aug</OPTION>
<OPTION value="09" <%if thmonth=9 then Response.Write "selected"%>>Sep</OPTION>
<OPTION value="10" <%if thmonth=10 then Response.Write "selected"%>>Oct</OPTION>
<OPTION value="11" <%if thmonth=11 then Response.Write "selected"%>>Nov</OPTION>
<OPTION value="12" <%if thmonth=12 then Response.Write "selected"%>>Dec</OPTION>
</SELECT>
<Select NAME="fdoby" id="fdoby" tabindex=3>
<OPTION VALUE="2010" <%if thyear=2010 then Response.write "selected"%>>2010</OPTION>
<OPTION VALUE="2009" <%if thyear=2009 then Response.write "selected"%>>2009</OPTION>
<OPTION VALUE="2008" <%if thyear=2008 then Response.write "selected"%>>2008</OPTION>
<OPTION VALUE="2007" <%if thyear=2007 then Response.write "selected"%>>2007</OPTION>
<OPTION VALUE="2006" <%if thyear=2006 then Response.write "selected"%>>2006</OPTION>
<OPTION VALUE="2005" <%if thyear=2005 then Response.write "selected"%>>2005</OPTION>
<OPTION VALUE="2004" <%if thyear=2004 then Response.write "selected"%>>2004</OPTION>
<OPTION VALUE="2003" <%if thyear=2003 then Response.write "selected"%>>2003</OPTION>
<OPTION VALUE="2002" <%if thyear=2002 then Response.write "selected"%>>2002</OPTION>
<OPTION VALUE="2001" <%if thyear=2001 then Response.write "selected"%>>2001</OPTION>
<OPTION VALUE="2000" <%if thyear=2000 then Response.write "selected"%>>2000</OPTION>
</SELECT>
</td>
</tr>
<tr>
<td><font size="2" face=verdana color="darkBlue"><b>Select Market Data File </b></font>:</td>
<td> </td>
</tr>
<tr>
<td><INPUT type="file" id="selmktdata" name="selmktdata"></td>
</tr>
<tr>
<td><font size="2" face=verdana color="darkBlue"><b>Select Client Holdings File </b></font>:</td>
<td> </td>
</tr>
<tr>
<td><INPUT type="file" id="selholdings" name="selholdings"></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><input type="submit" name="submit" value="Click here To Submit file"></td>
<td height=70></form></td>
<tr>
</table>
<!-- End main content here -->
</td>
</tr>
<!-- This Row is used to display the insert details of holdings file and market data file -->
<tr>
<td align="center">
<%
if Request.Form("submit")<>"" then
dim myfile,genfile,filename,strlen,Item,filepath,holdingpath
holdingspath=Request.Form("selholdings")
mktdatapath=Request.Form("selmktdata")
monthdate=Request.Form("fdobm")&"/01/"&Request.Form("fdoby")
monthdate= cdate(monthdate)
monthdate=dateadd("m",1,monthdate)
monthdate=dateadd("d",-1,monthdate)
'************ Check if Holdings are already uploaded into portfolio_details for report month ********
qry ="select count(*) from portfolio_details where to_char(pf_date,'mm/dd/yyyy') = '"&monthdate&"'"
Objrsrate.open qry,objcon
if cint(Objrsrate(0)) > 0 then
Response.Write("Holdings already uploaded for the Report month<br>")
Response.End()
else
Objrsrate.close
end if
'********************************************** End of Checking ************************************
set myfile=Server.CreateObject("scripting.filesystemobject")
Response.Write holdingspath &" "&mktdatapath& "transaction updated <br>"
'*********************************** Inserting Market data into tbl_mktdata **************************
if mktdatapath <> "null" then
'mktdatapath="f:\monthly reports\holdings\01062006.MD" 'Server.MapPath()
set genfile = myfile.OpenTextFile(mktdatapath,1)
ObjCon.Execute "delete from tbl_mktdata" 'delete previous contents from tbl_mktdata
response.Write("Clear previous market data in tbl_mktdata <br>")
while not genfile.AtEndofStream
filecontent = genfile.readline
filearray= split(filecontent,",")
'Response.Write filearray(1) & " "&filearray(7) & "<br>"
'insert data into tbl_mktdata file
ObjCon.Execute "insert into tbl_mktdata values ('"&trim(filearray(1))&"',"&cdbl(filearray(7))&")"
wend
response.Write("end of market data<br>")
'' end of market data
else
Response.Write "<table align=center><tr><td height=250><font face=verdana size=2 color=red><b>No Market data File input</b></font></td></tr></table>"
Response.End
end if
'*********************************** End of Inserting Market data ************************************
.
.
.
.
.
.
.
</BODY>
</HTML>
------------------------------------------------------------------------------
As the code worked well before in previous machine I think it error is because of settings in IIS. But I’m not sure of it.
~Jagadeesh
hi all please clarify my doubt
-- modified at 6:05 Saturday 12th May, 2007
|
|
|
|
|
a) you might want to modify your posting to hide your password in your connectionstring..
b) Just setting
mktdatapath=Request.Form("selmktdata")
won't do what you want; you haven't actually uploaded the file - you need to do some research into uploading files to a sever in ASP...
Fred
|
|
|
|
|
mktdatapath=Request.Form("selmktdata")
Using that code my objective is to read the file path from where it is being upoaded.
I am using the following code to read the file.
set genfile = myfile.OpenTextFile(mktdatapath,1)
while not genfile.AtEndofStream
filecontent = genfile.readline
filearray= split(filecontent,",")
'insert data into tbl_mktdata file
ObjCon.Execute "insert into tbl_mktdata values ('"&trim(filearray(1))&"',"&cdbl(filearray(7))&")"
wend
-----------------------------------------
~JJ
hi all please clarify my doubts
|
|
|
|
|
It doesn't work like that. Request.Form("selmktdata") may tell you the path to the selected file on the local machine, but you haven't actually uploaded it to the server, and when you do the path there will be different.
You need to learn how to upload files, and save them to the server, then use that path in your OpentextFile method.
http://www.google.co.uk/search?hl=en&q=asp+upload&meta=[^]
Fred
|
|
|
|
|
Hi Fred,
Thanks for your patience;
I want to be clearer about the application.
1. It is not a web-based application. (It runs on our local machine) and we work directly on the machine where the application is configured.
2. We use this application to open the file read it and insert it into our DB (Every thing is done on a stand alone machine.)
3. This application is running smoothly for the past 3-4 years with out any issues.
4. Issue has arrised because the application has been moved to a different machine.
Your feedback is very valuable.
~Jagadeesh
hi all please clarify my doubts
|
|
|
|
|
Well I don't know then, I'm afraid... if the files are on the same machine too (if you're trying to read them across your network then it is, effectively, a web-based application) then I suspect it is, as said at the start, a permissions problem. Check your IIS settings and your windows users settings.
Fred
|
|
|
|
|
Yes, the files r on the same machine. What u suspected at the beginning is correct. It’s a permission problem. All IIS settings seem to be OK. I searched for these settings in net and the solutions did not work in my case. Running the application in windows admin mode also didn’t work in this case.
I'm seeking help in this regard. --> IIS settings and windows users settings, for trouble shooting this error.
Thank you Fred,
~Jagadeesh
hi all please clarify my doubts
|
|
|
|
|
GOT the Solution . The code is working fine now. The issue has arised here
set genfile=myfile.OpenTextFile(holdingspath,1)
because of permissions on the folders from where i am reading the files and the permissions on the (application)code folders.
Give full permissions to both folders. It works.
This link is helpful in this kind of situations.
http://www.aspemporium.com/tutorials.aspx?tid=9
Fred, Thank you very much for support.
~Jagadeesh
|
|
|
|
|
tell me the process to create a subdomain in my application
hi,
this is prasadchowdary
|
|
|
|
|
i want to create subdoamin in asp.net using C# how can i do that
hi,
this is prasadchowdary
|
|
|
|
|
I have a web form where i am created a pdf document through code. To do this, i am using a third party tool viz. ActivePDF. It takes about 5 to 10 minutes to create the document. Upon creation of the document, I am displaying the document in another page. Sometimes, what happens is i am getting the error 'page cannot be displayed' when i tried to display the document. Immediately everybody may feel that document is not available but actually the pdf document is generated. I am checking this thru code and if the file is available, then only i am displaying the pdf. the pdf size is hardly 1MB. the code is as follows
PDFCreationProcess()
if fileexists(pdf)
{
Response.write("window.open('" + pdfname + "'")");
}
pls help me urgently..
|
|
|
|
|
I feel your script might be timing out. Try increasing Server script timeout time.
Server.ScriptTimeout = 800000
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|