16,018,664 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by mahakaal (Top 26 by date)
mahakaal
23-Feb-15 23:23pm
View
if i marks any method internal in abstract class, we can't override even a single method of that abstract class outside the assembly...
mahakaal
23-Feb-15 23:19pm
View
am not clear about it yet.
if making an abstract class internal can restrict it's access from outside the assembly than what is the purpose of making it's abstract method internal.
what are benefits in both context...
mahakaal
23-Feb-15 23:18pm
View
i am not clear about it yet.
if making an abstract class internal can restrict it's access from outside the assembly than what is the purpose of making it's abstract method internal.
what are benefits in both context...
mahakaal
23-Feb-15 0:26am
View
Thanks again Mika,
But what is the benefit of assigning derived class object to base class reference.
What if we don't do this and do in the below way
Shape[] shapes = new Shape[3];
shapes[0] = new Shape(100, 100);
shapes[1] = new Square(200, 200);
Circle circle1 = new Circle(300, 300)
foreach (Shape shape in shapes)
{
shape.Draw();
}
circle1.Draw();
mahakaal
23-Feb-15 0:02am
View
Thankx Mika,
i have gone through the article you have suggested.
There is a statement
shapes[2] = new Circle(300, 300);
What does it mean and what if we don't use the reference of shape and uses the reference of Circle
Circle Cicle1= new Circle(300, 300);
Sorry, May be this question will seems silly as i am not so good in OOP.
mahakaal
22-Feb-15 23:42pm
View
Thanks for your quick reply Sir.
i am trying to understand it and after your suggestion. i will try my best to understand it myself.
mahakaal
25-Jul-13 8:33am
View
dear i had already tried your solution but it's not working .
i have the solution to server my purpose.
which is as following if i simply use the below code instead of using the code mentioned in my problem
protected void Button2_Click1(object sender, EventArgs e)
{
string filePath = Label117.Text;
FileInfo file = new FileInfo(filePath);
if (file.Exists)
{
Response.Redirect("~/ExcelFiles/" + file.Name);
}
}
but i want to know why this problem is coming if i use previous mentioned code.
mahakaal
25-Jul-13 7:25am
View
i did what you said but still the problem is same.
if i remove the fileupload control than it works fine.
mahakaal
17-Jul-13 1:11am
View
font is installed on the server. where the project is actually stored.
if i open the project in visual studio and run the program. Then downloads the pdf for a jobno then it is showing barcode on that pdf.
but when on the same sever after publishing the website i access it and again download the job card it doesn't show the bacode it shows like *12344* where 12344 is the job no.
In both cases i am accessing it from the same server not from any other machine.
mahakaal
17-Jul-13 1:11am
View
font is installed on the server. where the project is actually stored.
if i open the project in visual studio and run the program. Then downloads the pdf for a jobno then it is showing barcode on that pdf.
but when on the same sever after publishing the website i access it and again download the job card it doesn't show the bacode it shows like *12344* where 12344 is the job no.
In both cases i am accessing it from the same server not from any other machine.
mahakaal
20-Jun-13 0:39am
View
have your solved this problem or still working on it.
mahakaal
19-Jun-13 9:01am
View
Thanks Talit
mahakaal
19-Jun-13 7:37am
View
i have checked the link but after the download user will have to manually get back to the page from where they had made request.
after download they are not reloading the page. they are just sending file to browser.
mahakaal
19-Jun-13 7:26am
View
thanx, i got it.. i will try this method..
mahakaal
19-Jun-13 7:07am
View
it's working... but should i continue with this logic or should i give a try to 1st solution which you had shared.
but i couldn't get the first solution. how to do that ...
mahakaal
19-Jun-13 6:34am
View
Talit, i haven't try the 1st fmethod. but after trying the second method. i thought of doing this with the help of timer. which is serving my purpose. but i would want your suggestion on that. Below is the logic i have used for it.
on submit button
1. i am saving information into database
2. Saving the jobno into session variable session["temp_jobno"] and then reloading the page
3. on page load event if session["temp_jobno"] value is not null than calling a timer with interval of 1 sec.
4. on tick event of timer i am saving session value into a string variable(which is acutally jobno) and setting session["temp_jobno"]=null as well as disabling the timer control then sending the pdf to browser for dowload.
mahakaal
19-Jun-13 1:10am
View
either in chrome or firefox..
i had tried the second one.
mahakaal
19-Jun-13 0:54am
View
hi Tadit,
First of all thanks, as you always responds to my query.
in my last query you have provide me the solution but it was not working on all browsers.
now i am trying to do it with the help of timer.
it's working but what will be the drawbacks if i use timer and do the same.
pdf export can be done easily but how will i reload the page after pdf export. as
Response.AddHeader("Refresh", "3; url=index.html"); is not working on all browsers.
mahakaal
19-Jun-13 0:47am
View
Tadit, the solution you gave me is working but not on all internet browsers.
mahakaal
15-Jun-13 6:27am
View
one way to achieve this is by using timer control.
mahakaal
15-Jun-13 2:05am
View
private string name;
public string name
{
get { return name; }
set { name= value; }
}
//what is benefit of get set, if i do the same thing in this way
private string name:
public string name ()
{ return name;}
public name (aString)
{ name = aString;}
mahakaal
15-Jun-13 2:02am
View
Deleted
can you share the code to work on it.
mahakaal
13-Jun-13 9:05am
View
= PDFName;
CrExportOptions = printJ.ExportOptions;
CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
CrExportOptions.FormatOptions = CrFormatTypeOptions;
printJ.Export(CrExportOptions);
printJ.Dispose();
printJ.Close();
GC.Collect();
Response.ContentType = "application/pdf";
Response.AddHeader("Refresh", "3; url=joblogin.aspx");
Response.AppendHeader("Content-Disposition", "attachment; filename="+Request.QueryString["jobid"].ToString()+".pdf");
Response.TransmitFile(PDFName);
}
}
mahakaal
13-Jun-13 9:02am
View
it's not actually a different approach. Right know i am saving the pdf generated from crystal report on my server than i am sending it to browser.. Can i directly send the pdf to browser without saving it..
Below is my code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.CrystalReports;
using CrystalDecisions.Shared;
using CrystalDecisions.Web;
using CrystalDecisions.Reporting;
using CrystalDecisions.ReportSource;
using System.Data.SqlClient;
using System.Configuration;
using System.Threading;
public partial class SaveJobCard : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string PDFName,temp;
if (Request.QueryString["jobid"].ToString() != "")
{
PDFName = Request.QueryString["jobid"].ToString();
temp = PDFName;
PDFName=PDFName.ToString();
PDFName = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)+"\\temp\\"+ PDFName + ".pdf";
}
else
{
PDFName = "report";
}
using (SqlConnection con = new SqlConnection())
{
con.ConnectionString = ConfigurationManager.ConnectionStrings["dsd"].ConnectionString;
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "Delete from JobCard";
cmd.ExecuteNonQuery();
cmd.CommandText = "INSERT INTO JobCard(jobno,job_name,Bill_noBill,job_type,department,login_date,dispatch_dateTime,dmode,company_name,Client_department,contact_person,contact_no,Email_id,Delivery_addl1,Delivery_addl2,Delivery_addl3,Delivery_City,Delivery_State,Delivery_Pin,PMethod,PO_Date,PO_No,Paper_type,Paper_size,Grammage,qty,LPrint_Remark,lBind_Remark,LDispatch_Remark,dispatched,delivered,challan_ready,SONo,acc_remarks,challan_no,Tran_Id,guid,printdoneby,printdonetime,bindingdonetime,bindingdoneby,loginby,Diff_Location,DLocation_path,Verify,Binding_remark,Cordinator_PrintingRemark,Dispatch_done_remark,Delivery_done_remark,Need_Form38,modify,consulted_person,C_media,Modification_remark,old_dispatch_date,overflow,PendingFromBinding,PendingFromPrinting,PendingFromChallan,BindingDoneRemarks,PrintingDoneRemarks,ItemRate,TotalAmount) SELECT jobno,job_name,Bill_noBill,job_type,department,login_date,dispatch_dateTime,dmode,company_name,Client_department,contact_person,contact_no,Email_id,Delivery_addl1,Delivery_addl2,Delivery_addl3,Delivery_City,Delivery_State,Delivery_Pin,PMethod,PO_Date,PO_No,Paper_type,Paper_size,Grammage,qty,LPrint_Remark,lBind_Remark,LDispatch_Remark,dispatched,delivered,challan_ready,SONo,acc_remarks,challan_no,Tran_Id,guid,printdoneby,printdonetime,bindingdonetime,bindingdoneby,loginby,Diff_Location,DLocation_path,Verify,Binding_remark,Cordinator_PrintingRemark,Dispatch_done_remark,Delivery_done_remark,Need_Form38,modify,consulted_person,C_media,Modification_remark,old_dispatch_date,overflow,PendingFromBinding,PendingFromPrinting,PendingFromChallan,BindingDoneRemarks,PrintingDoneRemarks,ItemRate,TotalAmount FROM login where JobNo='" + Request.QueryString["jobid"].ToString() + "'";
cmd.ExecuteNonQuery();
cmd.Dispose();
con.Close();
}
ReportDocument printJ = new ReportDocument();
// string FileName = "test.rpt";
//Session["file"] = "yes";
printJ.Load(Server.MapPath("JobCard.rpt"));
printJ.SetDatabaseLogon("sa", "Perfact@1234", "192.168.1.7", "DispatchStatus");
printJ.Refresh();
ExportOptions CrExportOptions;
DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
CrDiskFileDestinationOptions.DiskFileName
mahakaal
13-Jun-13 8:52am
View
Tadit, thanks as your suggestion has worked for me.. but would you help me if i will try to solve the same issue with different approach...
mahakaal
13-Jun-13 4:18am
View
Thanx Prasad for your sharing valuable info...
Show More