473,545 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Report: Format Horizontal Alignment

Hello,

Is there a way to format the data when it is passed into the Crystal
Report(CR).. for example.. In the original table, a number may be
left aligned, how to change it to right alignment?.. in other words I
want to change it's Format: Horizontal Alignment
from Left To Right if the
data passed in is an Integer, Currency, or
DateTime.

thanx

Nov 20 '05 #1
2 12455
Hi BlackDevil,

This is how i do it :

Dim crreportobject As
CrystalDecision s.CrystalReport s.Engine.Report Object

For Each crreportobject In
crReportDocumen t.ReportDefinit ion.ReportObjec ts
'' formats text object
If TypeOf (crreportobject ) Is
CrystalDecision s.CrystalReport s.Engine.TextOb ject Then
Dim crtextobject As
CrystalDecision s.CrystalReport s.Engine.TextOb ject
If Trim(crreportob ject.Name) = "Text2" Then
crtextobject = DirectCast(crre portobject,
CrystalDecision s.CrystalReport s.Engine.TextOb ject)
crtextobject.Te xt = "Hi"
End If
End If
'' formats field object
If TypeOf (crreportobject ) Is
CrystalDecision s.CrystalReport s.Engine.FieldO bject Then
Dim crtextobject As
CrystalDecision s.CrystalReport s.Engine.FieldO bject
If Trim(crreportob ject.Name) = "Field73" Then
crtextobject = DirectCast(crre portobject,
CrystalDecision s.CrystalReport s.Engine.FieldO bject)

crtextobject.Ob jectFormat.Hori zontalAlignment =
Alignment.Right Align
End If
End If
Next

Kind Regards
Jorge
-----Original Message-----
Hello,

Is there a way to format the data when it is passed into the CrystalReport(CR).. for example.. In the original table, a number may beleft aligned, how to change it to right alignment?.. in other words Iwant to change it's Format: Horizontal Alignment
from Left To Right if the
data passed in is an Integer, Currency, or
DateTime.

thanx

.

Nov 20 '05 #2
Hello Jorge,

Sorry, need to ask you something.

1. What crReportDocumen t? Is it the name of your Crystal Report or
something else?

a)........becau se when I change from
crReportDocumen t.ReportDefinit ion.ReportObjec ts()
to
[b:ba3448b144]report[/b:ba3448b144].ReportDefiniti on.ReportObject s()
(dim Public report As CrystalReport1 = New CrystalReport1) it there
are some incorrect syntax such as with
crreportobject. Name,
[i:ba3448b144]DirectCast(crre portobject,
CrystalDecision s.CrystalReport s.Engine.TextOb ject) [/i:ba3448b144],
and [i:ba3448b144]crtextobject.Te xt[/i:ba3448b144],
[i:ba3448b144]crtextobject.Ob jectFormat[/i:ba3448b144],
[i:ba3448b144]Alignment.Right Align().[/i:ba3448b144]

b) if i dont change it, [b:ba3448b144]crReportDocumen t[/b:ba3448b144]
needs declaration..an d
[i:ba3448b144]crtextobject.Te xt[/i:ba3448b144],
[i:ba3448b144]crtextobject.Ob jectFormat[/i:ba3448b144],
[i:ba3448b144]Alignment.Right Align().[/i:ba3448b144] and
[i:ba3448b144]DirectCast(crre portobject,
CrystalDecision s.CrystalReport s.Engine.FieldO bject)[/i:ba3448b144]
has syntax error.

c) If I change it to
[b:ba3448b144]OrrasReport.[/b:ba3448b144]ReportDefinitio n , it stated
that reference to non-shared member requires an object reference. and
the same other syntax error in b).

thanks

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3709
by: Raghu | last post by:
Hi, In my ASP.NET web application project we need to design crystal reports with Crystal Reports version 8.5 enterpraise edition(Please Note:It is not the Crystal Reports that comes with VisualStudio.NET). Also the Crsyatl Report software 8.5 version will not be installed in the IIS web server which is hosting my ASP.NET web application....
1
2002
by: Stephanie Stowe | last post by:
I am doing a support rotation for our massive ASP app. We use Crystal Reports / Enterprise. By some magic which I am unfamiliar with Crystal Enterprise allows the creation of a report on the server, then the report containing the data can be viewed within the browser using a Crystal Viewer. My experience with Crystal is limited to VB client...
3
6001
by: Colin Graham | last post by:
I have recently created a report in crystal(10) linking to a dataset as the datasource. I notice however that the fields available in the report all have STRING format and therefore i cannot change format in crystal(10) e.g. I wish to change a date field to have the format dd/MM/yyyy. The main problem here is that the dataset seems to store...
1
5815
by: Ron Holmes | last post by:
I posted this question on the Crystal Reports Support site and I am still waiting for an answer. Using Crystal Reports 9.0 Developer Full edition: My Crystal report .RPT file has a Picture box which is an OLE Object located in the Page Header section of my .RPT file. This is the call which works perfectly in VB6 to format the crystal...
6
13108
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel spreadsheet. I'm having trouble with my code at the point at which it hits ".ReadRecords" -- the module just runs and runs without generating anything. I've...
7
16571
by: Susan Bricker | last post by:
I would like to generate a report (I have the report working already) using MS/ACCESS 2000 and then have the ability to send the report as an email attachment to my colleagues. I have looked around in the MS/ACCESS Help facility and found that I can click on FILE (on the Menu Bar) and then click on SEND TO. This will generate, either, a...
19
3852
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set ReuseParameterValuesOnRefresh="True" in a viewer, but it still doesn't work. Did anyone run into this problem. What's the solution? Please help. Thank you
0
1637
by: Big George | last post by:
Hello Gurus, I'm developing with VS2003, ASP.NET with Crystal Report for VS.NET, and I need to change the paper orientation of a Crystal Report to Horizontal... How to do that? I tried to follow the instructions in: ...
1
1218
by: xUser | last post by:
Hi, We are developing a new application with .NET 2.0, Oracle and Crystal Reports. Our reports are deployed at Crystal Management Server and are accessed from .NET application using the CrystalReport Viewer control. We have few cross table reports as part of our application. The problem is that the cross tab reports are printed perfectly in...
0
7487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7420
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7446
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1908
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
731
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.