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!

Reading Input from an Application

Status
Not open for further replies.
May 9, 2007
3
0
0
AU
Hi Im new to Crystal Reports, I would like to know how do I read inputs from applications. Eg: Reading a Date range etc.
 
Is this date range stored in a database somewhere and you want to read it? Or whatexactly are you trying to accomplish? Prompt the user for a date range?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
You can enter dates as parameters, and then select them in Reports > Selection Formulas > Record. Or you can select them based on the current date, e.g.
Code:
DateDiff ("d", {date1},  currentdate) <= 100
This would give you records for the last hundred days.

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Pass User Logon to BOBJ
Working in Crystal Reports Developer XI, with BusinessObjects XI, Release 2.

Working with a client replacing Oracle reports with Crystal Reports and have a problem passing credentials. The situation is: user places report request in Oracle application. From returned info, print request is sent via java report parameter form with session ID and credentials for ‘Reports’ user attached.
Parameters are then passed with session string using ‘Reports’ user, to access BOBJ, Infoview to run report.
Client wants to pass CurrentCEUserName to Infoview with request, and have authentication for the real versus reports user.
Basically, I proved to them that I can cut and paste the URL, use it to go to the report site, use the ‘Reports’ user to logon, and do anything I want, creating a security issue for the client – and creating my own problem!.
I have found a couple of references for formulas to set session and logon, and tried them. This one made the most sense:

Line 1: Set session("oRpt") = session("oApp").OpenReport
(“ReportPath”)
Line 2: Session("oRpt").database.tables
(1).SetLogonInfo "CurrentCEUserName",sServerName,sCurrentCEUserID,sPwd = ("")
Line 3: Session("oRpt").SQLQueryString = sSQL
session("oRpt").ReadRecords
Line 4: exit success commit;

I also tried just setting the logon, leaving out the session. Nothing works. Any ideas on what I need to do to get the logon to change when it gets to Infoview? Thanks.
 
disregard last - I posted in the wrong place!! Sorry brian.
 
Yes Mate,

I want to Prompt the user for a date range?

How do I do this?

 
If you enter a parameter, users who run it will always be prompted.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top