简体   繁体   中英

Dynamically set Crystal Report Viewer parameter default value

We are using the Crystal Report viewer (XI I believe but we can upgrade) with a VFP front end.

Is there some way to dynamically set the parameter default value at run time? For example, If the user is viewing an invoice and they try to run a report, I would like it to automatically default to the current invoice. As it stands right now, they have to type in the invoice number even though they already have the actual invoice already open.

If not, is there a better viewer available that we could use to accomplish this goal?

I currently use VFP with Crystal Reports in Accountmate SQL (AMSQL). AMSQL has its own blackbox code to do what you are asking so I can't give details on how it is done, but I do set parameters dynamicaly (eg invoice#) and Crystal generates a report based on the parameters sent.

I know you can accomplish this in your case by creating a Crystal Reports object in VFP, thereby exposing Crystal properties, events and methods to VFP. Craig Bernston has a good article on what you are looking for at: http://www.craigberntson.com/docs/integratingcr.pdf

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM