Suppress a page of crystal report that contains data - vb.net

I have a report that is a combination of "Summary" and "Detail" reports. The data in the Detail section is in a subreport. Since this data is identical to the Summary section when there is only one record the client doesn't want to see the Detail section with only one record.
I can suppress headers, footers, pages without data but cannot find out how to suppress a page with data. Any help would be appreciated.
This needs more details. We have a Summary report and a Detail report. A client wanted them combined. We now have a Detail report with Headers, footers, sub reports etc. This detail report has Report Header sections and each section contains a section or sub report of the Summary report. When run this gives a Summary report, page break and the Detail report. I've tried conditionally suppressing the Detail sections when there was only one record. However, that leaves me with a blank last page that I cannot suppress.
I'm only curious if this can be done as the client has withdrawn their request ending my actual need.

Add a boolean parameter to your report. If your report data has one record set its value to true. Right click your subreport -> Format Object. Check the Suppress checkbox. Click the formula button to the right of the checkbox.
if <name of your parameter> then
formula = true
else
formula = false
end if
I'm using Basic syntax in CR formula editor

Related

How to mimic values in multi page SSRS Report

I need a lab report that has several pages. Each test has a unique reference number and I would like it to appear in the header according to what I have on the page. At the moment I only see one reference number and it remains unchanged after switching to another page. See attached image.
If possible, I would like to get rid of the SampleNo column so that its value is only in the header
The easiest way to do this is to reference the the textbox in your tablix that contains the "Sample No.".
Click the textbox that you have highlighted in the tablix, show the properties window (F4 in Visual Studio - can't remember in Report Builder, I think View/Properties).
Find the Name property of the textbox, this is often the name of the field it contains but not always.
In the example below the textbox name is 'oYear`
Next, set the expression in your header to be something like
=FIRST(ReportItems!oYear.Value)
Change oYear to whatever textbox name in your tablix is.
ReportItems refers to the rendered object name so here we just get the first on each page.
Here the first two pages from a small sample of data which groups by year.

how to setting section details in crystal report In order not to repeat itself

i want display data from crystal report with multiple section details, but i have problem when showing data in details with multiple row from view database. i will share a link picture from preview my report. may be you can understand what i mean. this link picture :
https://pics-edge.slickpic.com/NjU1ODM4NWRmY2Q4NQ,,/20170523/MTM4MTU1NzdmOGNm/p/1400/Slide1.jpg
https://pics-edge.slickpic.com/NjU1ODM4NWRmY2Q4NQ,,/20170523/MTM4MTU1Nzg4Yzg1/p/1400/Slide2.jpg
https://pics-edge.slickpic.com/NjU1ODM4NWRmY2Q4NQ,,/20170523/MTM4MTU1NzlkNThm/p/1400/Slide3.jpg
https://pics-edge.slickpic.com/NjU1ODM4NWRmY2Q4NQ,,/20170523/MTM4MTU1ODA1YzVk/p/1400/Slide4.jpg
https://pics-edge.slickpic.com/NjU1ODM4NWRmY2Q4NQ,,/20170523/MTM4MTU1ODE4Y2Q1/p/1400/Slide5.jpg
https://pics-edge.slickpic.com/NjU1ODM4NWRmY2Q4NQ,,/20170523/MTM4MTU1ODI4ZGNk/p/1400/Slide6.jpg
https://pics-edge.slickpic.com/NjU1ODM4NWRmY2Q4NQ,,/20170523/MTM4MTU1ODNkZGNm/p/1400/Slide7.jpg
and this is an information from my section expert :
Report Header
Page Header
Details
Details a Keep Together, Suppress Blank Section => is check
Details b Keep Together, Suppress Blank Section => is check
Details c Keep Together, Suppress Blank Section => is check
Details d Keep Together, Suppress Blank Section => is check
Page Footer
Report Footer
thanks for this
Try to Check "Suppress if Duplicate"

Creating a form where user inputs start and end dates of a report

I am working on MS Access 2007.
I am trying to create a form where the user will input 2 dates - a start date and an end date. I want these dates to become the boundaries of a report.
For example if the user inputs 01/03/14 and 10/03/14, I want Access to create a report of the data (eg Selling Price) between these two dates.
How can I do this?
There are a few ways to perform this.
The easiest, and most straight forward, in my personal opinion, involve creating a form where the user(s) will be entering Start/End dates, using a query that captures all of the information necessary for your report (including your date parameters), and the report with your query as the recordsource.
Form
Create a form with 2 text box controls: Name them whatever you like (StartDateTxt, EndDateTxt, for example), and a button control.
Query
Now, create a query, that retrieves all of the correct information you need for this report. I know you said selling price, for starters.
For the date fields you want to narrow down your search by, you need to put them in the WHERE clause or the Criteria field in QBE. It might look something like:
[Forms]![YourFormName]![StartDateTxt] and [Forms]![YourFormName]![EndDateTxt]
Note: Referencing fields can sometimes be tricky.
Report
Next, you need to create a report. If you're new to this, you can use the Report Wizard located at: Create - Reports section - Report Wizard.
You can select your query from the dropdown list on the first prompt, and add the fields you desire/need. Click next: Here you can sort your order of appearance on the report. Click next: Then you can justify your layout - if you aren't familiar with the differences, you can play around with them. Click next: Select a 'theme' to be applied to your report (font/colors, etc). Click next: Then you can either preview the report or Modify the report's design. (Really, you can do either, by clicking either button and clicking print preview or design view.)
If you click on Preview the report - Access should ask you for any parameters your underlying query requires.
Back to the form.
Right click on your button control. -> Properties -> Event -> OnClick -> click the [...] icon to the very right of the row. Select code builder.
VBA
In-between Private Sub and End Sub, you're going to write
DoCmd.OpenReport "YourReportName"
You can also check to make sure your report isn't already open.
Dim ReportName As String
ReportName = "YourReportName"
If CurrentProject.AllReports(ReportName).IsLoaded Then
DoCmd.Close acReport, ReportName
End If
DoCmd.OpenReport ReportName, acViewPreview
I hope this helps you/answers your question.
Edit: If anyone wants to edit/add on to this either by means of clarification or another alternative approach, please feel free. Just let me know.

sub report header need to show were ever sub report is shooing in crystal report

I have a crystal report like this:
In this crystal report i have 2 sub reports
1.Delparkingtype.rpt
2.DelivaryDetailedrpt
i want to show DelivaryDetailedrpt headers where ever showing DelivaryDetailedrpt report
i try to set property repeat on horizontal pages..but that is not affecting any where..
so what i have to do
if any one know how to show subreport header to show where ever sub report showing..please help me
Subreports don't have Page Headers or Footers, but there is a workaround to getting them displayed by creating a "dummy" group. A great tutorial on how to do this can be found here.

how to give condition on crystal reports field

i am having invoice table..
in this table i have added CHANGEADDRESS field, for anyone can change the clients address and on report it wil show Old address as wel as Changedaddress..
if there is changedaddress, it wil show the changeaddress field in reports
but
IF thers is no changed address, it should not show the changedaddress field in reports..
plzz help out for the condition
Right click on the changedaddress field on the report canvas then goto format field. On the common tab, next to the suppress option there is a formula editor icon (labelled X-2) - click it. In the formula editor you can now enter:
isnull({table.changedaddress}) or {table.changedaddress} = ''
Click save and close and you're done.