473,792 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic Formatting

Hi,

I have an app that takes data from a db and maps it to a CSV file. There
are multiple maps for different customers which has different formatting
rules. For example, some customer wants the data to be short data others
want to be long date. Another example is some do not want leading zeros in
fields and some allow them. Another example, is how many decimals allowed.
I am looking for a way to make this dynamic. Currently, I have this hard
coded in my app in a case statement and I have multiple format codes loaded
a db table. I want to user to be able to add a new format to a table based
on some rules and have my app be able to process that. Is this possible?

Thanks
May 19 '06 #1
1 1718
Hmmm...how about if you write it all using data format strings. Keep a
separate table of data format strings organized by customer. WHen you
add a customer, copy the default for them. If they want long date, just
change the string format string in the customer mapping table.

george wrote:
Hi,

I have an app that takes data from a db and maps it to a CSV file. There
are multiple maps for different customers which has different formatting
rules. For example, some customer wants the data to be short data others
want to be long date. Another example is some do not want leading zeros in
fields and some allow them. Another example, is how many decimals allowed.
I am looking for a way to make this dynamic. Currently, I have this hard
coded in my app in a case statement and I have multiple format codes loaded
a db table. I want to user to be able to add a new format to a table based
on some rules and have my app be able to process that. Is this possible?

Thanks

May 19 '06 #2

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

Similar topics

2
8411
by: Tommy Lang | last post by:
Hi everybody! I am trying to learn the basics of C++ myself and have a hard time understanding some stuff like pointers and references etc. I have created a small program that adds two numbers and prints the result on the screen. The program works just fine and I am proud of it :). But now I want to make some changes to it and only use dynamic variables (and make use of *, &, new...). I know from books that you create dynamic variables...
1
3341
by: Richard Hollenbeck | last post by:
Hello Newsgroup. You have all been very helpful in the past and I thank you. I try to ask relevant questions so that they don't just benefit me, but also benefit the group. I'm currently overwhelmed by useless examples across the web on how to make "dynamic crosstab reports" without myself having a basic understanding about how to retrieve and assign recordsources, etc., from fields in a query to fields in the report. I see all these...
1
3655
by: John | last post by:
I have successfully built a datatable and datagrid for a user-selectable field interface. The user can select the fields they want, and the controlling table has the data type information. I can format the dates as I want by using the DataFormatString property of the BoundColumn. That's because the grid sees the data as a date and knows what to do with it. Now I want to format a phone number that was stored as a string from 8005551212...
4
5044
by: Larry Grady | last post by:
Anyone up for a challenge? I've been struggling with this for a few days and was hoping someone could help me. Pouring through all the messageboards I just can't find the solution. We have a GridView that needs to be dynamically designed, depending on what collection of fields our uses want to edit for their product data. We have 400+ fields of information per product so they're selecting a subset of those fields to edit.
2
2014
by: Martin | last post by:
Hi, I need to create the html below with dynamic controls <span class="myclass"> <h3>text1</h3> <h4><span>Price <strong>text2</strong> | Duration <strong>text3</strong></span></h4> </span>
4
3650
by: Ed Jay | last post by:
I generate a DHTML page (a medical report) with dynamically generated text based on user input (answers to questions). The page length changes dynamically. I desire that when the page is printed and reaches a specific length, it terminates printing that page, prints a page number, and then begins to print the next page using the same header and format as the previous page. The page uses no tables or paragraph elements, only CSS. IOW, I...
4
8336
by: Ken Wigle | last post by:
All, I would be very grateful for any help on this question. I have an application in asp.net 2.0 where I dynamically create a datatable and then bind that to a gridview. Unfortunately, the date column always shows the date and time while I just want the short date. I have tried applying a format string {0:d} but to no avail. I saw a lot of posts regarding the htmlencode property but I do not know how to turn that off for a...
2
2240
by: Łukasz W. | last post by:
Hello everybody! I have a small table "ABC" like this: id_position | value --------------------------- 1 | 11 2 | 22 3 | 33
1
1596
by: nguyen.antoine | last post by:
Hi everybody, I have 2 Forms (Form A with a button Button_A and Form B with a button Button_B) When the user click on Button_A or Button_B, it will open the same Form C with some slightly different controls (ex: Buttons and Textbox) What is the code to allow dynamic formatting of Form C based on whether the user click on Button_A or Button_B (coming from Form A or Form B)
0
10430
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10159
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4111
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
2
3719
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2917
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.