Solved

Formula to hide text/image while send for printing

Posted on 2004-09-27
6
483 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

717 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