Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Thursday, March 22, 2012

Crystal Reports Landscape printer setup

I'm using crystal reports 4.6, any idea how to setup the report page to landscape setting?Oh no, I know I am not helpful but I think it is really time for an upgrade. There are lots of new, sometimes actually useful features in new versions, lots of old features were enhanced and lots of bugs squashed. Stick to CR8 or CR85 if you want to preserve compatibility with old RPTs, or if you have an application that uses OCX or CRPE. Otherwise, go for CRXI.|||ok thanks. so what other version of CR supports landscape printing?|||Report orientation can be changed via File->Printer Setup menu.
It has been so since (at least) CR6, when I saw Crystal for the first time.

Crystal reports Export problem, asp.net VS2005

Using report viewer on aspx (VS2005) page and calling enterprise crystal report 10 vertion, but when we trying to export using export button to PDF all characters in englisg exporting properly, but Chinese letters are not exporting correctly, exporting like squares, can any one advice what needs to do.

Thanks
Phaneendra.Are Chinese fonts installed on the client and server? Does Crystal or Adobe require a separate or special Chinese fonts install?|||Thanks for response TripperDay,

Using font type PMingLiu for report chinese fields, Yes font type allrady installed in bothe local and UAT machines, it is like

Font Name : MingLiu & PMingLiu (TrueType)
Filename : mingliu.ttc
in C:\WINDOWS\Fonts, but still can't see chinese fonts in PDF,

is there any other way to get correct.

Crystal Reports Export Problem

Hi, Im using crystal reports integrated with visual studio.net 2005. Currently, i have a 3 page report, it shows perfectly in the crystal report viewer, but it has problems when i export it.
When i export to word format, only the first page is exported along with a blank page and when i export to PDF format, total 6 pages are exported 3 being the report pages and 3 being blank pages after each report page. I require to export to word format but i have no idea wats causing this problem...any help will b greatly appreciated...its urgent!You could try exporting to RTF, then open that with word...sql

Crystal Reports error

Hello: :wave:
I have a C# project which contains a web form, which has a button calling a web page containing a crystalreportviewer, which contains a CrystalReport report; when I call this page through Response.Redirect("WebForm2.aspx"); WebForm2 is not opening, instead it is sending me an error: [Null]Reference Exception: Reference to object does not stated as object's instance.]
Somebody know what is reason of this error?
I'll thank you for your help.
A.L.Hello.
At last I found the way to solve it. Something wrong was in it.
I reinstalled Visual Studio .NET.
Regards.
A.L.
:wave:

Crystal reports and page breaks

I have a requirement from our users that they want to add page breaks into the middle of a text field in our application.

This text is being printed in a Crystal report, so they would have the facility then to split text over 1 or more pages without coding needed to be done.

Is it possible to type in (use of varous keys e.g. Ctrl + Shift + A) a special character in the text field which Crystal Reports will process as a new page?

Any assistance would be gratefully received.you can use chr(13). Create new formula having this code

left({field},100)+chr(13)+mid({field},101,len({Feidl})

and set can grow propery to true

Tuesday, March 20, 2012

Crystal reports across multiple pages

Using crystal reports, I want to display many fields from the database. All the fields does not fit in single page, even with maximum page length. If I have some 30 fields, is it possible to display first 20 fields in page 1 and remaining fields in page 2? And continue the same in page 3/4, 5/6 etc? :confused:Yes. You can format the page layout to do so. Add the 20 fields in page one. Add a New section (i.e. page) then add the remaining 10 fields.

Hope This helps,
Vinny P|||Thanks for the response. :wave:
But, while adding the section, I could not see any option to add the page. There are options to add report header, page header, group header, footers etc, but not for adding the page itself. :confused:
Can you make it more clear?|||I think what shashidharkr had in mind was being able to display very wide reports, one data row on the line, spanning multiple pages horizontally. The answer is "no". You cannot create wider reports than your printer driver supports. This is one of the most annoying limitations of the Crystal Reports. If your printer driver supports A2 landscape, you are lucky, but when displaying and printing this report on another machine or printer, the report will be truncated to whatever other printer driver supports.

The only exception is the crosstab object that can span itself to multiple pages. So there is a tricky workaround to use a hidden crosstab to span a usual report:
http://support.businessobjects.com/library/kbase/articles/c2014205.asp
But it comes with severe limitations (only first page will be spanned, the export to excel will be ruined etc).

For myself, I choose A3-landscape for wide reports. A3 is supported by most printer drivers. For extra-wide reports, I use A2-landscape. On client machine, the report gets truncated on the screen but export to excel will still export all fields.|||wapper,
You got my problem right! ;)

