Showing posts with label section. Show all posts
Showing posts with label section. Show all posts

Sunday, March 25, 2012

Crystal Syntax Problem

I have created a Crystal Report with a section that needs to be suppressed when there is no data. I used an "if then else" statement using the basic syntax of Crystal on the suppress control option of a textbox.

The code is as follows:

if {GetData;1.Complaint} = "" then
formula = True
else
formula = false
end if

Most of the time it works just fine, however on occasion I get the following error:

Error in formula <Object_Visibility>.
if {GetData;1.Complaint} = "" then

Exception Target Site: []N

I am not sure what causes this error. As a note this Report is used in conjuction with Sql Server and a VB.NET application. Any help given is greatly appreciated.Make sure that the condition does not return null value|||It could return a null value. What can I do in the Crystal Report to account for that? Any help given is greatly appreciated.|||Try this

if {GetData;1.Complaint} = "" or isnull({GetData;1.Complaint}) = True then
formula = True
else
formula = false
end if|||It still gave me the same error. Not sure what to do. Any theories?sql

Tuesday, March 20, 2012

Crystal Reports +Selection of a particular section

Hi
I am new to .NET and my first assignment is to make to develop Crystal Reports for an applicaiton.This is a pure windows based application.
I have different types of data to be printed based on the selection in a check box.

Can I make a section added by me "visible" based on the data that i checked to be pritned.If so ,please help me with some sampel code.Visible I mean ,the checked data should be shown after I run the application

Hope to hear from some one soon.I spent the whole day searching for some tips!!!Hi,

At first create one Project and add one form into the project...... add option controls to it and add 1 button control to it and name it as generate report..in Generate report click event add this code.....Don't forget to get Crystal Report Viewer on to the form....

Declaration section.........

Public ReportType As String
Public FAErlangs As New FA_ErlangProjections
Public FARProjections As New FA_RadiosProjection
Public FATProjections As New FA_TimeslotsProjection

in button click event......

If optTrafficProjections.Checked = True Then
CrystalReportViewer1.ReportSource = FAErlangs
CrystalReportViewer1.EnableDrillDown = False
ElseIf optFARProj.Checked = True Then
CrystalReportViewer1.ReportSource = FARProjections
CrystalReportViewer1.EnableDrillDown = False
ElseIf optFATProj.Checked = True Then
CrystalReportViewer1.ReportSource = FATProjections
CrystalReportViewer1.EnableDrillDown = False
End If

hope this works for you...... if you have any questions mail me at garlapati76@.yahoo.com.

Thanks.sql

Crystal Reports - Suppress Section

Hi,

How do one suppress a section if ANOTHER section is suppressed.

The one section holds details such as Name, Surname, Contact Number.
I have insert a "Suppress Blank Section" that will suppress that section if it's blank. However, how do i suppress the OTHER section based on this section.

Suppression Rule: ??

English: Suppress section 1 if section 2 is suppressed

Thanks in advance.Is that another section a GF/GH ?
If yes, yo can suppress it conditionally when:

Count ({table.name}, {table.group_field})=0

Monday, March 19, 2012

Crystal Report queries

In my Crystal Report's Details Section, the blank space after the last line is unnecessarily printed and this disturbs page length settings. How to delete the unnecessary lines below the last text in the Details Section, so that they are not printed as Blank.

I even dragged the dividing line to the last Text Box in the Details section, but the problem persists.

Secondly, when I issue a Print Command, a message box with no text appears. IT's title is "Crystal Reports ActiveX Designer" and an OK button. No other message.Hi,
In the details section set the property of Fit Section(Right click on the left side of Details section, select Fit section). Make sure that page footer does not have empty space.

Madhivanan|||I use CR 8.5, so you may need to tweak my examples a bit if you're using a different version.

1. To suppress the last blank line, go into the Format of that section. Find where you can check Suppress and click the 'x-2' next to it. Enter the following keyword in the formula section: OnLastRecord. This will suppress that section only on the last record.

2. To keep the program from popping up a box when printing, try Report.PrintOut False

Sunday, March 11, 2012

Crystal Report Page Skip Problem

Hello All,

I hav designed a report. It contacins more than 10 records in the details section. Mostly by 10 records the total page will be covered with some headers, so i need to skip the same headers to the next page for other records.

How can i skip to the next page if the Record count is > 10.

bye...

Tks & Rgds,
Poorni.To get at most 10 records per page, put a conditional new page after on the detail section with the formula
recordcound mod 10 = 0

This should be fine if you can be sure that 10 records won't take up more than 1 page.

Thursday, March 8, 2012

Crystal Report based on SQL Query!

Hi all,

I'm working on Crystal Reports in C#. (Ofcourse ... this section of Forums is on VB... But still... i may geta solution for my prob!!)

I need to generate a report based on data retrieved from an SQL Query. Every time I need to pass this Query dynamically to the report, I mean, my SQL Query is not constant but changes depending on certain criteria.

How can I let the Report know this changing Query??
I could generate a report based on a fixed SQL Query. But How to send this dynamically changing Query to the report??

Pls help me out.

Thank you all.

Bye.i dunno about C# but, u can do it in VB.Net by setting the dataset as report source.

may be it can be done in C# too.

Already answered how to do it in VB.net, in this forum.|||Mr. Addidas

Hope the field names and number of fields are same eventhough query is changing.

Why don't you go for procedure with parameters. You can pass parameter dynamically to procedure. In VB the crystal report control provide this facility by ".StoredProcParam(0)" property. obviously you can give any number of parameter.

Second method is you can pass total query as string parameter to procedure.

Crystal Report 8.0, Summary function !

Friends,

I'm working with crystal report 8.0 and SQL server.

I need to create a formula in group section, which should return the summary value of next group.

Or is there any function for get summary value if the group value is 'x'. same as SumIF( , , ) in excel.You need to write a formula having the code

If groupvalue='x' then
{field}

and use the summary using this

Wednesday, March 7, 2012

Crystal Mandatory Fields

Hiya,

I'm writing a crystal report linking with an Access Database.

basically I need to say If Address line1 = "" then display section A if not, do nothing,

but I have to do this for about 30 fields, How would i go about doing this?

Basically, it picks up data from the database,If everything is filled in when the report is run, the report orints out fine, if something is blank or a null value then it will pick up details section B which will say "The following fields need to be filled in" and then it will list the fields?

Any ideas

Thanksif you want to suppress whole section A if addressline ="" then right click on section A -> format section -> there is a button beside suppress text click on it and write down:
if addressline ="" then true else false

It will suppress that section and if you want to suppress some fields only then you have write this on each and every field in design view and for that you have to right click on that field -> formate field -> and here also same you have to write "if addressline ="" then true else false" in suppress button script.

Best of Luck|||better use

if isnull(addressline) then
true
else
false

Crystal Header Totals

I am a .Net developer and I am trying to print the totals from the detail section of the report into the Header. Is this possible. I am currently trying to Count the detail record that need to be counted and displaying them in the Header. ALL I get in the header is the first record in the Detail. Any help would be great.

ThanksWhy do you want to do this in Page Header? You can do this in Page Footer|||CR won't allow insertion of summary objects into the Page Header. You can put them in the Report Header though.|||CR won't allow insertion of summary objects into the Page Header. You can put them in the Report Header though.

It will show the summary at the end of report not everypage
You can do this pagewise by using formulae

Crystal Design

Hi,
I've a standard Invoice template with Page header, Group Header and Detail section. Invoice can be of one page or multiple pages depending on the number of invoice line items. I want to print Customer service and payment details (fixed text of about 40 lines) on the back of every page. How do I achieve this. Any help is much appreciated.

thanks & regards
radhastart a new page after group footer. if ur invoice is of one page , then this new page can be printed on back.|||Thanks for this. It works fine when the invoice has one page.
My report is grouped by Invoice Number so for an Invoice with multiple pages group footer prints on the last page of the invoice and the balnk page prints after the last page of the Invoice. My requirement is to print the details on the back of each page. Any help would be much appreciated.

thanks & regards

radha