cancel
Showing results for 
Search instead for 
Did you mean: 

number of pages of report

Former Member
0 Kudos
43

hey i am having a problem when trying to navigate to alst page of report i get the error some parameters are missing values

despite that navigation is working fine for next,previous and first

please can anyone help with this

i would like to get the number of pages of the report or to make the gotolast page working fine

thanks alot

NB i am using rational application developper

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

i am writing a Java code which fetched the data from database & in the format of a crystal report i want to extract it into a PDF/excel file ,

SO i am using PDFEXportFormatOPtions & IReportSource .

Can anyone plz let me know in what i can do thi by using IRequestContext.

Even small inputs will be very helpful.

Thanks in advance.

Former Member
0 Kudos

Are you using subreports in your report ?

Former Member
0 Kudos

to get the last page, try the folliwing:

ReportClientDocument rpt = new ReportClientDocument();

rpt.open("name_of_report.rpt", 0);

rpt.getReportSource().getLastPageNumber(new RequestContextImpl())

of course you need a class that implements IRequestContext...here's an example:

public class RequestContextImpl implements IRequestContext

{

private IReportStateInfo repStateInfo = null;

public ISubreportRequestContext getSubreportRequestContext()

{return null;}

public ITotallerNodeID getTotallerNodeID()

{return null;}

public void setSubreportRequestContext(ISubreportRequestContext arg0)

{}

public void setTotallerNodeID(ITotallerNodeID arg0)

{}

public PropertyBag getClientCapability()

{return null;}

public IReportStateInfo getReportStateInfo(){

return this.repStateInfo;

}

public void setClientCapability(PropertyBag arg0)

{}

public void setReportStateInfo(IReportStateInfo iReportStateInfo)

{

this.repStateInfo = iReportStateInfo;

}

}

Former Member
0 Kudos

thanx for u suggestion. It really helped me a lot.