
Ad-Hoc Web Reporting Via Crystal Reports?
We use our own asp for asking for criteria for subsequent reports. I
can send you some samples if you decide to do a proprietary solution.
Briefly:
ASP JavaScript ------------ Results in a Date range.
(the ASP page is designed to ask certain questions, in this example,
from/to dates only)
function bntPrepareReport_onclick() {
//prepares outgoing xml from web page controls
var xmlRptSelection = initializeXMLDocument();
var curNode = xmlRptSelection.selectSingleNode("xml/DATA");
addElement(xmlRptSelection, curNode , "Selection",
mainform.SelectedReport.value);
addElement(xmlRptSelection, curNode, "DBTarget", "461");
addElement(xmlRptSelection, curNode, "ConnType", "1");
addElement(xmlRptSelection, curNode, "selectedfromdate",
mainform.fromdate.value);
addElement(xmlRptSelection, curNode, "selectedtodate",
mainform.todate.value);
VB------------- Processes incoming parameters
in this example CreateReport is the CRAXDRT.Report object
'passes xml element data to report object
Select Case LCase(CreateReport.FormulaFields(i).FormulaFieldName)
Case "fromdate"
strValue = xmlGetElement(xmlParams, curNode, "FromDate")
If strValue > "" Then
CreateReport.FormulaFields.Item(i).Text = "'" &
CStr(CDate(strValue)) & "'"
End If
Case "todate"
strValue = xmlGetElement(xmlParams, curNode, "ToDate")
If strValue > "" Then
CreateReport.FormulaFields.Item(i).Text = "'" &
CStr(CDate(strValue)) & "'"
End If
end select
Then continue with producing the report. This assumes you are using
the FromDate and ToDate formulas as part of the report design.
Pretty easy but as with anything in crystal, can be problematic :)
HTH
kent
Quote:
> I've been working as a consultant for a large corporation for the past
> few months. I have, thus far, designed approx. 275 custom Crystal
> Report items that are able to be generated via the company's Intranet
> site.
> These 275 reports are all "canned" reports that don't allow for the
> adjustment of any criteria/parameters behind the reports.
> Before I continue, the company is using Crystal Reports 8.0, and the
> reports all retrieve information from an Oracle 8.0 database.
> The reports are very close to all being finalized, but I've just been
> informed that several key users would like the ability to generate the
> existing reports, implement a few on-the-fly changes to the criteria,
> and then proceed with generating the adjusted report.
> For example, let's say I've got a report that presents information for
> males and females and it's a canned report that allows no on-the-fly
> ad-hoc modifications at run-time. What they are wanting to do is have
> the ability for a user to generate the report, decide that they really
> would only like to see info. for females (no males) under the age of
> 50 and only those females that live in Florida. This is just one
> example. It may also be that the next person that generates the
> report would like to implement an entirely different set of filtering
> criteria in order to only see information on the report for males that
> are caucasian and are non-smokers. (Get the drift? The criteria
> could be endless and on an endless # of user-desired fields.)
> Is their any product and/or add-on made by either Crystal Decisions or
> another company that would allow for Web-based ad-hoc report
> adjustment/filtering like I've described above?
> Any suggestions/information are greatly appreciated.
> Thanks!
> Sincerely,
> Brad H. McCollum