What internet address is the user pulling a report on.

mcjann
mcjann used Ask the Experts™
on
Experts,

Using Crystal Report 2008 (version 12.1.0.892) with web application "TrackWise" (version 7.9)

TrackWise users can login into one of three URLs to generate the report. The report has a field for document ID that is hyperlinked to access the specific document. The problem is that the formatting formula specifies one of the URLs and if that is not the one the user is logged into the link does not work.

Is there a way, in Crystal, to detect the URL the user has accessed. This will enable me to use if statement so the hyperlink works correctly.

Any thoughts or Additional Questions Out There?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
bbaoIT Consultant

Commented:
better have an example please??
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
I don't think there is a way to detect the path the user logged in from.

Can a user log in from any of the 3 URLs or does he log in from the same URL everytime?

mlmcc

Author

Commented:
User can login on any one of the available links. Once logged in user navigates to a screen to generate the report. Is possible to get the URL from the properties of the current web page?

I can right click the page, access the properties and get this information:  http://cvusat-s3793/TWQA/servlet/TeamAccess/RASViewer?action=execute&report_type=multi

If that can be access programmatically I can use instring function to look for s3793, or s3794 or s3795 then set the hyper link based on that.
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
You might be able to write a UFL that Crystal can call to get that information.  The result of that formula would be the input to retrieve the document.


mlmcc
Commented:
Unfortunately, TrackWise does not pass the URL into the Crystal Reports as a parameter and it would take some coding but this issue is not that significant to go off developing custom code.  

FYI here’s a list of parameters that are passing into the reports:
SPHourOffset
SPMinuteOffset
nUserRelId
nQueryId
SPQueryId
SPQueryName
SPQueryHeading
SPScope
SPUser
SID
DBServer
SPActivityDateStart
SPActivityDateEnd    
SPTimeZone
SPProjects
SPDivisions
SPDivisionsProjects

Author

Commented:
Found and posted a solution to my own question.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial