Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Hide Blank Lines in Subreport Post Reply Post New Topic
Author Message
Heavenite
Newbie
Newbie


Joined: 11 Jun 2017
Online Status: Offline
Posts: 3
Quote Heavenite Replybullet Topic: Hide Blank Lines in Subreport
    Posted: 14 Jun 2017 at 11:38pm
Hi all,

I'm hoping you can help out, I've tried for the past week to fix this, but I just can't figure out a way.

I have a report which contains a subreport. In the subreport I have a formula that looks to see if the customer has a certain tax code in a field, if so I want Crystal to put a "Reverse Charge" text onto an invoice.

My formula reads as follows:
IF {TABVACBPR.VACBPR_0} = "EUR" then "Reverse Charge" else ""

This works absolutely fine, but the report still pulls through all of the other tax codes, but places them as blank lines. (There are 7 tax codes, so it creates 6 blank lines, with one of them saying "Reverse Charge").

I have attempted to put the formula inside a text object and "Suppress Embedded Field Blank Lines" but this makes no difference.

Is there any way I could create a formula that would check TABVACBPR to see if the client was using an EUR tax code and put in the Reverse Charge text, without pulling through the rest of the lines?

I hope this makes sense, please let me know if there's any more information that could help.

Thanks in advance,

Solomon
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Jun 2017 at 3:17am
I think you mean you have a sub report that is displaying text but you now want that same subreport text to conditionally suppress rows in the main report.
If so you need to create shared variables and pass the sub report value to the main report and use the shared variable result as your suppression criteria.
make sure the sub report executes in a section that is 'above' (e.g. report header) the detail section
IP IP Logged
Heavenite
Newbie
Newbie


Joined: 11 Jun 2017
Online Status: Offline
Posts: 3
Quote Heavenite Replybullet Posted: 15 Jun 2017 at 11:27pm
Thanks DBlank. I'm not entirely sure how to do that, but I'll go and investigate (i.e. Google ;)) now and see if I can work out how to do that.

Thanks,

Solomon
IP IP Logged
Heavenite
Newbie
Newbie


Joined: 11 Jun 2017
Online Status: Offline
Posts: 3
Quote Heavenite Replybullet Posted: 29 Jun 2017 at 1:49am
Hi DBlank,

I've attempted to do this, but am a bit confused about the order.

Should I put in two separate Formulas? One to do the IF and then one to return the Shared StringVar? At the moment it's still displaying all of the blank rows that I didn't want displaying.

Thanks,
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Jul 2017 at 7:09am
I am still unclear if the 'rows' you want to suppress are in the sub report or the main report.
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.020 seconds.