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

How to edit subform based on joined tables in Access 2010
Textfield in Access 2003 query replaced by squares and asian symbols
Where do I put Access vba code to only fire when physically printing?
Loop through Access tables
Pass Parameter to Stored Procedure
Access 2007 VBA GoToRecord issue
MS Access 2012 Unresponsive to clicks when it has focus on citrix
Error 3155 (ODBC--insert on a linked table 'SAMPLE' failed)
I keep on getting an error 13 type mismatch error, How can I get it out?
MS Access Mark Duplicates in order of appearance
MS access: how to embed JPEG images and preview them?
Problems implementing basic VBA in Access 2007
Access query with unionall or crosstab in asp not working
Why does a datasheet view show only 100 records when based on sorted and filtered adodb recordset
Import MS Word Form Field to Access - Missing Reference?
MS Access forms Denied connection to SQL Express Backend

Categories

HOME
xamarin
winforms
date
oracle11g
iot
platform-builder
android-4.4-kitkat
q
google-oauth
yarn
dxl
esper
medical
serverless-framework
worldwind
textfield
grails3
immutable.js
restful-authentication
jndi
firebase-crash-reporting
xpages-ssjs
spring-mybatis
facebook-apps
gitignore
objectanimator
instant-messaging
google-rich-snippets
fog
force-layout
space-complexity
gesture
ansible-playbook
azure-ml
powershell-dsc
vao
thin
react-scripts
jquery-nestable
promela
paxos
integrity
gabor-filter
drupal-6
forever
worker-thread
diagnostics
kbuild
or-tools
pintos
root-framework
cubes
instant
rotativa
database-optimization
intrusion-detection
player
multiple-regression
blackberry-10
dlna
independentsoft
teamcity-8.0
endeca-workbench
sailfish-os
clipperlib
tt-news
mdt
dml
dealloc
c18
pushbackinputstream
jquery-mobile-dialog
selected
sublist
dsn
netbeans-6.9
pydot
zpt
deobfuscation
gcj
recent-documents
zend-translate
gallio
.nettiers
icanhaz.js
xsdobjectgen
compiler-specific
substrings
libs
zend-decorators
private-members
geneva-server
.net-1.0

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