sap note 1320507 - how to change images dynamically in crystal reports based on parameter selection

2
Document Type "SAP Knowledge Base Article" 1320507 How to change images dynamically in Crystal Reports based on parameter selection? Language: English Version: 1 Validity: 20.03.2009 active Symptom Not able to change the Logo on the report header based on the parameter selection. Environment Crystal Reports XI Release 2 Crystal Reports 2008. Reproducing the Issue Create a report on Xtreme Sample database using the Customer table. Create a parameter on Country. Insert a Logo for Country U.S.A in the Report header. Crystal Reports XI Release 2 Crystal Reports 2008. Cause The image location has to be specified based on the parameter selection. Resolution 1. Insert the Logo as an OLE object in to the report. 2. Right click on the object >Click on Format Graphic. 3. Click on Picture tab. 4. Click on the X2 button for Graphic Location to open the formula editor. 5. Write a formula similar to this below: if {?country parameter} = "USA" then "C:\Documents and Settings:\Administrator:\My Documents:\USA.bmp" //the path would be the respective path of the image location" else if {?country parameter} = "India" then "C:\Documents and Settings:\Administrator:\My Documents:\India.bmp" else .. 6. Press Alt+C to check the formula. 7. Click on Save and Close. 8. Click on Ok. Keywords

Upload: dong-hai-nguyen

Post on 15-Sep-2015

219 views

Category:

Documents


2 download

DESCRIPTION

SAP Note 1320507

TRANSCRIPT

  • 19/6/2015 SAPNote1320507HowtochangeimagesdynamicallyinCrystalReportsbasedonparameterselection?

    http://search.sap.com/notes?id=0001320507&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735 1/2

    DocumentType"SAPKnowledgeBaseArticle"

    1320507HowtochangeimagesdynamicallyinCrystalReportsbasedonparameterselection?

    Language:English Version:1 Validity:20.03.2009active

    Symptom

    NotabletochangetheLogoonthereportheaderbasedontheparameterselection.

    Environment

    CrystalReportsXIRelease2CrystalReports2008.

    ReproducingtheIssue

    CreateareportonXtremeSampledatabaseusingtheCustomertable.

    CreateaparameteronCountry.

    InsertaLogoforCountryU.S.AintheReportheader.

    CrystalReportsXIRelease2CrystalReports2008.

    Cause

    Theimagelocationhastobespecifiedbasedontheparameterselection.

    Resolution

    1. InserttheLogoasanOLEobjectintothereport.2. Rightclickontheobject>ClickonFormatGraphic.3. ClickonPicturetab.4. ClickontheX2buttonforGraphicLocationtoopentheformulaeditor.5. Writeaformulasimilartothisbelow:

    if{?countryparameter}="USA"then"C:\DocumentsandSettings:\Administrator:\MyDocuments:\USA.bmp"

    //thepathwouldbetherespectivepathoftheimagelocation"

    elseif{?countryparameter}="India"then"C:\DocumentsandSettings:\Administrator:\MyDocuments:\India.bmp"

    else..

    6.PressAlt+Ctochecktheformula.

    7.ClickonSaveandClose.

    8.ClickonOk.

    Keywords

  • 19/6/2015 SAPNote1320507HowtochangeimagesdynamicallyinCrystalReportsbasedonparameterselection?

    http://search.sap.com/notes?id=0001320507&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735 2/2

    dynamic

    ReleasedOn 24.11.200915:44:44ReleaseStatus ReleasedtoCustomerComponent BIRACRPriority NormalCategory Problem

    Product

    Product ProductVersionSAPCrystalReports CrystalReports2008V0

    SAPCrystalReportsXIR2