Solved

Formula to hide text/image while send for printing

Posted on 2004-09-27
6
473 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 50 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now