Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print optional columns - Crystal 7
Message
 
À
21/12/1999 13:12:45
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00306716
Message ID:
00306827
Vues:
32
>Colin,
>
>>How would I do something like the following:
>>
>>An option screen shows 5 checkboxes for each column in a report. The user can choose any combination of the 5 and the columns must print beside each other.
>>
>>i.e
>>User chooses Columns 1, 2 and 5. I should print
>>Column1 Column2 Column5
>>
>>User chooses Columns 2, 4 and 5. I should print
>>Column2 Column4 Column5
>>
>>User chooses Columns 1, 2, 4 and 5. I should print
>>Column1 Column2 Column4 Column5
>>
>>I am using Crystal Reports7. TIA
>
>The most constructive solution I know of, I using the RDC automation server in combination with the smartviewer control, though I'm not quite certain if it would be possible with the normal automation server. Here is how I would do it.
>
>Develop the report with the 5 columns, so default, all columns are displayed. Make five boolean parameterfields; one for each colomn. For each colomn object (field and heading I suppose) display the format editor and click the pencil to the right of the supress checkbox on the common tab. Fill in the corresponding parameterfield.
>
>You can save the report
>
>In runtime you can open the report with and pass the parameters with the paramterfielddefinitions object. Within the RDC automation server you can easely change the x position of each object within the report so you can eliminate the gaps if some columns are not displayed. Then asign the report to the AcxtiveX control and display the report. If you only want to print, you don't need the activeX and print inmidiately from within the automationserver
>
>Some code to get you started:
>
>x=createobject("CrystalRuntime.application") && start the RDC automation server
>oRep=x.openreport(cReport,1)
>
>* you need some code to pass the parameters through
>* you need some code to change the column x-pos.
>
>THISFORM.Rep=oRep
>THISFORM.CrViewer.ReportSource=orep
>THISFORM.CrViewer.Viewreport()
>
>or you want to print it out directly
>
>oRep.printout
>
>For more help, set the developers help (or just ask).
>
>Walter,

Thanks Walter, this is a good start. How do I get the CRViewer in my form?
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform