0
In a report built in Delphi7 Reportbuilder I have vendor information in a group header and vendor items in a Detail tab just below. The problem is that it is not possible to sort items (Detail) according to parameter ('C' code or’D' description)
More information:
The report data comes from a precedent and the ordering is done directly in the Dataset of the report object in Delphi. That is, I have a precedent that mounts all the sql where the data is pulled that will be displayed while in the IDE the Dataset component has in its sql code the order by that should order the header in alphabetical order and the items according to the parameter.
ex: with code 'C' sorting parameter, i.e., items sorted by code
FORNECEDOR A
item 1 "B"
item 2 "A"
item 3 "C"
FORNECEDOR B
item 1 "B"
item 2 "A"
If I change the parameter to’D' the result remains the same when expected:
SUPPLIER TO item 2 "A" item 1 "B" item 3 "C"
SUPPLIER B item 2 "A" item 1 "B"
in the dataset
, obviously gets:
select (dados) from procedure as alias
order by (campo do titulo do fornecedor,
case par_ordenacao
when 'C' codigo when 'D'
descrição end
Unfortunately here it was not possible to execute the report by adding the "asc". I cannot say for sure what it was. At first what you said seems to be a possibility. Error: SQLDA Missing or incorrect version, or incorrect number/types of variables
– Matheus Lacombe
Using which version of sql?
– Marlysson
Note: The problem occurs even if I choose "Description" (’D') to sort the item.
– Matheus Lacombe
Yes yes, of course if we make one work the other will work accordingly. Your sql is the same ansi?
– Marlysson
About the version of Sql, at first here I use Ibexpert 2014. Note 2: I also tested for the "asc" before but it presents error as well
– Matheus Lacombe
And removing it, since asc is the standard..
– Marlysson
Yes, but if we remove the asc then we go back to square one, because then the code is as it was before.
– Matheus Lacombe