Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: SQL creation Post Reply Post New Topic
Author Message
Alif
Newbie
Newbie
Avatar

Joined: 13 Nov 2013
Location: Brunei Darussalam
Online Status: Offline
Posts: 3
Quote Alif Replybullet Topic: SQL creation
    Posted: 14 Nov 2013 at 3:57pm
can we create 12 sql for a report(i.e Jan - Dec). The queries also need to have user input that determine the range of date and runcontrol_id. I want the formula and the running total fields to check each table seperately.
alif
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 16 Nov 2013 at 9:36pm
Hi
 
Yes you can create a report using 12 queries (12 add commads) but need to join them using a common field.
 
Also you can specify a parameter in your where clause, it will take user input (date range) and filter the data as per the parameter value.
 
Regarding running totals or formulas, you need to mention what kind of results you are expecting and using what fields you want to arrive these.
 
 
Thanks,
Sastry
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 20 Nov 2013 at 4:53am
I agree with Sastry, that you can do it.

My question is why? You could retrieve all the data in one command and then pivot the data using a crosstabs.

Or you could define the column names in such a way that the can reorder the data or use the data however you want. I am assuming of course that what you are querying is the same from one month to the next.

Or you could take the really big step and use a stored procedure and do whatever you want with the data, far and away more flexible than joining the tables together.

Just some thoughts
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.