It is really surprising to know that crystal report has such a serious limitation. :o I need to create wide report, which spans across more than one page and thousands of rows of data. Even the workaround suggested by you may not be of much help, as I have many rows of data.

I think it makes no sense to limit the report width based on the paper sizes! If the report is wider, it should span to next page. I understand other reporting tools like cognos has such feature.

Any clue, if crystal report is going to fix this in future releases atleast? I hope this is in Seagate's agends. However, if we want to voice our concern, where can this be raised?|||I think it makes no sense to limit the report width based on the paper sizes! If the report is wider, it should span to next page. I understand other reporting tools like cognos has such feature.

The problem is, Crystal uses windows forms to compose the layout of the report. Forms are related to printer driver. You can experiment with creating custom forms (Control panel-Printers-File-Server properties-Forms) but custom forms are for one computer only, and IIRC there was also a limitation that you cannot create larger forms than some value, can't remember what exactly the limit was.

Any clue, if crystal report is going to fix this in future releases atleast? I hope this is in Seagate's agends. However, if we want to voice our concern, where can this be raised?

If you find such place, please let me know :) I got toooons of stuff to complain about Crystal.|||wapper
Thanks again for the response.

You can experiment with ....
Unfortunately, I can't spend more time on this :) . I have to look for some feasible workarounds. :ehh: I strongly feel that Seagate should resolve this problem. Being widely used report tool, such a major drawback should be addressed immediately. :rolleyes: Still I can't digest that Crystal imposes such a serious limitation on it's users! :(

Just to draw analogy, page width should be independent of paper size as in excel. Irrespective of the width, if paper width is less, excel prints in next page.

I got toooons of stuff to complain about Crystal.
Can the moderators or any others help on this?|||This problem has always been around and it is still not fixed in CR XI. Guess it is some kind of fundamental feature that can't be changed easily. Of course Crystal guys are aware of it because people have been crying for ages but still no solution, only workarounds.

You can try different support options in their web if you want to yell at someone. BTW there is also bunch of forums there. I don't know if those are actually monitored by Crystal.sql

Monday, March 19, 2012

Crystal Report queries

In my Crystal Report's Details Section, the blank space after the last line is unnecessarily printed and this disturbs page length settings. How to delete the unnecessary lines below the last text in the Details Section, so that they are not printed as Blank.

I even dragged the dividing line to the last Text Box in the Details section, but the problem persists.

Secondly, when I issue a Print Command, a message box with no text appears. IT's title is "Crystal Reports ActiveX Designer" and an OK button. No other message.Hi,
In the details section set the property of Fit Section(Right click on the left side of Details section, select Fit section). Make sure that page footer does not have empty space.

Madhivanan|||I use CR 8.5, so you may need to tweak my examples a bit if you're using a different version.

1. To suppress the last blank line, go into the Format of that section. Find where you can check Suppress and click the 'x-2' next to it. Enter the following keyword in the formula section: OnLastRecord. This will suppress that section only on the last record.

2. To keep the program from popping up a box when printing, try Report.PrintOut False

Sunday, March 11, 2012

Crystal Report Page Skip Problem

Hello All,

I hav designed a report. It contacins more than 10 records in the details section. Mostly by 10 records the total page will be covered with some headers, so i need to skip the same headers to the next page for other records.

How can i skip to the next page if the Record count is > 10.

bye...

Tks & Rgds,
Poorni.To get at most 10 records per page, put a conditional new page after on the detail section with the formula
recordcound mod 10 = 0

This should be fine if you can be sure that 10 records won't take up more than 1 page.

Crystal Report high time taking to load:

In my application , crystal report taking too much time. My Report have more than 50,000 records to display. Report not showing first page untill it receives data of total 50000 records. After reciving total records from database then it is showing first page. It is taking more than 10 mins time. How to solve this problem?Hi. . .

I too have the same problem. My report contains more than 100 pages and it's taking quite a long time to display the report.

Is there any way we can start displaying the report as soon page1 gets filled with the required data??

Any hep pls!!

Thank you all.|||I'm not sure I have the answer but here area couple of things you can check.
Are you using page number or page N of M? If you are using N of M the first page can not be displayed until the last page has been calculated so it can display the total number of pages in N of M.

Are you using indexed fields for your table joins?

Do you have "perform grouping on Server" and "use indexes on server for speed" checked in the oprtions?

Does the SQL for your report have a where clause? If not, the processing can not be pushed to the server.

Good luck and I hope this helps a little.

Wednesday, March 7, 2012

Crystal Report - How to add a page break?

Hi! I use Crystal Report 8 and I've created like an Invoicing Form, I need four copies of that form changing only the title for example: One saying "Original", second saying "Duplicated", etc...

I think to create the same page four times but I don't know how to add a page break as I need the same header, same body and same foot page than the first one...

Thank you for your help....I think you need to write a query like

Select * from TableName
Union All
Select * from TableName
Union All
Select * from TableName
Union All
Select * from TableName

Design the report using that query
Goto Section Expert and in the "New Page After" option, click the button labelled x-2 and write this code

If RecodNumber mod 20 = 0 then True|||Madhi,

Thank you.. but an error message appears saying "A number, currency amount, boolean, date, time, date-time, or string is expected here." I've tried to click "Page Break After" in Report Footer's Section Expert but the option is not available so I've click on the Group Footer's Section Expert...

Thank you again for your help|||Where did you get that error?|||Madhi,
Thank you again... That error occurs when I click on the Accept button on the Section Expert. I press the "x-2" button to add the formula that you've sent to me yesterday...

Regards, Guada

Crystal Report

How can I set the page when I am connecting Crystal Report and ASP trhough SmartViewerActiveX.Not sure what you are asking
Can you give more details?

Crystal Equivalent in SQL 2K5?

I have an existing Crystal report that contains a subreport which lists
items across the page rather than down. The subreport has a Header and
Detail section, which are both supressed, and a footer section that is
visible. In the Header section, a field is defined with the following
expression:
WhilePrintingRecords;
global stringvar strItems;
strItems :=""
The Detail section has a field defined with the following expression:
WhilePrintingRecords;
global stringvar strItems;
strItems := strItems + ToText({uspGetItems;1.ItemID}, 0, "") + ", "
The Footer section has a field defined with the following expression:
WhilePrintingRecords;
global stringvar strItems;
If Len(strItems) > 1 Then
strItems := Left(strItems, Len(strItems) - 2)
Is there a way to do this in a SQL report?
Any feedback would be appreciated.
Thanks.You could do something like this in a data set in SQL
Declare @.a varchar(1000)
Select @.a = ''
select @.a =@.A + ISNULL(NAME + ', ','') FROM Production.Product
Select @.a as myList
You'd need to take off the last , ...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"jason.pileski@.pacourts.us" wrote:
> I have an existing Crystal report that contains a subreport which lists
> items across the page rather than down. The subreport has a Header and
> Detail section, which are both supressed, and a footer section that is
> visible. In the Header section, a field is defined with the following
> expression:
> WhilePrintingRecords;
> global stringvar strItems;
> strItems :=""
> The Detail section has a field defined with the following expression:
> WhilePrintingRecords;
> global stringvar strItems;
> strItems := strItems + ToText({uspGetItems;1.ItemID}, 0, "") + ", "
> The Footer section has a field defined with the following expression:
> WhilePrintingRecords;
> global stringvar strItems;
> If Len(strItems) > 1 Then
> strItems := Left(strItems, Len(strItems) - 2)
> Is there a way to do this in a SQL report?
> Any feedback would be appreciated.
> Thanks.
>

Crystal Design

Hi,
I've a standard Invoice template with Page header, Group Header and Detail section. Invoice can be of one page or multiple pages depending on the number of invoice line items. I want to print Customer service and payment details (fixed text of about 40 lines) on the back of every page. How do I achieve this. Any help is much appreciated.

thanks & regards
radhastart a new page after group footer. if ur invoice is of one page , then this new page can be printed on back.|||Thanks for this. It works fine when the invoice has one page.
My report is grouped by Invoice Number so for an Invoice with multiple pages group footer prints on the last page of the invoice and the balnk page prints after the last page of the Invoice. My requirement is to print the details on the back of each page. Any help would be much appreciated.

thanks & regards

radha

Crystal 8.5 Page Length less than 4"

Hi!

I have a VB 6.0/CR 8.5 official receipt printing on a form that is 8.5 x 3.5. It was running perfectly under Windows 98 but when I have upgrade to Windows XP I can no longer access withing CR 8.5 forms that are less than 4 inches. Any idea how can I resolve this issue.

Thanks.

rclazarito[ Thread moved to Crystal Report ]

Saturday, February 25, 2012

Crystal 10 Using ASP page for datebase connections

I hope someone can help me get started on this. I wish I knew all of the terminology to use for this, but I have limited knowledge of Crystal Enterise 10. I am trying to figure this out as the person who created it is no longer around. He is my problem. I have a Crystal report ( Crystal 10) that has two subreports. The main report and the two subreports are all from different datasources. The report runs fine on my machine using the Crystal application. The problem comes in when I run it via Internet Explorer. There is an ASP page that is used to pass the connection information to the Crystal report. It works fine via the web with only one subreport. I can not figure out how to add the third datasource to the ASP page. I will include the ASP page that is used for the two current connections. What I need to know is how to add the third datasource connection to the existing information. I am going to attach a PDF of the code. Thank you for your help.

<%@. Language=VBScript CodePage=65001 %>
<%

'=======================================================================
' CRYSTAL ENTERPRISE REPORT APPLICATION SERVER (CE EMBEDDED) 10
' Purpose: Demonstrate how to change the datasource location at runtime
' Special Note* - ODBC Datasources
'=======================================================================

' This line creates a string variable called reportName that we will use to pass
' the Crystal Report file name (.rpt file) to the OpenReport method.

reportname = "Reports/"&Request("CRReport")

'============================================================================
' CREATE THE REPORT CLIENT DOCUMENT OBJECT AND OPEN THE REPORT
'============================================================================

' Use the Object Factory object to create other RAS objects (useful for versioning changes)
Set objFactory = CreateObject("CrystalReports.ObjectFactory")

' This "While/Wend" loop is used to determine the physical path (eg: C:\) to the
' Crystal Report .rpt by translating the URL virtual path (eg: http://Domain/Dir)
Dim path, iLen

path = Request.ServerVariables("PATH_TRANSLATED")

While (Right(path, 1) <> "\" And Len(path) <> 0)
iLen = Len(path) - 1
path = Left(path, iLen)
Wend

' Create a new ReportClientDocument object
Set Session("oClientDoc") = objFactory.CreateObject("CrystalClientDoc.ReportClientDocument")

' Specify the RAS Server (computer name or IP address) to use (If SDK and RAS Service are running on seperate machines)
Session("oClientDoc").ReportAppServer = "localhost"

' Open the report object to initialize the ReportClientDocument
Session("oClientDoc").Open path & reportName

'===============================================================
' CHANGING THE MAIN REPORT DATABASE INFO
'===============================================================
Set oDBInfo = Session("oClientDoc").DatabaseController.GetConnectionInfos().Item(0)
oDBInfo.UserName = "sa"
oDBInfo.Password = "blackfin"

'Get the collection of tables in the main report
Set Tables = Session("oClientDoc").DataDefController.Database.Tables
For Each table in Tables

'clone the table object
Set newTable = Table.Clone

'set the table's connectionInfo to the current connection info
newTable.ConnectionInfo = oDBInfo

'set the table object qualified name to include the new database name
'i.e. original = 'db1.dbo.myTable', new = 'db2.dbo.myTable'
'newTable.QualifiedName = Database & ".dbo." & Table.Name

'put this newly modified table object back into the report client doc
Session("oClientDoc").DatabaseController.SetTableLocation table, newTable

Next

'===============================================================
' CHANGING THE DATABASE FOR ALL SUBREPORTS
'===============================================================

'get a collection of subreport names
Set subReportNames = Session("oClientDoc").SubReportController.QuerySubreportNames

For each subName in subReportnames

'we can't reference a subreport table object directly, so we get the collection of tables first
Set subTables = Session("oClientDoc").SubReportController.GetSubreportDatabase(subName).Tables

For each subTable in subTables

'clone the subreport table object
Set newSubTable = subTable.Clone

'set the subreport table's connectionInfo to the current connection info
newSubTable.ConnectionInfo.UserName = "william_l"
newSubTable.ConnectionInfo.Password = "bdl700"

'set the table object qualified name to include the new database name
'i.e. original = 'db1.dbo.myTable', new = 'db2.dbo.myTable'
'newSubTable.QualifiedName = Database & ".dbo." & subTable.Name

'put this newly modified table object back into the report client doc
Session("oClientDoc").SubReportController.SetTableLocation subName, subTable, newSubTable
'on error resume next
Next
Next

'============================================================================
' CHOOSING THE REPORT VIEWER
'============================================================================
'
' There are four Report Viewers:
' 1. Crystal Reports Interactive Viewer (CrystalReportsInteractiveViewer.asp)
' 2. Crystal Reports Viewer (CrystalReportsViewer.asp)
' 3. Crystal Reports Parts Viewer (CrystalReportsPartsViewer.asp)
' 4. Legacy ActiveX Viewer (ActiveXViewer.asp)
'
' Note that to use this these viewers you must have the appropriate .asp file in the
' same virtual directory as the main ASP page. Choose from one of the four viewers below,
' simply uncomment the one you want to use:

' *** Crystal Reports Interactive Viewer ***
Response.Redirect "CrystalReportsInteractiveViewer.asp"

' *** Crystal Reports Viewer ***
'Response.Redirect "CrystalReportsViewer.asp"

' IMPORTANT NOTE - To use the report parts viewer successfully you are required to
' choose and name three objects in the report to Node1, Node2 and Node3.
' You can access an objects name by using the Format Editor dialog box.
' For more information on the Format Editor Dialog Box and setting objects
' names, please refer to the Help Contents (Help Menu->Crystal Reports Help)
' or by pressing F1

' *** Crystal Reports Parts Viewer ***
'Response.Redirect "CrystalReportsPartsViewer.asp"

' IMPORTANT NOTE - The ActiveXviewer does NOT have the ability to prompt for parameters,
' selection formulas, or login information. If your report requires this information
' to run, look at the the appropriate code samples to pass this information before
' using this viewer.

' *** Legacy ActiveX Viewer ***
'Response.Redirect "ActiveXViewer.asp"

'=============================================================================

%>
%>Hi, Does anyone have an ideas? Does my question make sense?
Thank you|||What I see is that the line that change to new database location is a comment

'newSubTable.QualifiedName = Database & ".dbo." & subTable.Name|||Thank you jggtz for the reply.
Would the Database piece be the ODBC name? What needs to be modified on the ".dbo." section? Does the subTable.Name stay like it is?

You don't know how much I appreciate your help.

Thank you.|||Maybe this can help -->
http://www.codeproject.com/aspnet/crystalwithaspdotnet.asp?df=100&forumid=188132&exp=0&select=1455404

Sunday, February 19, 2012

Cross Tabs and Groupings

I m trying to struct a query that will give me the impression reports. I want a table that give the page name ,yesterday hits,todays hits, this weeks hits and this month hits.
My Table is like this ..
tblStat----
MID -- key id incrementing with no replication
MURL -- name of page
MIMp -- Counted impression at that day
MDate -- Smalldatetime value
------
returning rows are similar like:
1 index.asp 5 13/12/2003
2 main.asp 2 13/12/2003
3 index.asp 3 14/12/2003
4 main.asp 8 14/12/2003
--
I tried to do a query and it is :
SELECT DISTINCT dbo.tblStats.MURL, INSERT1.MToday, INSERT2.Mpre, INSERT3.MWeek, INSERT4.MMonth
FROM dbo.tblStats LEFT OUTER JOIN
(SELECT DISTINCT MURL, SUM(MIMP) AS Mpre
FROM tblStats
WHERE (Mdate = '3/18/2003')
GROUP BY MURL) INSERT2 ON dbo.tblStats.MURL = dbo.tblStats.MURL LEFT OUTER JOIN
(SELECT DISTINCT MURL, SUM(MIMP) AS MToday
FROM tblStats
WHERE (Mdate = '3/19/2003')
GROUP BY MURL) INSERT1 ON dbo.tblStats.MURL = dbo.tblStats.MURL LEFT OUTER JOIN
(SELECT DISTINCT MURL, SUM(MIMP) AS MWeek
FROM tblStats
WHERE (MDate >= '3/15/2003' AND MDate <= '3/21/2003')
GROUP BY MURL) INSERT3 ON dbo.tblStats.MURL = dbo.tblStats.MURL LEFT OUTER JOIN
(SELECT DISTINCT MURL, SUM(MIMP) AS MMonth
FROM tblStats
WHERE (MDate >= '3/01/2003' AND MDate <= '3/29/2003')
GROUP BY MURL) INSERT4 ON dbo.tblStats.MURL = dbo.tblStats.MURL
------------
but this query returning to me too much records. Because i only have to pages in table that must be two records to return me back. If anyone know how to solve this please response me. Thank you from now on.How About something using the [Case When] & DatePart

SELECT DISTINCT dbo.tblStats.MURL,
SUM(CASE WHEN MDate = Getdate() THEN MIMP ELSE 0 END) AS Today,
SUM(CASE WHEN MDate = (Getdate()-1) THEN MIMP ELSE 0 END) AS YesterDay,
SUM(CASE WHEN MDate = (Getdate()+1) THEN MIMP ELSE 0 END) AS Tommorow,
SUM(CASE WHEN DatePart(wk, MDate) = DatePart(wk, GetDate()) THEN MIMP ELSE 0 END) AS ThisWeek,
FROM tblStats

Or Something like that

PS. Joking about the Tommorow One - lol

GW|||GWilliy,
no distinct, but group by. Do not use abrevs for time parts, it is missguiding.
wk=week

SELECT dbo.tblStats.MURL
...
GROUP BY dbo.tblStats.MURL

hexcode,
be sure you don't store time. Also note that function DATEPART(week,@.D datetime) is nondeterministic (SET DATEFIRST/LANGUAGE dependent).

Good luck!|||The query really worked fine. Just i send the date values from program instead of getdate. Thank you for your help.