Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Database value not shown Post Reply Post New Topic
Author Message
Maggi
Newbie
Newbie


Joined: 17 Dec 2015
Online Status: Offline
Posts: 2
Quote Maggi Replybullet Topic: Database value not shown
    Posted: 18 Dec 2015 at 3:50am
Hello,

I hope this is the correct section for my problem. We have a customer which is using Crystal Reports 8. It'c connected to an informix database.

The report itself is working fine. Now the customer had a wish to change the report. Two more values should be shown. One is shown properly, the other value is not shown.

I don't know which informations do you need to analyze the problem, so I will provide as much as I can.

First picure: the actual report. The date is the first value which was added, and it's working:



Second picutre: the draft view of the report:



Third picture: Here you see the missing value:



At least the SQL Query:

SELECT
    ti_bestand.mandant,
    ti_bestand.adr_id_auf,
    ti_bestand.trakt_nr,
    ti_arten.bezeichnung,
    ti_stamm.lfd_jahr,
    ti_stamm.lfd_nr,
    ti_stamm.ein_datum,
    ti_stamm.geschlecht,
    ti_stamm.kastriert,
    ti_stamm.geb_datum,
    ti_stamm.mischling,
    ti_stamm.tiername,
    ti_trakt.bezeichnung,
    ti_unt_art.bezeichnung
FROM
    imdis:informix.ti_bestand ti_bestand,
    imdis:informix.ti_arten ti_arten,
    imdis:informix.ti_stamm ti_stamm,
    imdis:informix.ti_unt_art ti_unt_art,
    imdis:thb.ti_trakt ti_trakt,
    imdis:informix.ti_rassen ti_rassen
WHERE
    ti_bestand.mandant=ti_arten.mandant AND
    ti_bestand.satz_status="A" AND
    ti_bestand.tier_id=ti_stamm.tier_id AND
    ti_bestand.trakt_nr=ti_trakt.trakt_nr AND
    ti_arten.satz_status="A" AND
    ti_stamm.satz_status="A" AND
    ti_stamm.ti_art_nr=ti_arten.ti_art_nr AND
    ti_stamm.ti_art_nr=ti_unt_art.ti_art_nr AND
    ti_stamm.ti_art_nr = ti_rassen.ti_art_nr AND
    ti_stamm.ti_uart_nr=ti_unt_art.ti_uart_nr AND
    ti_stamm.ti_uart_nr = ti_rassen.ti_uart_nr AND
    ti_stamm.ti_rass_nr = ti_rassen.ti_rass_nr AND
    ti_bestand.mandant = '01' AND (ti_trakt.trakt_nr IN ("01", "02", "03", "04", "05", "07", "08", "09", "10", "11", "12", "13", "14", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "29", "32", "33", "35", "36", "38", "39", "40", "48", "50", "51", "53", "54", "56", "64", "76"))
ORDER BY
    ti_trakt.bezeichnung ASC,
    ti_bestand.trakt_nr ASC,
    ti_arten.bezeichnung ASC,
    ti_stamm.lfd_jahr ASC, ti_stamm.lfd_nr ASC
   

The missing column is ti_rassen.bezeichnung. I know that this column is not listet unter the SELECT part, but if I add it manually Crystal Reports will delete it itself when saving.

I also did a little formula to see what's going on. It said, if the value of ti_rassen.bezeichnung is "" then write "n/a". And on every entry was "n/a" written.

Another information: If we execute a SQL query on the database itself via putty to determine the value of ti_rassen.bezeichnung it's working!

So if one of you guys (and girls?) got an idea why there is no value shown, I would appreciate any help.

If you need more information tell me, i'm sure I can give you what you need.


(Sorry for my bad english).


Best regards
Markus

Edited by Maggi - 18 Dec 2015 at 4:00am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 18 Dec 2015 at 4:59am
How do you add a field 'manually'?  It either needs to be a fixed value (text box, formula, image, etc.) or a field added from a data source.
IP IP Logged
Maggi
Newbie
Newbie


Joined: 17 Dec 2015
Online Status: Offline
Posts: 2
Quote Maggi Replybullet Posted: 18 Dec 2015 at 5:07am
I added the field from the menu. Insert --> Database field and then selected ti_rassen.bezeichnung. I dragged it into the report.

With "manually" I meant that I added ti_rassen.bezeichnung in the SQL statement under the SELECT part.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.029 seconds.