Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronized Page-by in a Document?

Status
Not open for further replies.

MSIsam

Programmer
Sep 29, 2003
173
0
0
US
We are building multiple reports that will be placed in a Document object. Each of these reports has a page-by attribute. Is there a workaround so that the user can use the page-by functionality via a document object?
 
Hi gapinc,

I think the easiest solution to have a page-by functionality in a document is to insert your document in the report.

Whaaat? hehehe yeah, it works, trust me.

Following is the idea:

Create a document adding all reports you need in it except for the report that need the page-by functionality.
In the DocumentCuLib.asp hold the aDocumentInfo(S_HTML_DOCUMENT) output in a session (or in a txt file, etc). The aDocumentInfo(S_HTML_DOCUMENT) will retrive all html code of the document.
In the document.asp, include a reponse.redirect function to redirect the page to Report.asp?&ReportID=221C1EDA4C729933AFC4CC9D60D9E3B9
In the report.asp, display the html holded in your session (response.write (myDocumentHTML).

That's it!
And you have got your report merged with a document, but to the user, it will be like a single document! :)

Cheers!
Humberto Seiji Fukuda

kogu@yahoo.com
 
but this works only for one report with page by no?? if i want two reports??
What about the others documents in my project that i don't want to redirect to that report??
 
Hi Omarmtz,

>but this works only for one report with page by no??

Yeah, that is right. This solution will only work out for one report with page by.

>What about the others documents in my project that i don't want to redirect to that report??

Create a condition in asp based on document ID. Something like:
If request.querystring("DocumentID")= '1F753C604B5E6F61A2EF678AEC5D0299' then...

>if i want two reports??

Well... Then let's talk about another solution...
This will be a little bit more complex then the first I've suggested.

The general ideia is the following.
Solution 2:

1. Get the report xml result (I am not totally sure but I think it is in the ReportCuLib.asp)
2. Save it as .xml file.
3. Redirect the report.asp to the secound report.
4. Create a new page which will retrive the xml and use DataIsland method to break the data in pages.
5. Redirect the secound report to the new page you have just created.

As you can see, actually, you wont be using the document.asp page. Instead, you will create your own documentCustomized page which will retrive the both xml files and format the data as you wish.

Solution 3:
Another option is to use DOM. However, as far you will be using javascript and will have to load all result data to the client, probably you have performance problem.

But, if the report result is not too big, this solution would be better the the secound explained above for sure!!!

Regards,
Humberto Seiji Fukuda

kogu@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top