Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Upgrading specific abilities from VB6

$
0
0

In visual basic 6 the Format event of specific sections is used to run code to achieve out desired functionality, however, I am having difficulty figuring out how to do this in .NET.

I currently have Crystal Reports for Visual Studio installed and patched to SP9.

 

Specifically what was done is the following:

We retrieved the current page number being sent to the printer using the Report's BeforeFormatPage event (I think we can still do this)

We then retrieved a value from the section being printed and used it to update data in the database.  We only want the data updated if the page that contains that data is actually sent to the printer.  In one case this is being used for cheque reports as the client wants to track which actual cheques were printed, not those that were displayed in the crystal preview window, to ensure that the cheque number that was printed matches that which is stored in the database.

 

In another case the format event is used to load a picture into a report object.  Note that the code supports multiple types including png, tif, ico, or wmf.  It also makes an attempt to proportionally size the image to fit on the report.

I believe in some cases it resized the control on the report to prevent distortion of the image.

 

I see that the report has a FormatSection event, but I am unsure how to use the sectioncode to find the sectionobject being formatted.  I also wonder if this will happen when the specific pages of the document are sent to the printer so as to achieve the same effect we did in VB6.

 

I appreciate your assistance with this.

 

Thank you,

Shaggie


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>