How can I create Processes for reporting?

Open discussion about our Asset Navigator application

How can I create Processes for reporting?

Postby axiomsystems on Tue Nov 12, 2002 5:30 am

Hi,

I am just starting to configure some reports, and I\'d like to have some selection screens pop up before reports are generated to allow me to select dates, for example, so that I can refine the contents of the report.

I assume this is done via Processes? If so, can you point me to where I could find out about these, as they are mentioned in the help file but as far as I can see there is no help on how to use it.

Many thanks

Paul :D
axiomsystems
Member
 
Posts: 16
Joined: Thu Sep 12, 2002 7:01 am

Postby surint on Tue Nov 12, 2002 9:26 am

Hi,

You need to specify AutoSearch fields for your reports. Take a look how it is in the standard \"Assets by User\" for example...
In the Report Designer go to Data tab, press button with \"magic glass\" in the window taht contains list of fields of query. In the dialog select fields you need to refine your search and check their \"AutoSearch\" property.

Hope this help.
surint
Senior
 
Posts: 77
Joined: Fri Mar 01, 2002 8:58 am

Another quick question on the same subject

Postby axiomsystems on Tue Nov 12, 2002 12:03 pm

Hi,

Many thanks for the prompt response, it helped a great deal. One more quick question:

Thanks to your response I\'ve now managed to set the autosearch up so that I can set date parameters (from and to dates) for some reports.

However, what I\'d like to do is to specify those parameters on the printed report - For example, say I run a report for 10/1/02 to 10/31/02, using autosearch. I\'d like to configure the report so that the title says, for instance call report from 10/1/02 to 10/31/02, taking the dates from my original search parameters.

Do you have a ny suggestion how I might do this? The only place the inputted parameters seem to be visible is in the search tab in the Data screen, but there seems to be no way to get them onto the report.

Thanks again

Paul
axiomsystems
Member
 
Posts: 16
Joined: Thu Sep 12, 2002 7:01 am

Postby mhull on Thu Oct 16, 2003 5:16 pm

Here is a procedure for displaying date parameter info. Thanks to Mildred Wylie for originally describing this procedure...



1. Set up autosearch criteria for each parameter
Contracts.End_Date >= 10/10/2003
Contracts.End_Date <= 05/26/2006
The resulting where clause should look like the one below:

WHERE
( Contracts.End_Date >= CONVERT(DATETIME,'2003-10-10',120)
)
AND ( Contracts.End_Date <=
CONVERT(DATETIME,'2006-05-26',120) )

2. Go to Design and Create two labels in the Header.
In my example Label12 represented the first parameter (10/10/2003) and
Label13 represented the second parameter (05/26/2006)


3. Under the CALC tab make sure you have the events Tab checked.
Right Click on the BeforePrint event
Click New
create the following code

begin
Label12.Caption := Report.AutoSearchFields[0].SearchExpression;
Label13.Caption := ReportAutoSearchFields[1].SearchExpression;
end;


Note: The ReportAutoSearchFields[ ] is an array.

4. Right Click in the Code area and select compile. The code will be
compiled. Click on Preview and you will see your parameters.

For Example:
Reporting Period: 10/10/2003 thru 05/26/2006
mhull
 

Ask for report parameters after modifying SQL?

Postby gifted_eagle1973 on Fri Oct 17, 2003 11:30 am

Great info so far!

I now have a question:

How do you ask for parameters for your report if you have already manually modified the SQL, making the "magic glass" inaccessible?
gifted_eagle1973
Senior
 
Posts: 53
Joined: Tue Jul 08, 2003 9:02 am

Postby mhull on Fri Oct 17, 2003 12:22 pm

You can't- autosearch is disabled as soon as you edit SQL manually. Please note that the above example does not require manual editing of SQL tab. The SQL included there is an example of what you will see under SQL tab after entering the suggested parameters under the search tab.
mhull
 

Add Feature

Postby gifted_eagle1973 on Fri Oct 17, 2003 2:08 pm

Could you have the development team add such a feature? I was thinking of trying to do it by creating an event, but I do not have time to invest or even know if that would be possible.
gifted_eagle1973
Senior
 
Posts: 53
Joined: Tue Jul 08, 2003 9:02 am

Postby mhull on Mon Oct 20, 2003 10:12 am

What specific changes do you need to make that involve manually editing the SQL tab? There may already be a way of doing it without editing SQL directly...
mhull
 

Postby Mark Evans on Mon Feb 21, 2005 2:23 pm

I have got the same problem - See 'Paramters Dissappeared After Altering SQL. I wanted to display one of two values for the status of help desk tickets - Either Closed for 'CLOSED' and 'RESOLVED' or Open for 'ASSIGNED' or 'UNASSIGNED'... The only way I could think of doing this was through altering the SQL and adding a CASE...

'SELECT CASE HD_Tickets.Status WHEN 'CLOSED' THEN 'Closed' WHEN 'RESOLVED THEN 'Closed' ELSE 'Open' END
, HD_Tickets.Submit_Date....

However in doing this the SEACH criteria have disappeared. Is there another way to perform the above without altering the SQL or bringing the Parameters back through the Calc module - Any help / advice would be very gratefully received...
Mark Evans
Newbie
 
Posts: 1
Joined: Fri Feb 04, 2005 7:45 am

Postby pwpaton on Wed Feb 23, 2005 5:32 pm

Hi Mark,

You can create a calculated field in the Data/Calcs tab with Expression as the Function type and put your entire Case statement in the expression field. Just insert everything between the CASE and END labels inclusive. (i.e. CASE HD_Tickets.Status WHEN 'CLOSED' THEN 'Closed' WHEN 'RESOLVED THEN 'Closed' ELSE 'Open' END) This will update the SQL statement automatically without disabling the autosearch function. Don't forget to update the Field Alias.

Regards, Patrick
pwpaton
Member
 
Posts: 15
Joined: Fri Apr 30, 2004 10:38 am


Return to Asset Navigator 4 Discussion

Who is online

Users browsing this forum: No registered users and 1 guest