473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to programmatically Change a format in a report?

I tried Format([PeriodDate],"mm yyyy") in a query and it worked. When I put the same code beginning with an equals sign in the Control Source field of the report I got #Error. The ultimate goal is to programmatically use the following code:
TextBox.ControlSource = "Format([PeriodDate],""mm yyyy"")", however, I cannot get it to work when I manually enter it. Any ideas?
Oct 18 '10 #1
2 2119
nico5038
3,080 Expert 2GB
The general way is to set the Format property under the Format tab to "mm yyyy" (without quotes!) and to bind the control to a date field.
Why would you want to do this from code?

Nic;o)
Oct 18 '10 #2
Thanks for the response. I was able to set the format programmatically with: TextBox.Format = "mm yyyy"
after creating the report with: CreateReportControl
Oct 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: just1coder | last post by:
Is there a way to programmatically change the base href tag in a website with JavaScript?
0
by: The Truth | last post by:
All, How can I programmatically change the binding order of the network protocol in Win XP using VC++. Thanks in advance.
1
by: Craig | last post by:
How do I programmatically change the text property of a label in an ItemTemplate in a datagrid? Specifically the Text property. I want to change the databinding to another column at runtime. ...
1
by: thibaut | last post by:
Hi, Is it possible to programmatically change iis rights on a file or a directory (allow write access on xml files, deny download for databases,...). Thanks for your help
7
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change...
0
by: Alphonse | last post by:
Hi, I have an application that need to print a report (Crystal Report) using a custom paper size. The problem is, everytime I want to print it, I need to go to printer properties & set the paper...
0
by: jj | last post by:
How do you programmatically change a "windows Service account" from Local system to Network or Local service by providing username and password? Thanks
0
by: Sheoak | last post by:
Hi, I am developing Crystal Reports using VC++.Net Unlike VB.Net in the VC++.Net there is no report objects. How do I change the report's page layout to landscape in the IDE and also...
0
by: =?Utf-8?B?WmVk?= | last post by:
Good Day, I been looking for a day now and I couldn't find a good source of information. I have a one of a kind report wherein the RDLC file including all controls are programmatically generated...
6
by: Andrew Jocelyn | last post by:
Hi How do I programmatically change (read/write) the values in this app.config file at runtime? Specifically I want to change the client endpoint address but it would be nice to change other...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.