?
Solved

Formula to hide text/image while send for printing

Posted on 2004-09-27
6
Medium Priority
?
492 Views
Last Modified: 2008-03-17
I'm using CR9, ASP and ActiveX viewer. I'm creating a report which will print on pre-printed form.

users are allow to preview the report before printing. so, i scan the image of the pre-printed form and placed in report header, then overlay with sections below which contains only data i want to print. i'm using this method coz i do not wish to show user only those data going to print without description.

for example :

Name  : John Smith (in  preview)
           
            John Smith (when send for print job, Name : is in pre-printed form)

while send for printing, how can i hide the image/text and print only the data i want on the pre-printed form?

urgent. pls help. thank you.

0
Comment
Question by:zoelam
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 12158664
Hello zoelam,

Sounds like you need to create a parameter in your report and then pass a value to the report to say whether you want to display or suppress the form.
Test the parameter value for this in the conditional suppression formula for the extra page header section containing the form.

I can't do the code though.

Pete
0
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 150 total points
ID: 12159176
If you're asking how to hide/change the text only when printing, the answer is that unfortunately you cannot do this.  

Pete's suggestion is the best you'll be able to do.  To elaborate, create a parameter of type string named "UsePrePrint".  Set the prompt text to something like "Are you printing to the pre-printed form" and allow 'Yes' or 'No' as the parameter values.

Now for name create a formula like this:

If {?UsePrePrint} = 'Yes' then 'Name: ' + {table.nameField} else {table.nameField};

When you call your report from asp the user will be prompted for this parameter.  You could handle the same logic in your asp application and then pass the parameter yourself if you prefer.

frodoman
0
 
LVL 10

Expert Comment

by:ebolek
ID: 12159967
The ony way to do is by writign a small application , you have to supress the image on the code before sending it to printer,

From the report definition collection of the reportdoccument, find the image object

Then set this property to true reportobject.supress= true

Regards
Emre
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 

Author Comment

by:zoelam
ID: 12166060
hi Emre,

do u mean i have to supress the image in ASP code?
how do i get the image object in the code? can u explain further?

thanks in advance...
0
 
LVL 10

Accepted Solution

by:
ebolek earned 150 total points
ID: 12168855
yes. This is how I do it in .net. Most probably if you are using ASP it will chnage a little but the concept is the same
foreach (CrystalDecisions.CrystalReports.Engine.ReportObject MyReportObject in MyReport.ReportDefinition.ReportObjects)
{
if (MyReportObject.Kind == CrystalDecisions.Shared.ReportObjectKind.PictureObject)
{
MyReportObject.supress = true
}
}
0
 

Author Comment

by:zoelam
ID: 12187481
i can't get it work though. no idea how to look for report object
anyway thanks for the idea contribution
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question