|
Thanks for that. But I think this, and similar recent threads, does raise a question about 1-voting. Maybe I'll write to "Suggestions" about it.
|
|
|
|
|
dharam_hbtik wrote: and plz for god sake if you know the answer then only post in this thread other wise dont waste your time as well as mine.
This is the sort of rudeness we're talking about.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks Christian for supporting me in this regard.
|
|
|
|
|
hi sir one more another issue is following
sir i want two column in one page studentname and studentaddress
but i want to fix the no. of record in one page and remaining record should not go to the next page
but it should be on same page.
|
|
|
|
|
Place your logic in PageBreak expression. So that after a certain no of records it automatically places a PageBreak.
|
|
|
|
|
hi sir
i am working on crystal report
but crystalreportviewer toolbar button is not working
i mean export print button is not working
and i am opening web application on mozilla firefox.but firefox returns popup message "firefox prevented this site from opening a popup window". please help me
|
|
|
|
|
I think you need to disable Popup blocker to open a new window.
|
|
|
|
|
Hellow Expert,
I am using PDFSharp for Create PDF file in my Application It works fine and Generate the PDF file and save it in the specified location in Local host but when i upload this in WEB Server it is not working nor throwing any error please suggest me
My code is
----------
if (main_id > 0)
{
dtInvdata = BLObjectTrans.selectInvoiceMasterfromInvNO(invNO, main_id);
}
string filename1 = "invoice.pdf";
File.Copy(Path.Combine(Server.MapPath("template_bank_debit_pdf/"), filename1),
Path.Combine(Directory.GetCurrentDirectory(), filename1), true);
//open pdf document
filename1 = Path.Combine(Server.MapPath("template_bank_debit_pdf/"), filename1);
PdfDocument inputDocument1 = PdfReader.Open(filename1, PdfDocumentOpenMode.Import);
PdfDocument OutPutDoc = new PdfDocument();
int count = inputDocument1.PageCount;
if (count > 0)
{
PdfPage pageOut = OutPutDoc.AddPage(inputDocument1.Pages[0]);
XGraphics gfx = XGraphics.FromPdfPage(pageOut);
XTextFormatter tf = new XTextFormatter(gfx);
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
XFont font = new XFont("Times New Roman", 9, XFontStyle.Italic, options);
XFont font1 = new XFont("Times New Roman", 9, XFontStyle.Regular, options);
XFont font2 = new XFont("Times New Roman", 10, XFontStyle.Regular, options);
XFont font3 = new XFont("Times New Roman", 10, XFontStyle.Bold, options);
XFont font4 = new XFont("Times New Roman", 20, XFontStyle.Underline, options);
gfx.DrawString("SUBSCRIPTION INVOICE NUMBER:" + dtInvdata.Rows[0]["inv_no"].ToString(), font4, XBrushes.Black, new XRect(0, 175, pageOut.Width, pageOut.Height), XStringFormats.TopCenter);
gfx.DrawString("MEMBERSHIP NUMBER:", font3, XBrushes.Black, new XRect(57, 320, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString("DATE:", font3, XBrushes.Black, new XRect(57, 300, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString("MEMBERSHIP TYPE:", font3, XBrushes.Black, new XRect(80, 320, pageOut.Width, pageOut.Height), XStringFormats.TopCenter);
gfx.DrawString("SUBSCRIPTION AMOUNT:", font3, XBrushes.Black, new XRect(57, 335, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString("Dear " + RugbyCommon.IsNull(dtInvdata.Rows[0]["first_name"].ToString()) + ",", font2, XBrushes.Black, new XRect(57, 400, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString("Your membership subscription for the season" + RugbyCommon.IsNull(dtInvdata.Rows[0]["season"].ToString()) + "is " + RugbyCommon.ToStrCurrency(dtInvdata.Rows[0]["balance"].ToString()), font2, XBrushes.Black, new XRect(57, 450, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString("SUBSCRIPTION DUE", font3, XBrushes.Black, new XRect(57, 500, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(RugbyCommon.ToStrCurrency(dtInvdata.Rows[0]["balance"].ToString()), font3, XBrushes.Black, new XRect(170, 500, pageOut.Width, pageOut.Height), XStringFormats.TopCenter);
string maintext = dtInvdata.Rows[0]["bddremarks"].ToString();
string[] Split = maintext.Split(new Char[] { '.'});
string text1=(Convert.ToString(Split[0]));
string text2=(Convert.ToString(Split[1]));
gfx.DrawString(text1, font1, XBrushes.Black, new XRect(57, 600, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(text2, font1, XBrushes.Black, new XRect(57, 615, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
//gfx.DrawString(dtInvdata.Rows[0]["bddremarks"].ToString(), font1, XBrushes.Black, new XRect(57, 600,pageOut.Width,pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString("THIS INVOICE IS PAID BY DIRECT DEBIT", font, XBrushes.Black, new XRect(0, -80, pageOut.Width, pageOut.Height), XStringFormats.BottomCenter);
gfx.DrawString(RugbyCommon.ToStrCurrency(dtInvdata.Rows[0]["balance"].ToString()), font2, XBrushes.Black, new XRect(190, 335, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(dtInvdata.Rows[0]["membership_no"].ToString(), font2, XBrushes.Black, new XRect(177, 320, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(dtInvdata.Rows[0]["invdate"].ToString(), font2, XBrushes.Black, new XRect(90, 300, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(dtInvdata.Rows[0]["membership_name"].ToString(), font2, XBrushes.Black, new XRect(150, 320, pageOut.Width, pageOut.Height), XStringFormats.TopCenter);
gfx.DrawString(RugbyCommon.IsNull(dtInvdata.Rows[0]["name"].ToString()), font2, XBrushes.Black, new XRect(57, 220, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(RugbyCommon.IsNull(dtInvdata.Rows[0]["address_1"].ToString()), font2, XBrushes.Black, new XRect(57, 230, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(RugbyCommon.IsNull(dtInvdata.Rows[0]["city"].ToString()), font2, XBrushes.Black, new XRect(57, 240, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
gfx.DrawString(RugbyCommon.IsNull(dtInvdata.Rows[0]["county"].ToString()), font2, XBrushes.Black, new XRect(57, 250, pageOut.Width, pageOut.Height), XStringFormats.TopLeft);
string invoice = "Invoice" + ".pdf";
OutPutDoc.Save(Server.MapPath("pdfInvoice/") + invoice);
Process.Start(Server.MapPath("pdfInvoice/" + invoice));
OutPutDoc.Close();
--------
thanks
|
|
|
|
|
nccs1234 wrote: It works fine and Generate the PDF file and save it in the specified location in Local host but when i upload this in WEB Server it is not working nor throwing any error please suggest me
A deployment problem always means two things
1 - there's nothing wrong with your code, so why post it
2 - something is different on the server ( so tell us the things you checked, like, is PDF sharp's dll on the server )
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi.
I am learning MySql . And i want to use MySql with ASP.net. I know how to use MSSql with ASP.net. But No idea about MySql.
Can anyone tell me the where i need to make changes for using MySql. ?
I hope this time someone will give me answer .
|
|
|
|
|
It's just another database. You just use the client for .NET to connect, the rest works the same.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hi!
I have a question. I need to create an online timesheet system for one of my clients. Any suggestions as to how I can most effectively start developing an application like this? They specified that I am to use ASP.NET with SQL 2005 Express but the rest is up to me.
Regards
Illegal Operation
|
|
|
|
|
Start by talking to your client to find out what they mean by "timesheet system". Do they bill in hourly lots? Quarter hours? By the day? Do they need to record details of different projects they work on? All these things will affect how you go about building such a system...
Anaylsis-->Design-->Implementation!
|
|
|
|
|
Like Damian said, this is a dumb question. Do they want you to invent a timesheet system and they will build their business around it, or are you required to meet THEIR business needs ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Respected,
I am having a idea about documentaion , About Project And it's
whole information like thier functionality,coding etc.So my Question is that
how we create documentation on my project.Give me site url or any hint.
Thanks...
|
|
|
|
|
You can use notepad if you like, but Word lets your format it better.
Your question makes no sense. You create documentation by writing it. You write comments in code, you can use various formats to comment methods which then can be used to create an auto generated, close to useless document, if your processes require it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi!
I have a DB table product. product has foreign key ref to category as categoryId
category table has categoryId, categorycode and categoryname
now i have a product class and category class
when i display a datalist which is binded to a arraylist of product i also need to display category where this product belongs. now my question is, since product class wont have property of categoryid, code and name. should i be repeating those property in both product class and category class so i can have access of those properties?
|
|
|
|
|
The logical thing for any right minded person to do, would be to make the product class contain an instance of the category class.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
could you please provide me small correct snippet as to how it should look. I created one but not sure if its correct.
Public class Product
{
private string _productId;
...
private Category _category;
public Product()
{
this.ProductId = "";
this.Category.CategoryId = 0;
}
public Product(....parameter for product, string categoryId)
{
...
this.category.CategoryId = categoryId;
}
public Category category
{
get { return _category; }
set { _category = value; }
}
public ProductId
{
get { return _productId; }
set { _productId= value; }
}
modified on Monday, November 16, 2009 12:04 AM
|
|
|
|
|
Seems OK to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I thought so too. but do I need to pass this instance into class constructor?
public Product()
{
this.Category = null;
}
public Product(parameters..., Category c)
{
...
this.Category = c
}
...
...
public Category cat
{
get { return _category; }
set { _category = value; }
}
part of my BLL
public static class myBLL
{
public static List<Product> GetProducts(string CountryName, string AdCity, string AdSubCatType)
{
return myDAL.Instance.GetProducts(CountryName,AdCity,AdSubCatType);
}
part of my DAL
public List<Product> GetProductss(string CountryName, string AdCity, string AdSubCatType)
{
using (SqlConnection oConn = new SqlConnection(_connectionString)) {
string strSql = "spGetProductListList";
SqlCommand oCmd = new SqlCommand(strSql, oConn);
oCmd.CommandType = CommandType.StoredProcedure;
oCmd.Parameters.Add(new SqlParameter("@CountryName", SqlDbType.NVarChar, 50)).Value = CountryName;
oCmd.Parameters.Add(new SqlParameter("@AdCity", SqlDbType.NVarChar, 200)).Value = AdCity;
oCmd.Parameters.Add(new SqlParameter("@AdSubCatType", SqlDbType.NVarChar, 50)).Value = AdSubCatType;
oConn.Open();
string m = oCmd.ToString();
SqlDataReader oReader = oCmd.ExecuteReader();
List<Product> products= null;
products = GetProductCollectionFromReader(oReader);
oReader.Close();
return products;
}
}
protected List<Product> GetProductCollectionFromReader(IDataReader oReader)
{
List<Product> products = new List<Product>();
while( oReader.Read() )
products.Add(GetProductFromReader(oReader));
return products;
}
protected Product GetProductFromReader(IDataRecord oReader)
{
Product product = new Product();
product.ProductId = (int)oReader["ProductId"];
....
product.Category.CategoryName = (string)oReader["CategoryName"];
product.Category.CategoryCode = (string)oReader["CategoryCode"];
return product;
}
|
|
|
|
|
I get null reference exception.
|
|
|
|
|
Please describe how to do paging of the information of each page which includes 5 topics. Accordingly, there is coding of .vb for reference.
modified on Sunday, November 15, 2009 10:21 PM
|
|
|
|
|