Previous functions work on the detail record and if the day group has multiple records then this would explain the results.
So we can use a variable instead.
Create a formula placed in the SubjectId Group Header.
WhileprintingRecords;
BooleanVar Result := false;
Create a formula and place it in...
I'm not sure why using the previous and next functions would not work in this situation.
Have you tried creating a separate formula to mark the records that you don't want to keep.
{table.results} = previous({table.results} and {table.subjID} = previous({table.subjID}) then 'Suppress'
and then...
A formula along these lines may be what you are looking for:
if isnull({table.PricingPromo}) or {table.PricingPromo}='' then
select {Table.CustomerCode}
case 86: select {Table.ProductType} case 'LL':25 case 'LS': 20 case 'PL': 32 case 'PS': 35 default: 1
case 87: select etc...
Create the sub-report and insert it into the ADP Group Header.
Link the Sub-Report to the Main Report on ADP Code.
Create a formula in the sub-report that captures the value or values you want from the Subreport as a Shared Variable.
//This subreport formula captures a field into a variable...
Create a Formula:
{Table.Date} - 3
Create a Group based on the Formula
Right Click the Group and choose Change Group.
On the Options Tab choose Customize Group Name Field:
Choose Use a Formula as a Group Name:
ToText ({Table.Date}, 'ddd dd MMM yyyy') & ' - ' & ToText({Table.Date}} + 6, 'ddd dd...
Try the following;
Group by Vehicle Id. Leave it as Ascending order (and forget about Original Order as that doesn't seem to be working out)
Insert Summary and choose Maximum of the Arrival time for the Vehicle Id Group.
Use the Group Sort Expert to now sort the groups based on the Maximum...
Database, Select Distinct Records
also seems to cause the 'original sort' to be lost (on my sample database).
If neither Database, Select Distinct Records nor the Record Selection Formula are the culprit then I would experiment with a copy of the report and strip virtually everything out to...
Using Crystal Reports 2008 the same behaviour seems to occur i.e. a formula using a shared variable from a sub-report placed in the Page Header section fails to export correctly to Excel when choosing Microsoft Excel (97 to 2003) Data Only.
I tried it with a shared stringVar and I got the same...
The filter may be affecting the order in which the records are returned.
Remove the filter and see if the report goes back to 'original sort' order by the group.
If it does go back to the order you want without the filter you may want to to take the filter out and use a Saved Data Filter instead...
As soon as you put a shared variable in a formula it will not appear in the Chart Expert on the Data tab in the available fields section.
Consequently it appears that you are not be able to base a chart on formulas that use the shared variable.
Shared NumberVar x //This will cause this formula...
Try:
WhilePrintingRecords; //Place in Group Footer
if {incident_log.vehicle_id} <> Next({incident_log.vehicle_id}) then
(
Time(Next({incident_log.incident_date_time})) -
Time(Minimum ({incident_log.incident_date_time}, {incident_log.vehicle_id}))
)/60
else 0;
Gordon
Crystalize
Assuming the report is sorted by OrderId this formula may be worth trying:
WhilePrintingRecords; //if the formula works without this line then it may be preferable to remove it
StringVar x;
if onfirstrecord or {MyTable.OrdId} <> previous({MyTable.OrdId}) then x := {MyTable.OrdQuestion} else x...
One approach using Underlay following section:
Create a Group based on Resource Search
Create a second Group based on Providers
Suppress the details as well as Group footers for both groups.
Move the Group 2 Name to the right about 2 inches.
In the Section expert choose Underlay the following...
Try:
SELECT "TaskNote"."WOID",
"TaskNote"."TaskNoteTypeId" AS 'TypeId',
"TaskNote"."TaskNoteCategoryId" AS 'CatId',
"TaskNote"."CreateDate" AS 'Date',
"TaskNote"."CreatedBy" AS 'Tech',
"TaskNote"."NoteText" AS 'Note'
FROM "TRACKIT_DATA"."dbo"."TaskNote"
WHERE "TaskNote"."WOID" IN
(
SELECT...
If you have to use a Group Selection formula (instead of a Record Selection formula) then yes that is the case - Grand Totals will include values from that group.
See note from previous post below:
If you end up using a Group Selection formula you may notice that Grand Totals still include...
Report, Select Expert, Record...
{@type} <> 'Own Collection'
or
not ({@type) like '*Own*')
A record selection formula will filter out records (and consequently groups) based on the {@type} formula.
If {@type} is not available for Record Selection (this can be the case if the timing of the...
SQL Expressions are not available in the Field Explorer if you use a command in the database expert.
The SQL Expressions heading will not appear below the Formula Field heading as it normally does when basing a report on tables.
Since you are using a command one option is to modify the command...
In a UNION join the number of columns must match.
The example below will cause an error because I'm trying to UNION 4 fields onto 2:
SELECT fielda, fieldb, fieldc, fieldd
FROM TableB
UNION
SELECT this, that
FROM TableA
Fill in the gaps so that the number of columns match:
SELECT fielda...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.