Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Title Page with multiple possibilities...Help!
Message
From
30/06/2010 14:24:48
 
 
To
30/06/2010 11:17:06
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01471078
Message ID:
01471099
Views:
67
>Hello All!
>
>Our system creates a report title page for every report that the user runs. This title page shows the selection/search criteria that was used to query for the report.
>
>The issue: reports can be initiated from four (4) separate places in the system: report manager (normal), a specific user form, from multiple search forms and from a report scheduling process.
>
>The one that is really causing me some issues is the search form option.
>
>There are 12 search forms in the system. Each search form has different search criteria on it.
>
>The problem is that a single report can then be run based on a variety of 12 different sets of search criteria.
>
>Putting all those fields in the Title Page band and controlling them with Print When clause is not a preferred solution.
>
>The REAL problem is the fields would all have to be overlaid in order to fit all the different criteria sets into an 8 1/2 by 11 inch window, which is a VFP restriction. Maintaining this every time we make a change to a search form would be a nightmare!
>
>Any ideas on how I can handle this one?

I use custom textmerge with variables for this. Criteria are taken into variables (could be properties) then simply merged into report criteria
lines of text (array elements).
          Account#                   nSomething
          ----------------------           --------
From: nFromVariable1           From...  x 
To....: nToVariable1               To..       y
         ------------------------ 

Inlist: cInlist 
Criteria text is to be shown with monospaced font (eg courrier new) to preserve alignment across multiple lines


As for calling report from multiple places;

Build it as session object!
define class myReportTask as session


procedure GetCriteria
** call some form to get criteria and fill variables
** if they are not already ready


procedure RunReport
   this.ExtractReportData()   
   this.PrepareRanges()
   .
   report form myFrx to printer ...

procedure ExtractReportData
    select blah blah ... 

procedure PrepareRanges
    **text merge variables or props


enddefine
Then run the whole thing literally from anywhere you want
local oRP
oRP=CreateObject('myReportTask')
*oRP.GetCriteria()  &&skip if criteria variables already exist
oRP.RunReport()
Apply extra effort to avoid usage of public variables ;)


HTH

Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform