Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Title Page with multiple possibilities...Help!
Message
De
30/06/2010 14:39:50
Scott Malinowski
Arizona Fox Software LLC
Arizona, États-Unis
 
 
À
30/06/2010 14:24:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01471078
Message ID:
01471104
Vues:
46
>>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

Sergio,

Thanks much for your reply. As far as the calling from multiple places, we have business objects and a heirarchy in our application that ould make implemented what you suggested...well, a lot of work. We seem to have that part working ok.

But, the thing about the title pages on reports with textmerge sounds interesting.

On the other hand, I have been looking at your Report Sculptor as a possible solution. I have been trying to get it to work in devleopment mode and it doesn't seem to find GetRsObject() ?? Also, I can't locate the _oRSGO object you mention in your documentation? I followed your readme.txt file instructions and think I have everything done, but maybe not? Is there a path change required?

I thought I'd split out the title page into a separate report since it will be different depending on where the report was called from. Then, use your program "i_want_to_merge_two_frx_in_the_same_preview.prg" example to run the title page, then the regular report right behind it. That might just work...your thoughts on this?

Thanks again Sergio!

Scott M.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform