sql - Crystal Reports - side by side details from actual and last year, using UNION ALL -


I am creating a report that shows in the current and last year details section of the sales section.

The rows of the report have this type of structure:

  paragraph |||| Last year LastWirePrice ||| Real year Actual Europause  

There are two criteria on the report, start and end date.

I created a visual view_rops docs that will replace the original table daily docs, IsLastYear field to filter each row, but filter the dates of the classification of rows in the previous year or the actual year There are some problems coming in.

For example, StartDate 1-1 -2014 expiration date 28-4-2014 :

  IslamWire || Article || Volume || Value || Date 1A 0001 12 13 12 12-2-2013 00001 13 13, 12 12-2013  

What is the best way to update IsLastYear field?

I think the fact is that with the IsLastYear attribute You are using a scene to get a connection, it may screw you up. That's because using one scene, you are actually killing the base relationship. The IsLastYear attribute determines which your argument is doing something screwy.

Instead, consider using a temporary table to instantinate the connection with the IsLastYear attribute:

  ..., [date], when the year ([Date]) = Year (GateDet) - 1 after 1 ELSE 0 in the form of [IsLastYear] rows in #myTempTbl  
< p> If you are able to produce the dataset with a stored procedure, include a DROP TABLE #myTempTbl at the end of the sproc.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -