Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Tuesday, March 20, 2012

Crystal Reports 8.0 & long strings

Hello,
I need to know how can I display a fields data which has more than 255 chars.
Is there a solution of this problem?[ Moved thread ]|||where was this thread moved to? I am having this same issue.

Thanks.sql

Sunday, March 11, 2012

Crystal Report Prob

Thanx Andreas Masur.. But I couldn't solve my prob..Look at it please...

Attention Mr K Babu..Pl see my prob and give me a solution..

I have used the following in my project-
i) V B 6.0 as Front End Tool.
ii) Oracle 8 as RDBMS.
iii) Windows 2000 Advanced Server as Server O.S.
( The machine has dual O.S i.e Windows 98 SE also is there)
iv) Crystal Report 7.0 as Reporting Tool.

Now my problem is While calling a report from VB, I need to REFRESH and SAVE the report in Seagate Crystal Report, otherwise the latest data inserted does not show.

The part of coding used also given below-

RPT1.Selectionformula=Tablename.Fieldname
RPT1.Action=1
Some more points-
i) Another important point is I used DiscardSaveData property before Action property, even then it was not working.
ii) There is no Refresh method shows in the Property and Method List.
iii) Sometimes while saving the Report in Crustal Report I had to use Save As command as the report takes some other name having extension .TMP
iv) The error mostly I faced is "SQL Server could not found, Error 20599"- where as I did not use SQL Server and I used only Oracle 8..,

ThanxI use CrystalRyport. I want to print records in the same line in succession . How do i do?

Crystal report printing at multiple printers through VB6.0

Hello,
I already sent my problem. But, i didn't get any solution. So, i am sending it again.
I want to print a report in multiple printers in networking. How is it possible through VB6.0?
Please help me.
Regards,
RajasekharYou should be able to make a cycle for each printer you have,
and then print the report to that printer...
If using default, you could set in the cycle each printer as default
and print, then step to next printer...

Crystal Report parameter issue

Hello,

There is probably a really simple solution to this problem... but, here it is..

I am working on CR Designer v11 and have a report that uses a stored procedure. Originally, when the report was created, this stored procedure had one parameter. Since then, however, I have added an additional parameter to the SP in SQL. After doing so, I opened the report, in report designer, and manually added the new parameter to the parameter list. I then realized that I did not need to do this. The Verify Database function should auto populate the parameter list for me. So, I then deleted the parameter(that I had created manually) and performed the Verify Database. But now the parameter does not auto populate in the parameter list.

By deleting the parameter (that I had created manually), did I cause the designer to ignore this second parameter in the actual SP? How can I get the designer to auto populate the parameter list with this new parameter?

Try this forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=77&SiteID=1

crystal report help needed urgently

Hi, everyone

Can anybody pls help me in finding a solution for doing DOS printing through crystal report !!

My problem is my report has to get printed on a dot matrix printer and on a contineous stationary. and printing in windows based form is strictly not allowed.

I tried exporting the report in text format and printing. But the problem here is all the data exported gets compressed too much i.e. the space in 2 columns gets reduced too much and sometimes some data also gets deleted.crystal report preview is totally fine. Also I want to use Different pitch settings in the same report. I have seen that the lines dont get exported in text file. so i am confused what to do and how to do

Can anybody help me out fast.

ThanksHi, everyone

Can anybody pls help me in finding a solution for doing DOS printing through crystal report !!

My problem is my report has to get printed on a dot matrix printer and on a contineous stationary. and printing in windows based form is strictly not allowed.

I tried exporting the report in text format and printing. But the problem here is all the data exported gets compressed too much i.e. the space in 2 columns gets reduced too much and sometimes some data also gets deleted.crystal report preview is totally fine. Also I want to use Different pitch settings in the same report. I have seen that the lines dont get exported in text file. so i am confused what to do and how to do

Can anybody help me out fast.

Thanks

Hi Swapnil,
I think u can try storing printer fonts and drivers in ur reports.
Regards
Raheem AHmed.|||Hi
sraheem

thanks for sending the feedback. But i did that thing means, i tried printing using the printer fonts and it is printing really fast. But my problem is the headings are bold etc. that means i had to use escape sequence etc. and i dont now how to do it.

Exporting report really looses much of my data and formatting.

So please help

Thanks

Thursday, March 8, 2012

Crystal Report based on SQL Query!

Hi all,

I'm working on Crystal Reports in C#. (Ofcourse ... this section of Forums is on VB... But still... i may geta solution for my prob!!)

I need to generate a report based on data retrieved from an SQL Query. Every time I need to pass this Query dynamically to the report, I mean, my SQL Query is not constant but changes depending on certain criteria.

How can I let the Report know this changing Query??
I could generate a report based on a fixed SQL Query. But How to send this dynamically changing Query to the report??

Pls help me out.

Thank you all.

Bye.i dunno about C# but, u can do it in VB.Net by setting the dataset as report source.

may be it can be done in C# too.

Already answered how to do it in VB.net, in this forum.|||Mr. Addidas

Hope the field names and number of fields are same eventhough query is changing.

Why don't you go for procedure with parameters. You can pass parameter dynamically to procedure. In VB the crystal report control provide this facility by ".StoredProcParam(0)" property. obviously you can give any number of parameter.

Second method is you can pass total query as string parameter to procedure.

Saturday, February 25, 2012

Cross-tab Row Title

CR XI posted a work-around/solution for inserting a row title in a cross tab report by creating a separate "fake" group, overlaying it and copying the cross tab to the fake group's section. It also discussed horizontal pages.

How do you repeat the label on subsequent/multiple pages though?See if you find answer here

http://support.businessobjects.com/

Sunday, February 19, 2012

Cross Tab Report

Hi,

