|
I'm still a bit confused.
Here is what I thought you were doing:
1) Create the dataset in your code behind
2) Export the data to a MS-Word document.
3) View that MS-Word document in your browser.
What I don't know is how your are performing the "Export". It is during this "Export" process that you would instruct MS-Word to insert a page break in the document.
Can you explain what you mean by "I am exporting my data in the word file in asp.net." in your original post.
I may be thinking of something different that what you are actually doing.
|
|
|
|
|
i am exporting into the MS_word document as you thought. I kept first in the dataset and from dataset to the word document and viewing that in browser.
suchita
|
|
|
|
|
Here is a code snipet of how to insert Page Breaks in your MS-Word document as you build it from your dataset ...
Dim oWordApp As New Word.Application
Dim oWordDoc As Word.Document
Dim oPara1 As Word.Paragraph
oWordApp.Visible = True
oWordDoc = oWordApp.Documents.Add()
oWordDoc.Activate()
oPara1 = oWordDoc.Content.Paragraphs.Add
oPara1.Range.Text = "Grouping 1"
oPara1.Range.InsertParagraphAfter()
oPara1 = oWordDoc.Content.Paragraphs.Add
oPara1.Range.Text = Chr(12) + "Grouping 2" ' Notice the chr(12) is appended before the title of the second group
oPara1.Range.InsertParagraphAfter()
'oWordDoc.SaveAs("C:\Page Break Test.doc")
oWordDoc.PrintPreview()
MsgBox("Close the word document now.")
oWordDoc.Close()
oWordApp.Quit()
oWordDoc = Nothing
oWordApp = Nothing
Try inserting the Chr(12) into your code whenever your grouping changes and you should see the page breaks appear.
Good luck.
|
|
|
|
|
I couldn't understand this code. Can you explain more please?
suchita
|
|
|
|
|
Hi,
i have sql query of getting the total value like this:
select ID,sum(Amount) from items group by ID
the query is giving value in sql server management.
Now I want that total sum value in the ascx page but I dont know what will be the paramter name for such column.
<%# DataBinder.Eval(Container.DataItem,"sum(Amount)") %>
sum(Amount) doesn't work. Does anyone know what will be the parameter name for such query ??
Thanks,
suchita
|
|
|
|
|
Well, let's give the column a new name;
select ID,sum(Amount) AS [TotalAmount] from items group by ID
<%# DataBinder.Eval(Container.DataItem,"TotalAmount") %>
I are Troll
|
|
|
|
|
|
I have a ajax tool calendarExtendarFromDate,imgFromDate,textBoxFromDate,calendarExtendarToDate,imgToDate and textBoxToDate,When a date is selected from calendarExtendarFromDate,that date is displayed in textBoxFromDate.Likewise in the case of calendarExtendarToDate.Here is the source code:
--------------------------------------------------------------
<asp:updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:textbox id="txtFromDate" runat="server" readonly="True">
<cc1:calendarextender id="CalendarExtenderFromDate" runat="server" cssclass="cal" targetcontrolid="txtFromDate" popupbuttonid="imgFromDate">
<cc1:calendarextender id="CalendarExtenderToDate" runat="server" onclientdateselectionchanged="CheckForFutureDate" cssclass="cal" targetcontrolid="txtToDate" popupbuttonid="imgToDate">
<cc1:calendarextender>
-------------------------------------------------------------
I have radiobuttons..When the radiobutton between is clicked,then only calendarExtendarToDate is enabled.otherwise it becomes in disabled state..I wrote code in jscript as below:
function validate()
{
document.getElementById("imgToDate").disabled=false;
document.getElementById("txtToDate").disabled=false;
}
//call this function in .aspx.cs as below:
rbBetween.Attributes.Add("onClick", "return validate()");
textbox is disabled.When between radio is clicked,then only enabled.But calendarextendar disabled didnt work.Pls help me...
|
|
|
|
|
Can you edit this please, I (and I doubt anyone) can read the code. You need to put the code between <pre></pre> tags, AND improve the whitespacing like this:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:TextBox ID="txtFromDate" runat="server" ReadOnly="True"> />
<cc1:CalendarExtender ID="CalendarExtenderFromDate" runat="server" CssClass="cal" TargetControlID="txtFromDate" PopupButtonID="imgFromDate"/>
</asp:UpdatePanel>
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Format this mess properly!
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I knew there was a more succinct way of expressing what I just said
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
|
You can add titlebar=yes, so it will add titlebar to the window.
HelpBtn.Attributes.Add("onclick", "window.open('" + helpPath + "','','height=600,width=800,status=yes,left=125,top=20,toolbar=no,menubar=no,scrollbars=yes,location=center,resizable=yes,titlebar=yes'); return false");
Tej Aj,
http://opexsolution.com/forum/[^]
Fan of:
http://www.abtstudioz.com/[^]
|
|
|
|
|
hi mates,
i'm a newbiew here in asp.net forum, i would like to ask.
how to put a place holder for login status in a masterpage?
i have already implemented the placeholder for pages. if my question is not clear, please see the snapshot.
[click here]
much better if you can give me a link or samples or templates
which is the same scenario on my snapshot.
i need to impress my boss.
thank you so much.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: i need to impress my boss.
normally you are not wrong. if you want to impress you boss, refer some site what your boos like and copy their style of login section.
|
|
|
|
|
thank you for reply.
but i dont have the sites which is the same as my scenario. i've already search in google.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: i dont have the sites which is the same as my scenario
Me too don't know what kind of site are looking in google. if you mention your scenario others can provide some sample links.
|
|
|
|
|
I creted rdlc in web application(vs 2008).Plase help me to encrypt and decrypt querystring..I have no idea about that.Pls help
|
|
|
|
|
|
|
|
I have a ASP.NET Captcha control that i am using on my site. This control runs correctly when i run the project from VS. I am using VS2008. However when i run the project from IIS the Captcha image does not show. What causes this type of behaviour?
|
|
|
|
|
Clement Siby wrote: What causes this type of behaviour?
- User Error
Check your image path.
|
|
|
|
|
The image is auto generated.. its not a static image.
|
|
|
|
|
Clement Siby wrote: The image is auto generated.. its not a static image.
both have image path. if you are using firebug, check image with Inspect Element. you can get image path.
|
|
|
|