Is it possible to build include statement dynamically? Let me try and explain what I need to do as best I can. The user will conduct a search and be able to select multiple results to print reports of. There are a possibility of about 10 different reports that they can select to print. I give them a list of the id's that they have selected (in a DG with checkboxes for multiple selections) then another DG with the list of different reports. So they select the ids they want, then select the report and hit an "Add to Queue" . Once they have selected all the reports they want I want to go to the next page and display all the reports on the page so they can just print em all on one page.
So what I have come up with (in my mind) is something like this, I will have 3 Str Variables that will contain the reports, id's and total reports. So I will prolly split those and create an array. Then loop thru the array with the includes.
Thats kinda what I had in my mind. If anyone can shed some light on this that would be great.Code:dim strReport(20) as string dim strId(20) as string dim intTotalRpts as integer = Session("totreports") strReport=Split(Session("reports"),",") strId=Split(Session("ids"),",") for i=0 to intTotalRpts <--!# Include file=<%=strReport(i) & "?ids=" strId(i)%> --> next




Reply With Quote