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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrolling with Infoview 1

Status
Not open for further replies.

satinsilhouette

Instructor
Feb 21, 2006
625
Hi,

I have never really worked on asp pages, but Crystal Reports enterprise uses asp to serve up pages in asp format.

I need to display reports on a rolling, one minute, circuit calling the reports from Infoview using asp.

Has anyone done something similar to this?

Thanks,
satinsilhouette
 
Hi,
Please explain further what you mean by display reports on a rolling, one minute, circuit calling the reports from Infoview ..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Okay, I need to display 10 reports, all being viewed for one minute at a time and then then the next report is served up automatically replacing the previous report on a users screen. I know that Infoview now uses asp, so I was thinking I could change or build an asp that could call the reports from Infoview and then display them. Or change something on the server to serve up the pages, that might a bit far fetched. But I don't know asp that well.

The reports are of course stored on Infoview, the version is CRXI R1/R2 for both reports and server.


Thanks,
satinsilhouette
 
Sounds like you what you want is to put an ASP application into an infinite loop of 10 reports.

Depending upon how long the report takes to execute, this shouldn't be a huge problem, but what you're asking for is advanced ASP development, not Crystal.

Try posting in an ASP forum, we can help you instantiate a report here using ASP, but you need a few more fasirly advanced functions that an ASP wizard would be better served to address.

-k
 
Hi,
This code may give you an idea, but no guarantees that it will work as expected..Cannot really test it in our system..


Code:
<HTML>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=charset=UTF-8">
<BODY>
<%
'===================================================================
' AUTHOR - SG, KA
' CREATED - March 31, 2004
' Modified by Turkbear 3/1/2006 as an example that may not work as written
' 
'	- Define CE Logon Variables
'   - Create the Enterprise Session Manager and iStore objects
'   - Create an array of Report IDs
'	- Create the viewer object and view the report
'==================================================================

'Declare the CMS Logon Variables
Dim CMS
Dim Username
Dim Password
Dim Authtype

'Set CMS logon credentials - change these to match your particular CE environment
CMS = "<YOURCMS>"
Username = "<Username>"
Password = "<password>"
Authtype = "secEnterprise"


'Declare variables for Enterprise Session
Dim oEnterpriseSessionMgr
Dim ceSession
Dim iStore
'Get the values

'Load the Enterprise Session Manager

Set oEnterpriseSessionMgr = Server.CreateObject("CrystalEnterprise.SessionMgr")

'Logon to the CMS and create iStore object
Set ceSession = oEnterpriseSessionMgr.Logon(Username, Password, CMS, Authtype)
Set iStore = ceSession.Service("","InfoStore")

'Declare InfoObject Variable

Dim Report
Dim Rids()   ' Build an array of Report ID#s 
Dim indx
Rids(1) = 234
Rids(2) = 345
Rids(3) = 1234
'Declare the Report App Factory and Report Document Objects
Dim rptAppFactor
Dim reportDocument

'Create the Report App Factory and Report Document Objects
Set rptAppFactory = iStore.EnterpriseSession.Service("","PSReportFactory")


for indx = 0 to UBound(Rids)        'For each Report ID
Report = Rids(indx) 
'Declare the viewer object variable
Dim Viewer
Set reportDocument = rptAppFactory.OpenReportSource(Report)
'Create a viewer object and view the report
Set Viewer = CreateObject("CrystalReports.CrystalReportInteractiveViewer")
With Viewer
  .reportSource = reportDocument
  .HasBooleanSearchButton = False
  .HasCrystalLogo = False
  .HasRefreshButton = True
  .IsDisplayGroupTree = False
  .HasPrintButton = true
  .PrintMode = 0 ' disable activeX Printing - set to 1 to enable (may require plug-in if set to 1)
  .IsOwnPage = true
End With
'

Set Session("viewer") = Viewer
on error resume next
Viewer.ProcessHTTPRequest Request, Response, Session

if err.number <> 0 then
  response.write "Failed to view report" & "</BR>"
  response.write "error number: " & err.number & "</BR>"
  response.write "error description: " & err.description
end if
Server.ScriptTimeout = 36000  ' Delay the next pass through the loop ???
Next 

%>
</BODY>
</HTML>


Hope it helps..


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,
Great..I was having problems with the delay loop anyway..
Mind sharing what you found?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Turkbear,

Can you give a little background on how this works, I am not a web person, I am reading the code and it looks like it opens a session with infoview, calls a report, the report calls the data (in that has all the credentials to run the report sent to the db) and then gets the results and serves up the crystal report? Is that correct?

Thanks so much!
satinsilhouette
 
HI,
The code I posted is not very good at multiple reports since the delay function does not work well..

As to the Reports, you cannot use names only the
ReportID # -

The code is not using InfoView ( although similar code is used by InfoView) - it uses direct access to the Crystal Enterprise objects that handle report access and display..

If the reports have no parameters, and have been published with the needed database login info, you should be able to populate the array and loop through the report ID#s, viewing each in turn, if I could figure out a way to delay calling the next one in the loop until the current one is done



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top