I need some help on crosstab query. I have tried the examles, but somehow, not able to find a right solution.

Any help will be appreciated. The report I would like to have is the one at the bottom.

thx.

Josh

Table Structure>

Brand Product Line Jan Feb Mar Total A Chocolate Volume 500 200 100 800 B FizzDrink Volume 250 300 200 750 A Chocolate Volume 230 100 120 450 A Chocolate Revenue 2,000 600 350 2,950 B FizzDrink Revenue 1,000 700 250 1,950 A Chocolate Revenue 800 400 550 1,750 A Chocolate AvgEarningPerProduct 4.00 3.00 3.50 3.69 B FizzDrink AvgEarningPerProduct 4.00 2.33 1.25 2.60 A Chocolate AvgEarningPerProduct 3.48 4.00 4.58 3.89

How the resultset should look like>

Brand Product Volume Revenue AvgEarningPerProduct Month A Chocolate 500 2,000 4.00 Jan A Chocolate 200 600 3.00 Feb A Chocolate 100 350 3.50 Mar A Chocolate 800 2,950 3.69 Total A Chocolate 230 800 3.48 Jan A Chocolate 100 400 4.00 Feb A Chocolate 120 550 4.58 Mar A Chocolate 450 1,750 3.89 Total B FizzDrink 250 1,000 4.00 Jan B FizzDrink 300 700 2.33 Feb B FizzDrink 200 250 1.25 Mar B FizzDrink 750 1,950 2.60 Total

This is not a crosstab report but an anti-crosstab report. Assuming SQL Server 2005, have you tried the new UNPIVOT function to unpivot the dataset?

Thursday, February 16, 2012

Cross Tab Query

Hi,

I need some help on crosstab query. I have tried the examles, but somehow, not able to find a right solution.

Any help will be appreciated.

thx.

Josh

Table Structure>

Brand Product Line Jan Feb Mar Total A Chocolate Volume 500 200 100 800 B FizzDrink Volume 250 300 200 750 A Chocolate Volume 230 100 120 450 A Chocolate Revenue 2,000 600 350 2,950 B FizzDrink Revenue 1,000 700 250 1,950 A Chocolate Revenue 800 400 550 1,750 A Chocolate AvgEarningPerProduct 4.00 3.00 3.50 3.69 B FizzDrink AvgEarningPerProduct 4.00 2.33 1.25 2.60 A Chocolate AvgEarningPerProduct 3.48 4.00 4.58 3.89

How the resultset should look like>

Brand Product Volume Revenue AvgEarningPerProduct Month A Chocolate 500 2,000 4.00 Jan A Chocolate 200 600 3.00 Feb A Chocolate 100 350 3.50 Mar A Chocolate 800 2,950 3.69 Total A Chocolate 230 800 3.48 Jan A Chocolate 100 400 4.00 Feb A Chocolate 120 550 4.58 Mar A Chocolate 450 1,750 3.89 Total B FizzDrink 250 1,000 4.00 Jan B FizzDrink 300 700 2.33 Feb B FizzDrink 200 250 1.25 Mar B FizzDrink 750 1,950 2.60 Total

select Brand, Product, Volume, Revenue,
AvgEarningPerProduct = Revenue * 1.0 / Volume,
Month
from
(
select Brand, Product,
Volume = case when Line = 'Volume' then Jan else 0 end,
Revenue = case when Line = 'Revenue' then Jan else 0 end,
Month = 'Jan'
from yourtable
union all
select Brand, Product,
Volume = case when Line = 'Volume' then Feb else 0 end,
Revenue = case when Line = 'Revenue' then Feb else 0 end,
Month = 'Feb'
from yourtable
union all
select Brand, Product,
Volume = case when Line = 'Volume' then Mar else 0 end,
Revenue = case when Line = 'Revenue' then Mar else 0 end,
Month = 'Mar'
from yourtable
)a|||

Hi Josh,

I'm not clear on having how you'd differentiate the multiple entries (I just added them together and recalculated average earnings):

Code Snippet

SELECT

Brand

, Product

, Volume

, Revenue

, Cast(Revenue*1./Volume As Decimal(5,2)) As AvgEarningPerProduct

, MonthName

FROM (

SELECT

Brand

, Product

, Sum(Case When Line = 'Volume' Then

Case MonthName

When 'jan' Then jan

When 'feb' Then feb

When 'mar' Then mar

When 'total' Then total

End

End

) Volume

, Sum(Case When line = 'Revenue' then

Case MonthName

When 'jan' Then jan

When 'feb' Then feb

When 'mar' Then mar

When 'total' Then total

End

End

) Revenue

, MonthName

, MonthNumber

FROM #data, (

SELECT 1 MonthNumber, 'Jan' MonthName UNION ALL

SELECT 2, 'Feb' UNION ALL

SELECT 3, 'Mar' UNION ALL

SELECT 13, 'Total') MonthData

GROUP BY Brand, Product, MonthName, MonthNumber

) Data

ORDER BY Brand, Product, MonthNumber;

Jamie

|||

Hi Tan,

Thanks for your help. The query now works perfect. The downside is performance. As I have 20 columns as the one i mentioned in example (Volume, Revenue etc.) and 12 months, it takes some time ro return the results.

BTW, there is aone small problem. Now when I pull the data in reports the month get sorted alphabeticall i.e. April onwards.

Any suggestion, how I can change that?

thanks a lot for your help

Regards

Josh

|||

Josh,

"BTW, there is aone small problem. Now when I pull the data in reports the month get sorted alphabeticall i.e. April onwards.

Any suggestion, how I can change that?"

Yes, create a table that has your Month abbreviations, and a SMALLINT or CHAR(1) sort_key to associate with each month. Include such a table in your JOINs to provide the desired sort order.

Dan