Solved

Formula to hide text/image while send for printing

Posted on 2004-09-27
6
472 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:zoelam
Comment Utility
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
Comment Utility
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
Comment Utility
i can't get it work though. no idea how to look for report object
anyway thanks for the idea contribution
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

13 Experts available now in Live!

Get 1:1 Help Now