Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing variables to report
Message
De
20/11/2002 19:05:48
 
 
À
20/11/2002 09:48:57
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00722790
Message ID:
00724990
Vues:
54
Yau,

I don't think that approach will work. I tried to make a copy of the .frx/.frt files, pogrammatically alter opentables() code (in the tag field of dataenvironment record), and recompile the report...but the changes would never take hold in the tag2 field (which appears to be the compiled version of the code).

Using PREVIEW NOWAIT is riddled with problems:

1) To preview two copies of the same report format, you need to make a unique copy of the .frx/.frt files for each additional preview. This is no big deal, but you'll have to clean up these temporary files at some point in time...do this at form close is won't necessarily work, because a user could close the form while the preview window is still open.

2) You are forced to use private datasession in report, to prevent an open dialog from displaying when paging beyond page 1 of report. However, there is no way to pass parameters to the report form itself. I suppose you could use p-views from the report...I didn't explore this.

The closest I came to something functional was by using TEXTMERGE/TEXT/ENDTEXT (from within the form...before running report) to create a temporary .prg file. This file contained the SQL-Select statements necessary to create the report cursors. The opentables() of the report dataenvironment made a call to this temporary program, which always has the same name. This can cause problems in a multi-user environment. The temporary program would have to be created on each users local drive to be safe.

Here is the most bulletproof method I can think of: Programmatically create another file format, such as a .PDF file, and use the browser control on a form to display the reports to the user. You could have a listbox on the form that allows the user to easily switch between different previews. It would be pretty easy to implement, but it may run too slow...

Sorry I can't do better than this,

-steve


>I'm basically trying to make all the reports in my application available to my user concurrently as sometimes they need to view several reports at the same time and make comparisons. Including the same report with different parameters.
>Could I pass parameters as follow:-
>sele * from reportfile.frx ;
>union all ;
>sele * xxx,yyy from myparameterfile ;
>into cursor cursorname
>
>Then I call report form cursorname ....
>In this case, the additional records that I append to the reportfile are the additional parameters passed in as though I were using the addproperty method in the dataenvironment of the report?
>
>I'm doing some experiment on this at the moment and have trouble identifying the relevant data to fill all the fields in the second part of the query above.
>
>Do let me know if this method is possible at all.
>Regards
>Yau
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform