ms-access


Complicated crystal report help - Semicolon in the database field value


i have a database column named Firstname and Categories.
FirstName | Categories
Mike | Blue; Green ; Red
Peter | Green; Red
Paul | Red; Blue
I want to generate a report in this format
**Blue :**
Mike
Paul
**Green:**
Mike
Peter
**Red:**
Peter
Paul
The problem is I cannot change the access database column value, it has to have a semicolon to separate the values. I have over 1000 records and more than 30 categories.
How can i achieve this? I am using crystal reports and I am not a pro user, but I learn stuff easily.
I'd say you're more than likely out of luck. That data is very poorly designed, and there's no easy way to get that data out.
Your options are:
Have the other source send the data in parseable format, and point Crystal Reports to that, or...
Create a new, normalized table in Access, use VBA in Access to crawl your current table and populate the new table, and then point Crystal Reports to the new table.
The downside to option #2 is you may have to have repopulate the new table before running the Crystal Report.
This is easily doable, although with 30 category possibilities it gets ugly. It gets even uglier if the entire name of one category is a substring of another (ex: Green and YellowGreen)
Make a Crystal Report, Select the Database, but chose Add Command rather than dragging over the tables.
insert in the "SQL" like so:
.
SELECT 'Blue' As Category,*
FROM Customers
WHERE Categories LIKE '*Blue*'
UNION ALL
SELECT 'Green' As Category,*
FROM Customers
WHERE Categories LIKE '*Green*'
UNION ALL
SELECT 'Red' As Category,*
FROM Customers
WHERE Categories LIKE '*Red*'
Then under Report > Group Expert .. group by Command.Category

Related Links

Trying to limit input on a field
Sorting by month in MS Access
How to add a menu item to the default right click context menu
ASP Access Database web site on Windows 2008 Server running IIS 7
How to populate field descriptions in MS Access
Version control for VBA file
Mystery HAVING clause
MS Access 2003 - Sparkline Graphs in Microsoft Access
How to extract the schema of an Access (.mdb) database?
Using loop in a Access Query
Access 2007 Empty Query Quirk
MS Access: How can I automatically reduce Text columns to an appropriate size for the data stored in them?
No max(x,y) function in Access
Why does a report throw an error when the corresponding query doesn't?
Programmatically Search an Access Listbox control's Items Based Off of a Textbox Entry
Auto populate a combobox

Categories

HOME
wso2-am
tizen
layout
include
elm
infragistics
icloud
indesign
upload
add
virtualization
modx-revolution
modelica
orchardcms
fortumo
zebra-printers
graphlab
fatal-error
facebook-page
jsdoc
swiftlint
physics-engine
sox
core-text
zurb-foundation-6
restful-authentication
firebase-crash-reporting
angular2-aot
qhull
underflow
intel-pin
madlib
nouislider
media-queries
javascriptcore
pdb
subset-sum
android-kernel
geopositioning
sequential
isbn
fault
chain-builder
theming
python-webbrowser
togetherjs
windows-mobile-6.5
windows-iot-core-10
color-picker
android-fonts
login-control
holder.js
simplewebrtc
hexdump
associative-array
maven-tomcat-plugin
citrus-pay
twirl
pretty-print
bigbluebutton
jsonpickle
qpainter
cdt
winddk
java.util.concurrent
client-side-templating
gulp-less
poller
resty-gwt
cloud-connect
terminal-services
geos
.aspxauth
yui-compressor
unc
first-responder
venn-diagram
dsn
tridion-worldserver
chrono
uiviewanimation-curve
semantic-diff
libc++
netbeans-7.1
datareader
paster
routedevent

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App