Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Conditional Statements in Crystal Reports

Conditional Statements in Crystal Reports

Scheduled Pinned Locked Moved Visual Basic
helpcomtutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Barathan
    wrote on last edited by
    #1

    Hi Friends, I am trying to load the dataset to populate my crystal report. While getting data i am using a formulae to calculate a profit margin here if any column has zero i have bypass the formulae calculation as it return some error. how to use conditional statements inside the Formulae like this if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 so please help...:confused: Thanks in Advance. Barathan.K barathank@gmail.com

    M 1 Reply Last reply
    0
    • B Barathan

      Hi Friends, I am trying to load the dataset to populate my crystal report. While getting data i am using a formulae to calculate a profit margin here if any column has zero i have bypass the formulae calculation as it return some error. how to use conditional statements inside the Formulae like this if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 so please help...:confused: Thanks in Advance. Barathan.K barathank@gmail.com

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      Barathan wrote: if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 The only thing I notice is you are missing the then keyword.

      if @Sale <> 0 and @Cost <> 0 then
      ({@Sale} / {@Cost} - (1/100) * 100) * 100

      Michael CP Blog [^] Development Blog [^]

      B 1 Reply Last reply
      0
      • M Michael P Butler

        Barathan wrote: if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 The only thing I notice is you are missing the then keyword.

        if @Sale <> 0 and @Cost <> 0 then
        ({@Sale} / {@Cost} - (1/100) * 100) * 100

        Michael CP Blog [^] Development Blog [^]

        B Offline
        B Offline
        Barathan
        wrote on last edited by
        #3

        thanks that works great:laugh: with regards, Barathan.K Barathan.K barathank@gmail.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups