2

I have a main page, which include different pages (using drop down list, changing the different pages to display).

Different pages (First Page) has , export to excel button and other search criteria which will allow user to filter the result and allow to export.

Second Page (excel sheet page for the First page) , which has content type excel and no form data (such as no button etc).

First and Second Page are using the same controller.

download fuction , I use like below to download button in First Page.

PageReference OpenNewPage = Page.MySecondExcelPage;
OpenNewPage.setRedirect(false); 
return OpenNewPage;

I have two issues.

1) The filter results from first page is not displayed on Second Page , when it is exported as Excel sheet. Instead all the rows of records are exported.

2) When I click download button in First page. The page becomes blank and redirected to Second Page in URL.

I believe all are related to include tag.

If I call directly the first page in url and export , Issue 1) is ok. Only calling from Main Page is giving that issue.

How can I solve those two issues?

Any inputs will be so much helpful for me.

1 Answer 1

0

the walkaround for my solution that fit to me is , I use

PageReference newpage = Page.MypageName;
newpage.getParameters().put('key','value');

and put all necessary values into that current Page. And then from the action class, I get those values again. As I am using include tag and this is the final solution that works for me.

Ref: (my answer) http://boards.developerforce.com/t5/Visualforce-Development/pass-the-exact-data-from-1st-page-to-2nd-excel-page/m-p/666698/highlight/false#M68302

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .