on 07-22-2009 6:36 AM
Hi Experts,
I am using print fuctionatily in my application.I have totally 17 records in my table and i am printing the 13 records in
page1 and remaining 4 reocrds in page2 thorugh this below code.
int 1= wdcontext.nodetable.size();
if(i==13)
{
Pagebreak;
}
In development i have maximum 17 records and i dont know how many reocrds are there in production .Now i need to change my code to for every 13 records i want pagebreak.For ex if table have 60records than every 13 record and 26 record and 43 record i need page break.
Could any one help me out..
Regards,
Suresh
HI Suresh,
Use this code.Hope it sholud work..
if(i>=13)
{
if(i%13==0)
{
htmlString = htmlString +"</table><hr>";
pagebreak;
}
}
else
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi suresh,
Use this code, this will solve ur problem.
int j = 0;
for(int i=0;i<wdContext.node().size();i++)
{
j++;
if(j==13)
{
pagebreak;
j=0;
}
}
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
check this blog to print the table records
/people/ritushree.saha/blog/2009/07/02/webdynpro-java-printing-using-nw-2004-2004s
make the reference with the code present inthe blog and make the changes in the code with your requirement.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi suresh,
This code will solve your problem,
int j = 0;
for(int i=0;i<wdContext.node().size();i++)
{
j++;
if(j==13)
{
pagebreak;
j=0;
}
}
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for(int i=0;i<wdContext.node().size();i++) {
if ( (i%13)==0) {
pagebreak;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It seems you can print only 13 lines in a page. so what you can do is break the page after every 13th record like below
int j = 0;
for(int i=0;i<wdContext.node().size();i++)
{
if(i==j+13) //here j value is 0, so for first time page breaks when i=13
{
pagebreak;
j = i ; // here when j is made 13, so second pagebreaks at i = 13+13
}
}
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghu,
This is the code i have used but its not working
if(i>13)
{
int j=0;
for(int n=0;n<i;n++)
{
if(n==j+13)
{
htmlString = htmlString +"</table><hr>"
pagebreak;
j=n;
} //If condition
} //loop
}//
else
{
"page";;
}
Regards,
Suresh
Edited by: suresh111 on Jul 22, 2009 12:14 PM
Edited by: suresh111 on Jul 22, 2009 12:15 PM
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.