|
hi, using of this code,i make one doc file ,i want to show this file as report,so i want to grouping ,summetion & all things which is required for a Report,so give me code i.e.helpful to show this doc file as a report
protected void Button1_Click(object sender, EventArgs e)
{
DataSet dsDlist = new DataSet();
string sql;
string HeaderName;
string data;
sql = "SELECT dbo.aa.*FROM dbo.aa";
A.ClassGeneral a1 = new A.ClassGeneral();
dsDlist = A.ClassGeneral.GetList(sql);
StringBuilder htmlString = new StringBuilder();
htmlString.Append(" <table width="\"100%\"height=\"50%\"" border="\"0\"">");
htmlString.Append("<tr width="\"100%\"">");
// htmlString.Append("<tr>");
htmlString.Append("<img src="C:\\NewReport\\images\\Logo.gif">");
htmlString.Append("<th>RoadRunner Shuttle</th>");
htmlString.Append("</img></tr>");
//htmlString.Append("<td rowspan="\"0\"">");
htmlString.Append("<th>Employee id</th>");
htmlString.Append("<th>Salary</th>");
//htmlString.Append("</td>");
htmlString.Append("</tr>");
for (int i = 0; i <= dsDlist.Tables[0].Rows.Count - 1; i++)
{
htmlString.Append("<tr>");
htmlString.Append("<td>");
data = dsDlist.Tables[0].Rows[i] ["empid"].ToString();
htmlString.Append(data);
htmlString.Append("</td>");
htmlString.Append("<td>");
HeaderName = dsDlist.Tables[0].Rows[i]["sal"].ToString();
htmlString.Append(HeaderName);
htmlString.Append("</td>");
htmlString.Append("</tr>");
}
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/msword";
HttpContext.Current.Response.AddHeader("anant kasture", "1");
HttpContext.Current.Response.Write(htmlString);
HttpContext.Current.Response.End();
HttpContext.Current.Response.Flush();
}
thanks</table>
asp.net using c#
|
|
|
|
|
What is your problem?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
hi all
good morning.can anyone explain me about data manager class. i could not get any proper definitions of data manager class.
pintoo
|
|
|
|
|
chithra.r wrote: can anyone explain me about data manager class
I haven't heard about such a class in .NET framework.
|
|
|
|
|
Hey try this
Link[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
There's no such class in the .NET BCL. You'll have to explain what you're talking about, where you saw it, what library you may have seen this in, ...
|
|
|
|
|
I've made an desktop application using asp.net, C#.
Now i want to launch it for only "Demo purpose (Trail Version) for only 30 days."
After 30 days application should promt a message "Your application has been expired". If you want to purchase it, plz click on a link given below.
Please somebody help me asap..
Pradeep Kumar Srivastava
GOLS Inc
www.golsonline.com
|
|
|
|
|
Hi,
you can check this link
Link[^]
Link[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hi Sun,
Thanx for reply.
But i think, u didn't got my point.
Actually i want that as soon as my application installed firts time on the user's PC, there should be some flag entry of that perticular date, and after 30 days, if user want to run that application, then there should be popup some alert that your taril period has been expired. Plz purchase this s/w for further use.
One more thing that in my application there is no any login section and no Data base.
So, please help me accordingly...
reply asap..
Thanx
Pradeep Kumar Srivastava
GOLS Inc
www.golsonline.com
|
|
|
|
|
Hi,
have u see second link of previous post?
May be that will help you.
Here are some other links for the same,
Link[^]
Link[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
u can achieve this by storing the date and time in registry or in some file when your application start first time on any computer... than after that u can check with that date time stored to see if 30 days has been completed or not.
|
|
|
|
|
plz let me know how to store data in registry.
thanx..
Pradeep Kumar Srivastava
GOLS Inc
www.golsonline.com
|
|
|
|
|
|
Google doesn't work where you live ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
what is Internet Directory Services ?
Lalit
|
|
|
|
|
|
Could you please use a more meaningful post title. This forum is C#, so we already know the language you are dealing with. Note however, that your question would have been more suitable in the General Questions forum because it isn't language specific.
|
|
|
|
|
Try googling it and use a more meaningful subject line.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
any body pls tell me how to add checkbox in DataGridView column header?
quick response highly appriciated.
Ramana
|
|
|
|
|
Their is No way to add check box on a header.
But What I suppose you want to give a Check box on header that and on selection of that all the checkboxes of remaining rows are automatically selected right...?
If it is true then do this...
1. Place a check box control on a form.
2. Remove its text and set its position to the column header.
3. On Checked Change event of it write this
<br />
for (int cnt = 0; cnt <= DataGridView1.Rows.Count - 1; cnt++)<br />
{<br />
DataGridView.Rows[cnt].Cells["ColSelect"].Value = true;<br />
}<br />
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Hi All,
TO use pointers ,I have tried to make the code Unsafe.but there is still error..The code is given below..
public unsafe class node
{
//attributes.......
private string TableName;
private node *Next;
private ArrayList *ColName;
public node()
{
Next = null;
TableName = null;
ColName = null;
}
}
Error "Cannot take the address of, get the size of, or declare a pointer to a managed type"
Regards,
chanzeb chaudhary.
|
|
|
|
|
correct, you can't.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
in C# pointers are applicable to value types only. Example: pixel bytes inside a Bitmap,
but not the whole Bitmap.
|
|
|
|
|
I would like to make a "dumb" conversion factory, to convert one type to another (call them types A and B). To perform this action, I require that I can construct the return type with a default constructor. I will then take all the public read/write properties of both A and B, compare them, then copy the matching ones over. However, I want this to be a generic operation, that can convert between any two classes. Therefore, I am attempting to do the following:
public class AbstractBase<T, U> where T : AbstractBase<T, U> {
public static implicit operator T(U other) {
T rval = new T();
foreach (PropertyInfo Upi in typeof(U).GetProperties()) {
PropertyInfo Tpi = typeof(T).GetProperty(Upi.Name, Upi.PropertyType);
if (Tpi != null && Tpi.CanWrite && Upi.CanRead
&& Upi.GetIndexParameters().Length == 0)
Tpi.SetValue(rval, Upi.GetValue(other, null), null);
}
return rval;
}
public static implicit operator U(T other) {
U rval = new U();
foreach (PropertyInfo Tpi in typeof(T).GetProperties()) {
PropertyInfo Upi = typeof(U).GetProperty(Tpi.Name, Tpi.PropertyType);
if (Upi != null && Upi.CanWrite && Tpi.CanRead
&& Tpi.GetIndexParameters().Length == 0)
Upi.SetValue(rval, Tpi.GetValue(other, null), null);
}
return rval;
}
} And then declare a user to this class as follows:
public class myClass : AbstractBase<myClass, otherClass> { ... } I know that one of the types passed in, say T, implements AbstractBase<T, U>, so I thought that I could do the above, since my conversion is from one type that inherits from this class to some other unknown type. However, I get the error that I can only convert between types related to the class. Does anyone know a way around this so I can use the above code without retyping it in every single class (like myClass in the above example) where I need this functionality? Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
I suspect that you need to put a new() constraint in
public class AbstractBase<T, U> where T : AbstractBase<T, U> new()
where U : class, new()
|
|
|
|