Page 1 of 1

Looking for examples report that does the following

Posted: Tue Jan 09, 2024 7:01 am
by CCS
Anyone knows of sample reports that shows how to do the following using the Designer:

- Reference a String Range in a Data band Filter expression (I found the use of xxx.FromDate and xxx.Todate but nothing on using String)
Example:
VariableA is a String Range
in Filter Expression I want to use DBNAME >= VariableA.FromValue && DBNAME <= VariableA.ToValue
The syntax is wrong I guess but I did not see any errors

- I want to have a report variable switching from one field to another based on user's choice of an earlier variable entry. I tried to add a Switch to determine the field to use but it did not seem to work
Example:
Variable 1 is asking for Select by ID or Name
Variable 2 is using Switch to check if result of (Variable 1 == "ID", DBID, Variable 1 == "Name". DBName)

Re: Looking for examples report that does the following

Posted: Wed Jan 10, 2024 2:24 pm
by Lech Kulikowski
Hello,

For string variable, you can use From/To properties. However, it is not possible to compare string values.

> Variable 2 is using Switch to check if result of (Variable 1 == "ID", DBID, Variable 1 == "Name". DBName)

You can use the Switch() function.

Thank you.

Re: Looking for examples report that does the following

Posted: Thu Jan 11, 2024 12:28 am
by CCS
Hi

Thanks for the response. Can I just clarify.

"For string variable, you can use From/To properties. However, it is not possible to compare string values."

Does it mean I cannot do this?

table.fieldname >= variableA.From && table.fieldname <= variableA.To

where I have set up variableA as String and is a Range.

The purpose is to retrieve any records that has a string value >= to the from selection and <= to the toselection.

Thanks

Re: Looking for examples report that does the following

Posted: Thu Jan 11, 2024 1:51 pm
by Lech Kulikowski
Hello,

What do you mean by comparing strings? In the .NET it is no possible.

Please check:
https://learn.microsoft.com/en-us/dotne ... re-strings

Thank you.

Re: Looking for examples report that does the following

Posted: Fri Jan 12, 2024 3:00 am
by CCS
Yes I can see it does not allow that.

I am trying to migrate a Crystal Report that allow at runtime, user selection of FROM TO of a string field. If using that in Databand Filter is not allowed, is there a technique you can suggest to get the same kind of filtering?

I think I have reviewed most if not all the sample reports but none come close to my needs.

Cheers

Re: Looking for examples report that does the following

Posted: Fri Jan 12, 2024 8:36 am
by MatthiasU

Re: Looking for examples report that does the following

Posted: Fri Jan 12, 2024 11:47 am
by Lech Kulikowski
Hello,

You can implement and add your own function to the dictionary.

Thank you.