Monday, March 19, 2012
Crystal Report.passing para and fatch record in Crystal Report
I m newer to crystal Report.i become crystal Report.now i want ,
I become Vb form which have ID and Date ,
i want selct id and date from vb form and searching that matching records in table and display in crystal report ..
how can i do this...
plz...help me..it's urgent...
Thanx in Advance
Sabina Maniar
U.A.EYou can either use Parameters or Selection formula
Refer http://www.dev-archive.com/forum/showthread.php?t=395587
Crystal Report Summary
I am trying to work on the Xtreme Sample database provided with Crystal. Let me explain what I am trying to achieve.
I am trying to populate the list of customers (for bicycle parts) grouped by customer name and then by Order Id. My selection criteria are the country needs to be USA, the orders placed must be in the year 2001 and the "Customer total" (the total price for given customer) should exceed $40,000.
The "Customer total" is of course the summary of line total(which is the product of price of each unit and quantity ordered) for each customer group. I also have a "grand total" (summary) for the report footer which will give me the total amount for all customers.
The problem im facing is that when I apply the first two conditions using the 'Select Expert', ie the country being USA and order placed for year 2001, the "grand total" I get makes sense.
But when I apply the third condition, (which is the group total for customers need to be greater than 40000), the preview shows me the customers whose totals are greater than $40,000 but my "grand total" remains the same (as when I applied the first two selection criteria).
I wish to know if the group totals cannot be used in the select expert while taking summaries. And is there a way to overcome it and achieve my requirement, i.e., to get my grand total only for customers whose group totals are greater than $40,000.
Thanking you in advance for your help.
SeshuIf you want your troubles go away use SimulReport.Net. It is the best solution in this sphere.
Sunday, March 11, 2012
crystal report failed after installed
I've created an application using VB to manipulate data from SQL servers and getting help from Crystal Reports too.
After I finished, I deployed it as usual, and it did, to a computer without VB & Crystal Report. But when I tried to run on the target PC it always returns error when I choose to view a report from crystal report form that I've created. (I tested on my other report view which directly from SQL to VB without Crystal Report, and it runs perfectly)
Please, tell me what is going on, is it because of the Windows version that causing these errors? (I savd my work with XP but deploy them in a Win98 PC)
Thanks.What's the error message that you're getting? Did you make sure you deployed all the dll's that you needed along with all the dependencies?
If you give a little more info about how you use Crystal with VB, it will help us to be able to help you better.
Sunday, February 19, 2012
cross table
Sir,
My query is
select convert(datetime,task_date) as date,
sum(Case status_id when 1000 Then 7 else 0 end) as Programming,
sum(Case status_id when 1016 Then 5 else 0 end) as Design,
sum(Case status_id when 1752 Then 4 else 0 end) as Upload,
sum(Case status_id when 1032 Then 2 else 0 end) as Testing,
sum(Case status_id when 1128 Then 1 else 0 end) as Meeting,
sum(Case status_id when 1272 Then 1 else 0 end) as Others
from task_table where user_id='EMP10028' and task_date='9/11/2006'
group by task_date
union
select convert(datetime,task_date) as date,
sum(Case status_id when 1000 Then 7 else 0 end) as Programming,
sum(Case status_id when 1016 Then 5 else 0 end) as Design,
sum(Case status_id when 1752 Then 4 else 0 end) as Upload,
sum(Case status_id when 1032 Then 2 else 0 end) as Testing,
sum(Case status_id when 1128 Then 1 else 0 end) as Meeting,
sum(Case status_id when 1272 Then 1 else 0 end) as Others
from task_table where user_id='EMP10028' and task_date='9/12/2006'
group by task_date
union
select convert(datetime,task_date) as date,
sum(Case status_id when 1000 Then 7 else 0 end) as Programming,
sum(Case status_id when 1016 Then 5 else 0 end) as Design,
sum(Case status_id when 1752 Then 4 else 0 end) as Upload,
sum(Case status_id when 1032 Then 2 else 0 end) as Testing,
sum(Case status_id when 1128 Then 1 else 0 end) as Meeting,
sum(Case status_id when 1272 Then 1 else 0 end) as Others
from task_table where user_id='EMP10028' and task_date='9/13/2006'
group by task_date
union
select convert(datetime,task_date) as date,
sum(Case status_id when 1000 Then 7 else 0 end) as Programming,
sum(Case status_id when 1016 Then 5 else 0 end) as Design,
sum(Case status_id when 1752 Then 4 else 0 end) as Upload,
sum(Case status_id when 1032 Then 2 else 0 end) as Testing,
sum(Case status_id when 1128 Then 1 else 0 end) as Meeting,
sum(Case status_id when 1272 Then 1 else 0 end) as Others
from task_table where user_id='EMP10028' and task_date='9/14/2006'
group by task_date
union
select convert(datetime,task_date) as date,
sum(Case status_id when 1000 Then 7 else 0 end) as Programming,
sum(Case status_id when 1016 Then 5 else 0 end) as Design,
sum(Case status_id when 1752 Then 4 else 0 end) as Upload,
sum(Case status_id when 1032 Then 2 else 0 end) as Testing,
sum(Case status_id when 1128 Then 1 else 0 end) as Meeting,
sum(Case status_id when 1272 Then 1 else 0 end) as Others
from task_table where user_id='EMP10028' and task_date='9/15/2006'
group by task_date
union
select convert(datetime,task_date) as date,
sum(Case status_id when 1000 Then 7 else 0 end) as Programming,
sum(Case status_id when 1016 Then 5 else 0 end) as Design,
sum(Case status_id when 1752 Then 4 else 0 end) as Upload,
sum(Case status_id when 1032 Then 2 else 0 end) as Testing,
sum(Case status_id when 1128 Then 1 else 0 end) as Meeting,
sum(Case status_id when 1272 Then 1 else 0 end) as Others
from task_table where user_id='EMP10028' and task_date='9/16/2006'
group by task_date
My out put is
Date Program Design Upload Testing Meeting Others
2006-09-11 00:00:00.000 42 0 0 8 2 1
2006-09-12 00:00:00.000 77 0 0 4 0 0
2006-09-13 00:00:00.000 56 0 0 8 0 1
2006-09-14 00:00:00.000 63 0 0 6 0 1
2006-09-15 00:00:00.000 63 0 0 6 0 1
Now i want in below format
2006-09-11 2006-09-11 etc
Program 42 77
Design 0 0
Upload 0 0
Testing 8 4
Meeting 2 0
Others 1 0
Total 53 81
How to convert in this format .
--From your output as table:transposetable$:
SELECT ISNULL(cat, 'Total') ,SUM([9/11/2006]) AS '9/11/2006',SUM([9/12/2006]) AS '9/12/2006',SUM([9/13/2006]) AS '9/13/2006',SUM([9/14/2006]) AS '9/14/2006',
SUM([9/15/2006]) AS '9/15/2006'
FROM (SELECT cat, MIN(CASE WHEN t.tDate = '9/11/2006' THEN Program END) AS '9/11/2006',
MIN(CASE WHEN t.tDate = '9/12/2006' THEN Program END) AS '9/12/2006',
MIN(CASE WHEN t.tDate = '9/13/2006' THEN Program END) AS '9/13/2006',
MIN(CASE WHEN t.tDate = '9/14/2006' THEN Program END) AS '9/14/2006',
MIN(CASE WHEN t.tDate= '9/15/2006' THEN Program END) AS '9/15/2006'
FROM
(SELECT 'Program' as cat, tDate, Program FROM transposetable$
UNION ALL
SELECT 'Design', tDate, Design FROM transposetable$
UNION ALL
SELECT 'Upload',tDate, Upload FROM transposetable$
UNION ALL
SELECT 'Testing', tDate, Testing FROM transposetable$
UNION ALL
SELECT 'Meeting', tDate, Meeting FROM transposetable$
UNION ALL
SELECT 'Others', tDate, Others FROM transposetable$
) t
GROUP BY cat ) x
GROUP BY cat
WITH ROLLUP
|||--SQL Server 2005, Louis's idea. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=326847&SiteID=1
WITH myCTE as(
select tDate, cat, value
from ( select tDate, Program, Design, Upload, Testing, Meeting,Others
from transposetable$) p
UNPIVOT
(value for cat in ([Program], [Design], [Upload],[Testing],[Meeting],[Others])) as unpvt)
SELECT ISNULL(cat, 'Total'),SUM([9/11/2006]) AS '9/11/2006',SUM([9/12/2006]) AS '9/12/2006',SUM([9/13/2006]) AS '9/13/2006',SUM([9/14/2006]) AS '9/14/2006',SUM([9/15/2006]) AS '9/15/2006'
FROM
(select cat, tDate,value
from myCTE) as rotated
PIVOT
(SUM(value) FOR tDate in ([9/11/2006],[9/12/2006],[9/13/2006],[9/14/2006],[9/15/2006])) as pvt
GROUP BY cat
WITH ROLLUP
|||Hi,
have you looked at the UNPIVOT function?
Sten-Gunnar