Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Title Page with multiple possibilities...Help!
Message
From
30/06/2010 15:00:28
 
 
To
30/06/2010 14:39:50
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:
01471107
Views:
45
>>>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?


Hi Scott

If using 3p tool like RS is an option, then you can use even easier text merge
using RS smart text and make criteria section look really rally nice!
I use what I use because I had always normal page header first, then criteria on top of first page only, and then the rest of the report
(VFP6 legacy style...) BAck then I had to resort to single frx and printwhen 'woodo' {g}

To initialise RS is fairly easy;
All you need to do is run ReportSculptor.app once !


Here is init sequence that you need at the begin of your app
******************************************************************** RS INIT SEQUENCE
local cRs,cGdiPlusSys
cRS = '\\SomeMachine\RsServer\ReportSculptor.App'
do (cRS)

&&If not already initialised;

cGdiPlusSys=addbs(_oRSGO.RS_Root) + 'GdiPlusX\system.app'
do (cGdiPlusSys)
********************************************************************
Set classlib to addbs(home()) + "FFC\" + "_ReportListener.VCX"  additive
Next to this you need subclass of RS inside your general procs
and few function. Can help you directly on this if you don't manage via help
(huh I guess I need rewriting that readme.txt !)


Send me an email if you want me to help you with implementing this via RS

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

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

Click here to load this message in the networking platform