Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / November 2005

Tip: Looking for answers? Try searching our database.

Help Needed on Next() function of Crystal Reports

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nivasp - 11 Nov 2005 06:18 GMT
Can any of you help me by providing an Alternate Code Snippet in
reportingsvcs(SSRS) for Crystal Report Next() function.

Thanks in Advance.
Regards,
Nivasp74
Chris McGuigan - 11 Nov 2005 09:48 GMT
My CR knowledge is really rusty now, but I guess Next in CR is the
opposite of Previous in RS?
There isn't a Next function as such in RS. You'll need to do a bit of
lateral thinking.
If you are affecting formatting or showing or hiding rows/cells based
on the next value, try and switch your logic so you can use previous
instead.
If that's not possible in your scenario, try incorporating the next
value onto each row from the dataset, i.e.

    Select a.id, a.value, b.id, b.value
        From MyTable A
            Left Join MyTable B On B.Id = (A.Id + 1)

A good piece of advice when switching from CR to RS; try not to think
how you would do it in CR first - this will only cause you frustration!
RS is quite a different product in the way it works, as soon as you can
break the habit of thinking in Crystal terms, you'll find RS get's
easier.

Signature

Regards
Chris

> Can any of you help me by providing an Alternate Code Snippet in
> reportingsvcs(SSRS) for Crystal Report Next() function.
>
> Thanks in Advance.
> Regards,
> Nivasp74
Rob Olson - 30 Nov 2005 20:23 GMT
Not sure if you will find this useful for your situation or not, but I am in
the process of converting our reports from Crystal Reports to SQL Server
Reporting Services and I came up with the following alternative for the NEXT
function in our situation.

Many of our reports consist of multiple groups with subtotals and grand
totals in the group footers.  On some of the CR reports, we have a
conditional page break which forces a page break only if the NEXT group value
is equal to the current value.  For example: {@Bank_Name/Bank_HEADER} = Next
({@Bank_Name/Bank_HEADER})
This prevents a group footer from appearing on a single page by itself.

My SSRS solution is to place all the group footer information in the
innermost group footer, but within their own individual table rows with the
innermost group footer's Page break at End property checked.  Then I define
the table row's hidden property to an expression which evaluates the row
number of the group with the row count of the group, such as
=(RowNumber("table1_Group2")<>CountRows("table1_Group2")).

My Group 1 and Report Footers row hidden properties have the following
respective expressions:

=(RowNumber("table1_Group1")<>CountRows("table1_Group1"))
=(RowNumber("table1")<>CountRows("table1"))

As for the aggregate functions in each of the table rows, I apply the same
scope values to achieve the Group 2, Group 1, and report totals as in:  

=Count(Fields!Formula_Acct_Num.Value, "table1_Group2")
=Count(Fields!Formula_Acct_Num.Value, "table1_Group1")
=Count(Fields!Formula_Acct_Num.Value, "table1")

= Sum(Fields!Formula_Balance.Value, "table1_Group2")
= Sum(Fields!Formula_Balance.Value, "table1_Group1")
= Sum(Fields!Formula_Balance.Value, "table1")

Enjoy!

> My CR knowledge is really rusty now, but I guess Next in CR is the
> opposite of Previous in RS?
[quoted text clipped - 22 lines]
> > Regards,
> > Nivasp74
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.