Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Find difference betwn rows and change Font color Post Reply Post New Topic
Author Message
CrystalBoy
Newbie
Newbie
Avatar

Joined: 22 May 2007
Location: United States
Online Status: Offline
Posts: 2
Quote CrystalBoy Replybullet Topic: Find difference betwn rows and change Font color
    Posted: 22 May 2007 at 4:37pm
Hi,
 
  I am new to crystal reports.I am trying to create a report in which i will be comparing records from 2 different tables and will be displaying record from both the Databases simultaneously.
 
  The issue is i need to highlight the columns which is different.For example
          Id   Name    Location     Gender   
Row1  1     Jazz       US             Male
Row2  1     Jazz       UK             Male
 
I will be comparing both the rows and wherever i find a difference i need to changes the font color.
 
 
Thank you
 
 
IP IP Logged
GuestX
Newbie
Newbie


Joined: 17 May 2007
Online Status: Offline
Posts: 12
Quote GuestX Replybullet Posted: 22 May 2007 at 5:40pm
right click on label that will have value that can have differend colors
/format field/font/click  script button(x+2|pen)
and script would be something like:

if Table1.Location<>Table2.Location then
crRed else
cdBlack;

I didnt test it.
IP IP Logged
RobV
Newbie
Newbie
Avatar

Joined: 26 Apr 2007
Location: United Kingdom
Online Status: Offline
Posts: 13
Quote RobV Replybullet Posted: 23 May 2007 at 1:29am

Hi,

The alternative to using formulas is to add a second details section.And drop Table1 into D1 and Table2 into D2.
 
 
This will allow you complete formating and editing control over both tables without cluttering your report with formulas.
 
Take it Easy
 
RobV
IP IP Logged
CrystalBoy
Newbie
Newbie
Avatar

Joined: 22 May 2007
Location: United States
Online Status: Offline
Posts: 2
Quote CrystalBoy Replybullet Posted: 23 May 2007 at 11:36am
Thanks,But after adding two section how do i do the formatting.I was planning to use a view which will have all the data .For Example
 
          Id   Name    Location     Gender   
Row1  1     Jazz       US             Male
Row2  1     Jazz       UK             Male
Row3 2     Tod         IND            Male
Row4  2    Tod         IND          FeMale
Row5  3    Mean       US             Male
Row6  3   Meany      UK             Male
There would be exactly 2 records for an id ,one from both tables.
Please advise.
 


Edited by CrystalBoy - 23 May 2007 at 11:58am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.015 seconds.